[SeaBIOS] [PATCH] Support more than one vga card
glommer at redhat.com
Wed May 4 02:41:48 CEST 2011
On Tue, 2011-05-03 at 19:58 -0400, Kevin O'Connor wrote:
> 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
how's that different in pci vs vgaroms/ ?
"Could cause a real machine to not boot" is true regardless.
> 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.
I know all that, and I agree about easiest. It took me a couple of
minutes to have it integrated into qemu that way. We, however, decided
that it made more sense to us to have it exposed as a pci device. So
easiness is not at stake here.
More information about the SeaBIOS