From 479ca87df3a47bb5dadd0b7772d68d9b7c2467d7 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Thu, 24 Apr 2008 20:45:57 +0000 Subject: [PATCH] Fix vga initialization for qemu virtual graphics adapter. Signed-off-by: Stefan Reinauer Acked-by: Myles Watson git-svn-id: svn://coreboot.org/repository/coreboot-v3@666 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- device/pci_rom.c | 8 +++++++- mainboard/emulation/qemu-x86/vga.c | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/device/pci_rom.c b/device/pci_rom.c index 2107ee9605..f96d3fab6d 100644 --- a/device/pci_rom.c +++ b/device/pci_rom.c @@ -61,7 +61,13 @@ struct rom_header *pci_rom_probe(struct device *dev) 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) { diff --git a/mainboard/emulation/qemu-x86/vga.c b/mainboard/emulation/qemu-x86/vga.c index 2b5f06692f..41e1fd0620 100644 --- a/mainboard/emulation/qemu-x86/vga.c +++ b/mainboard/emulation/qemu-x86/vga.c @@ -33,7 +33,6 @@ static void setup_onboard(struct device *dev) printk(BIOS_INFO, "Init VGA device\n"); - dev->on_mainboard = 1; dev->rom_address = 0xc0000; /*