[SeaBIOS] RFC: Primary VGA

Kevin O'Connor kevin at koconnor.net
Thu Feb 28 02:11:14 CET 2013


On Wed, Feb 27, 2013 at 02:16:23PM -0700, Alex Williamson wrote:
> 
> When we start adding root ports and bridges to systems we need some
> concept of a primary VGA device.The differentiation of the primary
> device is that it's the default one that responds to the Legacy VGA
> address ranges.  PCs often have a BIOS selection for this.  
> 
> Seabios already seems to have some concept of this and looks for a VGA
> class device for which the parent devices all have VGA routing enabled.
> This seems to work today if QEMU initializes VGA routing for the path it
> considers the primary.
> 
> The first question is whether this bridge path pre-configuration is what
> we want to keep as the way QEMU communicates the primary VGA device to
> Seabios?  Obviously we could switch to some kind of fwcfg interface, but
> I tend to think what we have is sufficient.

SeaBIOS uses the VGA PCI routing information to determine which option
rom to run.  However, it doesn't actually initialize the VGA PCI
routing in it's PCI initialization code (pciinit.c).  This isn't an
issue for the default QEMU setup because QEMU does not place the VGA
card behind a bus.  However, should QEMU support multiple VGA cards
and/or VGA cards behind a bus, then the PCI init code would likely
need to handle VGA setup.  (I suppose QEMU could setup the bus
forwarding of the legacy VGA ranges, but it would seem ugly to have
SeaBIOS do most of the PCI init while QEMU did this small part.)

-Kevin



More information about the SeaBIOS mailing list