summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2008-09-29 01:36:11 +0200
committerMichael Brown2008-09-29 01:36:11 +0200
commit50dc9344b7265915f5b9b1f795d024e775e3ae49 (patch)
tree8f99fe0c61d8667cc603d18245c379abe1ec9da9
parent[i386] Add dump_regs() debug call (diff)
downloadipxe-50dc9344b7265915f5b9b1f795d024e775e3ae49.tar.gz
ipxe-50dc9344b7265915f5b9b1f795d024e775e3ae49.tar.xz
ipxe-50dc9344b7265915f5b9b1f795d024e775e3ae49.zip
[pcbios] Save/restore %es in INT 15,e820
Our INT 15,e820 code was setting %es=%ss (as part of the "look ahead in the memory map" logic), but failing to restore %es afterwards. This is a serious bug, but wasn't affecting many platforms because almost all callers seem to set %es=%ss anyway.
-rw-r--r--src/arch/i386/firmware/pcbios/e820mangler.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/arch/i386/firmware/pcbios/e820mangler.S b/src/arch/i386/firmware/pcbios/e820mangler.S
index ad773f74..437efa77 100644
--- a/src/arch/i386/firmware/pcbios/e820mangler.S
+++ b/src/arch/i386/firmware/pcbios/e820mangler.S
@@ -436,6 +436,7 @@ get_mangled_e820:
/* Peek ahead to see if there are any further nonempty regions */
pushal
+ pushw %es
subw $20, %sp
movl $0xe820, %eax
movl $SMAP, %edx
@@ -445,6 +446,7 @@ get_mangled_e820:
movw %sp, %di
call get_nonempty_e820
addr32 leal 20(%esp), %esp /* avoid changing flags */
+ popw %es
popal
jnc 99f /* There are further nonempty regions */