[SeaBIOS] [PATCH 0/3] Support 32bit PCI BIOS calls
Kevin O'Connor
kevin at koconnor.net
Tue Dec 29 04:07:01 CET 2009
This patch series adds support for 32bit PCI BIOS calls to SeaBIOS.
Currently, the SeaBIOS binary is composed of two big chunks of data -
the 16bit code (irq handlers) and the 32bit "flat mode" code (post and
boot). This patch adds a third chunk for 32bit segmented code. This
new code chunk uses explicit segment memory accesses like the 16bit
code does, but is compiled in 32bit mode.
I ran into one unexpected complication with this support - the PCI
BIOS functions need to support position independent code, as the code
and data segment base can vary. Unfortunately, using GCC's -fpic
option doesn't work, because that also implies building a GOT/PLT
which isn't desired and conflicts with segment accesses. To work
around the issue, I reserve %ebx in the 32bit segmented code as a base
offset and make sure all global variable accesses are relative to it.
There are three patches - much of it is just renames to support the
new code chunk.
-Kevin
More information about the SeaBIOS
mailing list