[SeaBIOS] [PATCH] Support more than one vga card

Glauber Costa glommer at redhat.com
Wed May 4 00:41:59 CEST 2011


On Wed, 2011-05-04 at 00:31 +0200, Sebastian Herbszt wrote:
> Glauber Costa wrote:
> > On Wed, 2011-05-04 at 00:02 +0200, Sebastian Herbszt wrote:
> >> Anthony Liguori wrote:
> >> > On 05/03/2011 03:23 PM, Sebastian Herbszt wrote:
> >> >> 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.
> >> >>
> >> >> Can't SGAbios be loaded as an option rom without this change?
> >> > 
> >> > But then you're loading it as a legacy ROM which is fairly ugly and 
> >> > requires additional SeaBIOS hackery.
> >> 
> >> Why is this ugly and which additional hackery does it need?
> >> SGAbios is a legacy ROM; the PNP header is disabled and there is no PCIR.
> > 
> > It is, but does not need to be (I've also patched sgabios to include a
> > PCIR). Since it is a device, it is nice to have it plugged it to a bus.
> > If for nothing else, for discovering capabilities - A guest using
> > sgabios this way is now aware that it has a double-head system.
> 
> I don't think "it is a device", more likely a functionality. SGAbios doesn't add a new
> device/hardware to the system.

This depends on how you model it. One can think that this functionality
is achieved by hooking a device into the system. "Hooking a device" is
how most functionality is achieved in real systems anyway.

> Do you plan to add a new (emulated) PCI device and deploy SGAbios thru its BAR?
Yes
> Do you plan to add support for "Google Memory Console"?
No.

> 
> > Also, let us not focus only in the specifics: Having two pci vga cards
> > is a real possibility, there's even a use case for that, as anthony
> > mentioned.
> 
> If you call the init function of two vga roms, will the last one win and hook int 10h?

Yes.

And this is totally orthogonal to whether it is loaded as a pci device,
or in vgaroms/
The statement is true for both methods.

In the specific case of sgabios, it chains the int10h calls to whatever
was there before, which is, IMHO, a very sane thing.

> Sebastian
> 





More information about the SeaBIOS mailing list