[coreboot] [v2] r4353 - trunk/coreboot-v2/src/devices

svn at coreboot.org svn at coreboot.org
Tue Jun 9 16:44:37 CEST 2009


Author: rminnich
Date: 2009-06-09 16:44:37 +0200 (Tue, 09 Jun 2009)
New Revision: 4353

Modified:
   trunk/coreboot-v2/src/devices/pci_rom.c
Log:
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 at gmail.com>
   
Acked-by: Stefan Reinauer <stepan at coresystems.de>



Modified: trunk/coreboot-v2/src/devices/pci_rom.c
===================================================================
--- trunk/coreboot-v2/src/devices/pci_rom.c	2009-06-08 13:05:47 UTC (rev 4352)
+++ trunk/coreboot-v2/src/devices/pci_rom.c	2009-06-09 14:44:37 UTC (rev 4353)
@@ -55,7 +55,7 @@
 		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 @@
 		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);
 	}
 





More information about the coreboot mailing list