aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cstart.S1
-rw-r--r--linuxboot.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/cstart.S b/cstart.S
index b3bfc5d..a92f1c1 100644
--- a/cstart.S
+++ b/cstart.S
@@ -30,6 +30,7 @@ gdt32:
.quad 0x00cf9b000000ffff // flat 32-bit code segment
.quad 0x00cf93000000ffff // flat 32-bit data segment
.quad 0x000f9b0f0000ffff // 64K 16-bit code segment at 0xF0000
+ .quad 0x000f93000000ffff // 64K 16-bit data segment at 0x0
gdt32_end:
gdt32_descr:
diff --git a/linuxboot.c b/linuxboot.c
index cc64811..9671fd7 100644
--- a/linuxboot.c
+++ b/linuxboot.c
@@ -130,7 +130,9 @@ void boot_bzimage(struct linuxboot_args *args)
*/
asm("pm16_boot_linux:"
".code16;"
- "mov $0, %eax; mov %eax, %cr0;"
+ "mov $0x20, %ax; mov %ax, %ds; mov %ax, %es;"
+ "mov %ax, %fs; mov %ax, %gs; mov %ax, %ss;"
+ "xor %eax, %eax; mov %eax, %cr0;"
"ljmpl $0xf000, $(1f - 0xf0000); 1:"
"mov %bx, %ds; mov %bx, %es;"
"mov %bx, %fs; mov %bx, %gs; mov %bx, %ss;"