diff options
author | Mark Marshall <mark.marshall@csr.com> | 2009-11-05 08:10:12 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-11-05 08:10:12 +0000 |
commit | 2fa7c2e210dc685d091c8bbb4012c91b80fc0a81 (patch) | |
tree | 7d574fb52bbf9129add42da101f0a749bf6858d5 | |
parent | 5fc7f98c51b898a6b584b360be6072cc5f49b44d (diff) |
When loading an option ROM use the class stored in the device to
decide whether the option ROM is a special VGA type.
An S3 card that I've got has the wrong class in the VGA BIOS.
(A Stealth 64 DRAM T PCI, from 1994 - BIOS V2.02)
Signed-off-by: Mark Marshall <mark.marshall@csr.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4909 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | src/devices/pci_rom.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c index f64a9e8c55..cafeed4897 100644 --- a/src/devices/pci_rom.c +++ b/src/devices/pci_rom.c @@ -116,7 +116,10 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade rom_size = rom_header->size * 512; - if (PCI_CLASS_DISPLAY_VGA == rom_data->class_hi) { + // We check to see if the device thinks it is a VGA device not + // whether the ROM image is for a VGA device because some + // devices have a mismatch between the hardware and the ROM + if (PCI_CLASS_DISPLAY_VGA == (dev->class >> 8)) { #if CONFIG_CONSOLE_VGA == 1 && CONFIG_CONSOLE_VGA_MULTI == 0 extern device_t vga_pri; // the primary vga device, defined in device.c if (dev != vga_pri) return NULL; // only one VGA supported |