[SeaBIOS] [PATCH 0/7] vgabios runtime hardware detection

Kevin O'Connor kevin at koconnor.net
Wed Feb 8 02:58:26 CET 2012


On Tue, Feb 07, 2012 at 11:20:27AM +0100, Gerd Hoffmann wrote:
> On 02/07/12 01:38, Kevin O'Connor wrote:
> > Thinking about this further, if multiple drivers are compiled in, I'm
> > not sure what we'd set the vendorid/deviceid in the PCI header to.
> > This isn't an issue for qemu as it modifies the rom to match the ids
> > when deploying it.  However, on coreboot, seabios wont run the rom
> > unless the ids match.  So, should a geode user select both geode
> > types, it wont actually work.  I'm not sure how to fix that.
> 
> We could keep the kconfig select, so only one item is selectable, and
> introduce a CONFIG_VGA_QEMU as option which builds a vgabios with
> cirrus+bochs support & runtime hardware detection.

I was thinking about that as well.  It's possible to build a new
"virtual" qemu vga device type that just calls the bochs/cirrus
functions as needed.  However, I do wonder if just a little build
magic is what's called for here - see the patch below for an example.

> One wouldn't be able to build a pure cirrus / bochs bios then. I don't
> think this is an issue as I don't think they are used outside qemu.
> bochs is sort-of paravirtual anyway, and I doubt anyone runs a cirrus
> bios on non-virtual hardware ...

The bochsvga/cirrus code is purely for bochs/qemu/kvm/xen.  Running on
real hardware could cause bad things to happen.  Kconfig should
probably reflect this.

-Kevin


--- /dev/null   2011-10-15 16:04:45.388999735 -0400
+++ tools/build-qemu-vgaroms.sh 2012-02-07 20:46:13.000000000 -0500
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Script to build the vgaroms that qemu uses
+
+mkdir -p out/
+cp .config out/config-BACKUP
+
+cat > .config <<EOF
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_CIRRUS=y
+EOF
+make oldnoconfig
+make out/vgabios.bin
+cp out/vgabios.bin out/vgabios-cirrus.bin
+
+cat > .config <<EOF
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_BOCHS=y
+EOF
+make oldnoconfig
+make out/vgabios.bin
+cp out/vgabios.bin out/vgabios-stdvga.bin
+cp out/vgabios.bin out/vgabios-vmware.bin
+cp out/vgabios.bin out/vgabios-qxl.bin
+
+cp out/config-BACKUP .config



More information about the SeaBIOS mailing list