[SeaBIOS] [PATCH 0/3] Emulate "leal" instruction to workaround x86emu bugs

Kevin O'Connor kevin at koconnor.net
Fri Apr 10 17:07:11 CEST 2015


This series extends the existing "vgafixup.py" assembler patching
mechanism to also patch out the "leal" instruction that old versions
of x86emu don't support.  With this series in place, fc11 and fc12 can
now boot into graphics when using qemu with "std" vga.

Because the assembler munging is getting a bit complicated, the first
patch adds a compile time option to disable all of it.  This allows
one to build the vgabios without any of the workarounds.

The out-of-line emulate_leal function does have a bit of overhead -
one x86 instruction is replaced with over 20 instructions.  The last
patch in the series optimizes the common case so that most leal
instructions are replaced with only 4-6 instructions.

Also at:
  https://github.com/KevinOConnor/seabios/tree/testing

-Kevin


Kevin O'Connor (3):
  vgabios: Add config option for assembler fixups
  vgabios: Emulate "leal" instruction
  vgabios: Optimize leal instruction fixup

 Makefile            | 21 +++++++++---------
 scripts/vgafixup.py | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 vgasrc/Kconfig      | 10 +++++++++
 vgasrc/vgaentry.S   | 49 +++++++++++++++++++++++-------------------
 4 files changed, 107 insertions(+), 35 deletions(-)

-- 
1.9.3




More information about the SeaBIOS mailing list