diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2015-04-09 17:20:16 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-04-11 14:36:59 -0400 |
commit | 0b2165d191f51ed2a522142c3ed3db55bc852627 (patch) | |
tree | 093520f9874c86a6c6d7ee39d568848dfc72f3fb /vgasrc/vgaentry.S | |
parent | 799b20b0db45891845e2d820368a66af538d5664 (diff) | |
download | seabios-0b2165d191f51ed2a522142c3ed3db55bc852627.tar.gz |
vgabios: Emulate "leal" instruction
Emulate the "leal" instruction so that the vgabios can run on older
versions of x86emu. (This removes the previous "leal" trap.)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/vgaentry.S')
-rw-r--r-- | vgasrc/vgaentry.S | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/vgasrc/vgaentry.S b/vgasrc/vgaentry.S index 7ca550de..53be2b38 100644 --- a/vgasrc/vgaentry.S +++ b/vgasrc/vgaentry.S @@ -45,33 +45,11 @@ _rom_header_signature: * Entry points ****************************************************************/ - // Force a fault if found to be running on broken x86emu versions. - DECLFUNC x86emu_fault -msg: .ascii "SeaVGABIOS: x86emu leal trap!\n" -x86emu_fault: -#if CONFIG_DEBUG_IO - movw %cs:DebugOutputPort, %dx - movw $msg, %si -1: movb %cs:(%si), %al - outb %al, (%dx) - incw %si - cmpw $x86emu_fault, %si - jl 1b -#endif -1: hlt - jmp 1b - // This macro implements a call while avoiding instructions // that old versions of x86emu have problems with. .macro VGA_CALLL cfunc #if CONFIG_VGA_FIXUP_ASM - // Make sure leal instruction works. - movl $0x8000, %ecx - leal (%ecx, %ecx, 1), %ecx - cmpl $0x10000, %ecx - jne x86emu_fault - // Use callw instead of calll - push %ax + pushw %ax callw \cfunc #else calll \cfunc |