diff options
author | Michael Brown | 2011-10-25 16:48:20 +0200 |
---|---|---|
committer | Michael Brown | 2011-10-25 17:05:02 +0200 |
commit | c77aece36a0085f1d7da6ca2b9f6c1234ddceb3b (patch) | |
tree | 27ffb46f8b28dbec48cd2748bcb9a0f864b1eb84 /src/arch | |
parent | [librm] Avoid (harmless) collisions with linker symbols (diff) | |
download | ipxe-c77aece36a0085f1d7da6ca2b9f6c1234ddceb3b.tar.gz ipxe-c77aece36a0085f1d7da6ca2b9f6c1234ddceb3b.tar.xz ipxe-c77aece36a0085f1d7da6ca2b9f6c1234ddceb3b.zip |
[liba20] Preserve all non-segment registers when calling INT 15,2401
Some BIOSes are reported to corrupt %ebx when using INT 15,2401 (see
http://opensolaris.org/jive/thread.jspa?messageID=377026). Guard
against this by preserving all (non-segment) registers.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/i386/transitions/liba20.S | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/arch/i386/transitions/liba20.S b/src/arch/i386/transitions/liba20.S index 594d6201..a60f1a54 100644 --- a/src/arch/i386/transitions/liba20.S +++ b/src/arch/i386/transitions/liba20.S @@ -96,8 +96,11 @@ test_a20_long: .section ".text16.early", "awx", @progbits .code16 enable_a20_bios: - /* Preserve registers */ - pushw %ax + + /* Preserve registers. Be very paranoid, since some BIOSes + * are reported to clobber %ebx + */ + pushal /* Attempt INT 15,2401 */ movw $0x2401, %ax @@ -108,7 +111,7 @@ enable_a20_bios: call test_a20_short 99: /* Restore registers and return */ - popw %ax + popal ret .size enable_a20_bios, . - enable_a20_bios |