Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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.
  • Loading branch information
Michael Brown committed Sep 28, 2008
1 parent e3c5507 commit 50dc934
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/arch/i386/firmware/pcbios/e820mangler.S
Expand Up @@ -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
Expand All @@ -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 */

Expand Down

0 comments on commit 50dc934

Please sign in to comment.