[SeaBIOS] [PATCH RFC 5/7] Add PMM memory allocation facilities for VGA option ROMs
kevin at koconnor.net
Wed Dec 21 04:57:05 CET 2011
On Tue, Dec 20, 2011 at 11:59:16AM +0000, Mark Marshall wrote:
> According to the bits of the PCI spec that I can find,
> the option ROM is copied into RAM which is left read-write
> while the initialisation vector is called, and the RAM is
> then set to read-only after this time. Does your VGA option
> ROM use this feature? Do you know of any other's that do?
Yes - the SeaBIOS vga rom will self modify. I've seen several other
option roms that self modify.
> (This is in the V2.1 and V3.0 PCI spec's. Also in at least
> the V3.0 PCI spec is says that the initialisation code is
> run in "big real mode", with 4G segments, do you know of
> any code that uses this feature?).
Yes - I've seen other option roms that only work when called in
big-real mode. SeaBIOS supports this. The SeaBIOS vga option rom
doesn't require it though.
> I'm interested in this because I wrote the OGP VGA BIOS
> (in 16-bit x86 ASM), a while ago now. A choice made for
> two reasons really: 1, I hadn't found SeaBIOS (And didn't
> know quite how well you could get gcc to produce 16-bit
> code), and 2, I really wanted to write a chunk of 16-bit
> assembler (this was a hobby, not work, so I felt I could
> make a crazy choice like that and get away with it).
> If I get a free afternoon, I will try to convert that code
> to use the SeaBIOS VGA framework. It's interesting to note
> that we have both implemented features that are not in the
> other's BIOS.
More information about the SeaBIOS