summaryrefslogtreecommitdiff
path: root/src/devices/pci_rom.c
diff options
context:
space:
mode:
authorRoman Kononov <kononov@dls.net>2007-04-09 22:50:12 +0000
committerStefan Reinauer <stepan@openbios.org>2007-04-09 22:50:12 +0000
commitd6d7a1152c756a7e497536046bfb8619c8aa377b (patch)
tree547fbc416d5c4c9bf3a9cdc6218bc1cb2b00b1b1 /src/devices/pci_rom.c
parent4e5cc9dcd03ef8705e5db462229f24be0e3dce9a (diff)
downloadcoreboot-d6d7a1152c756a7e497536046bfb8619c8aa377b.tar.xz
This patch corrects r2587. It makes sure that the VGA is initialized
when CONFIG_CONSOLE_VGA==0 and CONFIG_PCI_ROM_RUN==1 Signed-off-by: Roman Kononov <kononov@dls.net> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2600 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices/pci_rom.c')
-rw-r--r--src/devices/pci_rom.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c
index 55225ea4ca..994c5256d6 100644
--- a/src/devices/pci_rom.c
+++ b/src/devices/pci_rom.c
@@ -62,10 +62,6 @@ struct rom_header * pci_rom_probe(struct device *dev)
static void *pci_ram_image_start = (void *)PCI_RAM_IMAGE_START;
-#if CONFIG_CONSOLE_VGA == 1 && CONFIG_CONSOLE_VGA_MULTI == 0
-extern device_t vga_pri; // the primary vga device, defined in device.c
-#endif
-
struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_header)
{
struct pci_data * rom_data;
@@ -86,15 +82,14 @@ 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) {
-#if CONFIG_CONSOLE_VGA == 1
- #if CONFIG_CONSOLE_VGA_MULTI == 0
+#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
- #endif
+#endif
printk_debug("copying VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n",
rom_header, PCI_VGA_RAM_IMAGE_START, rom_size);
memcpy(PCI_VGA_RAM_IMAGE_START, rom_header, rom_size);
return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START);
-#endif
} else {
printk_debug("copying non-VGA ROM Image from 0x%x to 0x%x, 0x%x bytes\n",
rom_header, pci_ram_image_start, rom_size);