summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--setup.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup.S b/setup.S
index 9ae578f..2fe3d2d 100644
--- a/setup.S
+++ b/setup.S
@@ -73,6 +73,9 @@ alt_a20_done:
* Note that the short jump isn't strictly needed, althought there are
* reasons why it might be a good idea. It won't hurt in any case.
*/
+ xorl %ebx, %ebx
+ movw %ss, %bx
+ shll $4, %ebx
movw $0x0001, %ax # protected mode (PE) bit
lmsw %ax # This is it#
jmp flush_instr
@@ -81,6 +84,7 @@ flush_instr:
movw %ax, %ds
movw %ax, %es
movw %ax, %ss
+ addl %ebx, %esp
movw %ax, %fs
movw %ax, %gs