[SeaBIOS] [PATCH] Support more than one vga card
kevin at koconnor.net
Wed May 4 01:58:32 CEST 2011
On Tue, May 03, 2011 at 01:49:57PM -0300, Glauber Costa wrote:
> It is theorectically possible for a system to have more than
> one pci vga card. In particular, I am interested in the use of SGAbios
> as a pci device, alongside of a normal vga bios in QEMU.
> This patch makes seabios continue searching the pci range looking for
> vga cards, even if it finds one. The first card to be found is assigned
> to VGAbdf, being the main one. The others, just have their initializatiom
> roms called and are listed in the pci bus.
My understanding is that in a machine with multiple VGA devices only
one vga device is setup to forward the legacy VGA IO ranges over PCI,
and only that device should have its option ROM executed.
My understanding is that running the vga option roms for all vga
devices would be incorrect and could cause a real machine to not boot
The pci_find_vga() function attempts to find the VGA device with the
legacy VGA ranges setup in PCI. It should only return one device
regardless of the number of times it is called.
If you're looking to run an option ROM, the easiest way is to pass it
through fw_cfg with a name prefix of "vgaroms/". SeaBIOS will then
execute the ROM in addition to any found vga roms. One can put any
number of roms in the "vgaroms/" directory.
Also sgabios doesn't need its own device - it works fine when run
after the normal VGA bios is run. It forwards the output through
serial, and then calls the regular VGA bios' int 10 handler. (It's
used on coreboot - see
More information about the SeaBIOS