diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2009-06-09 14:44:37 +0000 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2009-06-09 14:44:37 +0000 |
commit | a88db7bb870c8a6884da30e827e886cd26355e96 (patch) | |
tree | 3992a80b32897af60a61b9220561de9632c7a23b /src | |
parent | e8c6f86b80efbb90a7f708aded55f5a6032df8a5 (diff) |
Fix a little white space issue. Also, don't copy the rom image
if it is already in its correct location.
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4353 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/pci_rom.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c index df2adb2868..f188bc7d1e 100644 --- a/src/devices/pci_rom.c +++ b/src/devices/pci_rom.c @@ -55,7 +55,7 @@ struct rom_header * pci_rom_probe(struct device *dev) rom_address = dev->rom_address; printk_debug("On mainboard, rom address for %s = %lx\n", dev_path(dev), rom_address); - } else { + } else { rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS); printk_debug("On card, rom address for %s = %lx\n", dev_path(dev), rom_address); @@ -126,9 +126,11 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade extern device_t vga_pri; // the primary vga device, defined in device.c if (dev != vga_pri) return NULL; // only one VGA supported #endif - printk_debug("copying VGA ROM Image from %p to 0x%x, 0x%x bytes\n", + if ((void *)PCI_VGA_RAM_IMAGE_START != rom_header) { + printk_debug("copying VGA ROM Image from %p to 0x%x, 0x%x bytes\n", rom_header, PCI_VGA_RAM_IMAGE_START, rom_size); - memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); + memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); + } return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START); } |