[coreboot] r1072 - coreboot-v3/device

svn at coreboot.org svn at coreboot.org
Tue Dec 16 19:32:01 CET 2008


Author: myles
Date: 2008-12-16 19:32:01 +0100 (Tue, 16 Dec 2008)
New Revision: 1072

Modified:
   coreboot-v3/device/pci_rom.c
Log:
This patch cleans up a little whitespace and makes the ID mismatch error more
verbose in pci_rom.c.  Suggested by Pattrick on the list.  Trivial.

Signed-off-by: Myles Watson <mylesgw at gmail.com>
Acked-by: Myles Watson <mylesgw at gmail.com>



Modified: coreboot-v3/device/pci_rom.c
===================================================================
--- coreboot-v3/device/pci_rom.c	2008-12-11 06:33:29 UTC (rev 1071)
+++ coreboot-v3/device/pci_rom.c	2008-12-16 18:32:01 UTC (rev 1072)
@@ -46,7 +46,7 @@
 		 */
 		init_archive(&archive);
 		sprintf(pcifile, "pci%04x,%04x.rom", dev->id.pci.vendor,
-				dev->id.pci.device);
+			dev->id.pci.device);
 
 		ret = find_file(&archive, pcifile, &result);
 		if (ret) {
@@ -100,21 +100,22 @@
 	/* checksum */
 	rom_bytes = (unsigned char *)rom_address;
 	for (i = 0; i < rom_header->size * 512; i++)
-	    sum += *(rom_bytes + i);
+		sum += *(rom_bytes + i);
 
 	if (sum != 0)
-		printk(BIOS_ALERT, "Incorrent Expansion ROM checksum (%02x != 0)\n", sum);
+		printk(BIOS_ALERT, "Expansion ROM checksum %02x != 0!\n", sum);
 
 	rom_data = (struct pci_data *)((unsigned char *)rom_header +
 				       le32_to_cpu(rom_header->data));
 
 	printk(BIOS_SPEW, "PCI ROM Image, @%p, Vendor %04x, Device %04x,\n",
-		&rom_data->vendor,
-	       rom_data->vendor, rom_data->device);
-	if (dev->id.pci.vendor != rom_data->vendor || dev->id.pci.device != rom_data->device) {
-		printk(BIOS_ERR,
-		       "Device or Vendor ID mismatch Vendor %04x, Device %04x\n",
+	       &rom_data->vendor, rom_data->vendor, rom_data->device);
+	if (dev->id.pci.vendor != rom_data->vendor ||
+	    dev->id.pci.device != rom_data->device) {
+		printk(BIOS_ERR, "ROM ID mismatch: Vendor %04x, Device %04x\n",
 		       rom_data->vendor, rom_data->device);
+		printk(BIOS_ERR, "Expected: Vendor %04x, Device %04x\n",
+		       dev->id.pci.vendor, dev->id.pci.device);
 		return NULL;
 	}
 





More information about the coreboot mailing list