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

Gerd Hoffmann kraxel at redhat.com
Wed May 4 10:04:18 CEST 2011


On 05/03/11 23:44, 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.

You are talking about https://code.google.com/p/sgabios/?
/me wonders what pci device you are talking about?

This looks to be most useful for a headless system, i.e.
'qemu -nographic -vga none -optionrom sgabios.bin', then get the bios 
output (seaboot menu, pxe rom output, ...) on the serial line.

Note that seabios has serial line support already, although for debug 
purposes.  Might be easy to extend that without too much trouble to a 
full-blown serial console support, which would have the advantage that 
seabios could show stuff on both serial line and vga.

>> 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.

I fail to see why this requires seabios hackery.  And legacy rom is the 
only way when using a isa-serial line.

We could add a pci-serial emulation[1] and load sgabios using the pci 
rom bar of that device.

> But supporting multiple VGA cards is something we want anyway since I
> think Spice uses this to have multiple heads. Gerd?

The secondary qxl devices are a bit different.  They are not vga 
compatible.  They register as generic display class device.  They have 
no vga bios.  You need qxl guest drivers to drive them.

cheers,
   Gerd

[1] something like this ...

xeni kraxel ~/mockify# lspci -vs3.3
00:03.3 Serial controller: Intel Corporation 82G33/G31/P35/P31 Express 
Serial KT Controller (rev 02) (prog-if 02 [16550])
         Subsystem: Intel Corporation 82G33/G31/P35/P31 Express Serial 
KT Controller
         Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 17
         I/O ports at e000 [size=8]
         Memory at ffa79000 (32-bit, non-prefetchable) [size=4K]
         Capabilities: <access denied>
         Kernel driver in use: serial

xeni kraxel ~/mockify# grep 03.3 /var/log/dmesg
pci 0000:00:03.3: reg 10 io port: [0xe000-0xe007]
pci 0000:00:03.3: reg 14 32bit mmio: [0xffa79000-0xffa79fff]
serial 0000:00:03.3: PCI INT B -> GSI 17 (level, low) -> IRQ 17
0000:00:03.3: ttyS2 at I/O 0xe000 (irq = 17) is a 16550A

... should be doable with a just bit of pci plumbing for the existing 
serial emulation code.



More information about the SeaBIOS mailing list