mirror of https://github.com/ipxe/ipxe.git
[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.pull/1/head
parent
e3c5507178
commit
50dc9344b7
|
@ -436,6 +436,7 @@ get_mangled_e820:
|
||||||
|
|
||||||
/* Peek ahead to see if there are any further nonempty regions */
|
/* Peek ahead to see if there are any further nonempty regions */
|
||||||
pushal
|
pushal
|
||||||
|
pushw %es
|
||||||
subw $20, %sp
|
subw $20, %sp
|
||||||
movl $0xe820, %eax
|
movl $0xe820, %eax
|
||||||
movl $SMAP, %edx
|
movl $SMAP, %edx
|
||||||
|
@ -445,6 +446,7 @@ get_mangled_e820:
|
||||||
movw %sp, %di
|
movw %sp, %di
|
||||||
call get_nonempty_e820
|
call get_nonempty_e820
|
||||||
addr32 leal 20(%esp), %esp /* avoid changing flags */
|
addr32 leal 20(%esp), %esp /* avoid changing flags */
|
||||||
|
popw %es
|
||||||
popal
|
popal
|
||||||
jnc 99f /* There are further nonempty regions */
|
jnc 99f /* There are further nonempty regions */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue