As of rev 657, the VGA ROM in QEMU doesn't get run. Looking at the
code that was changed in device/pci_rom.c it looks like the problem is
that the VGA card is being treated like an onboard device, but the ROM
is not in the LAR.
Oops. The Qemu VGA adapter was hardcoded to be an onboard device. Also,
reading PCI_ROM_ADDRESS does not seem to give a useful value for that
device, so we need to leave the dev->rom_address entry intact.
See patch.
--
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info@coresystems.de •
http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
Fix vga initialization for qemu virtual graphics adapter.
Signed-off-by: Stefan Reinauer
stepan@coresystems.de
Index: mainboard/emulation/qemu-x86/vga.c
===================================================================
--- mainboard/emulation/qemu-x86/vga.c (revision 665)
+++ mainboard/emulation/qemu-x86/vga.c (working copy)
@@ -33,7 +33,6 @@
printk(BIOS_INFO, "Init VGA device\n");
- dev->on_mainboard = 1;
dev->rom_address = 0xc0000;
/*
Index: device/pci_rom.c
===================================================================
--- device/pci_rom.c (revision 665)
+++ device/pci_rom.c (working copy)
@@ -61,7 +61,13 @@
rom_address = 0xc0000;
} else {
- rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS);
+ if (dev->rom_address) {
+ /* Override in place? */
+ rom_address = dev->rom_address;
+ } else {
+ rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS) & 0xfffffffe;
+ }
+
}
if (rom_address == 0x00000000 || rom_address == 0xffffffff) {