From 487cc516ec34f2cc94e40c7c4eef2ef8974ff62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 19 Apr 2004 01:31:19 +0000 Subject: [PATCH] Register %es was not properly set from the bios_regs structure (since switch_to_real_mode() overwrites %es). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7237 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/platform/bios_ia32/bios.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/kernel/boot/platform/bios_ia32/bios.S b/src/kernel/boot/platform/bios_ia32/bios.S index 354c93c9e0..f72424b56e 100644 --- a/src/kernel/boot/platform/bios_ia32/bios.S +++ b/src/kernel/boot/platform/bios_ia32/bios.S @@ -19,7 +19,8 @@ #define SAVED_ESP 0x10000 #define SAVED_CR3 0x10004 #define SAVED_EAX 0x10008 -#define SAVED_FLAGS 0x1000c +#define SAVED_ES 0x1000c +#define SAVED_FLAGS 0x10010 // we're overwriting the start of our boot loader to hold some // temporary values - the first 1024 bytes of it are used at // startup only, and we avoid some linking issues this way @@ -176,14 +177,16 @@ FUNCTION(call_bios) movl 12(%ebp), %edx movl 16(%ebp), %esi movl 20(%ebp), %edi - mov 24(%ebp), %es + movw 24(%ebp), %ax + movw %ax, SAVED_ES call switch_to_real_mode .code16 - // restore %eax from saved location + // restore %eax and %es from saved location movl (SAVED_EAX - 0x10000), %eax + movw (SAVED_ES - 0x10000), %es // call the interrupt (will be dynamically changed above) .byte 0xcd