Author: myles Date: 2008-10-14 14:27:23 +0200 (Tue, 14 Oct 2008) New Revision: 926
Modified: coreboot-v3/device/pci_rom.c Log: Because the enable bit was masked off, checking for 0xffffffff didn't work. This patch changes the place where the bit is masked. The other way to fix it would be to check for 0xfffffffe.
V2 doesn't seem to have the problem.
Signed-off-by: Myles Watson mylesgw@gmail.com Acked-by: Ronald G. Minnich rminnich@gmail.com
Modified: coreboot-v3/device/pci_rom.c =================================================================== --- coreboot-v3/device/pci_rom.c 2008-10-14 10:14:06 UTC (rev 925) +++ coreboot-v3/device/pci_rom.c 2008-10-14 12:27:23 UTC (rev 926) @@ -65,7 +65,7 @@ /* Override in place? */ rom_address = dev->rom_address; } else { - rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS) & 0xfffffffe; + rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS); }
} @@ -74,6 +74,8 @@ return NULL; }
+ rom_address = rom_address & ~PCI_ROM_ADDRESS_ENABLE; + printk(BIOS_DEBUG, "ROM address for %s = %lx\n", dev_path(dev), rom_address);
@@ -94,7 +96,7 @@ le32_to_cpu(rom_header->signature)); return NULL; } - + /* checksum */ rom_bytes = (unsigned char *)rom_address; for (i = 0; i < rom_header->size * 512; i++) @@ -166,7 +168,7 @@ return NULL; // Only one VGA supported. #endif if (rom_header != (void *)PCI_VGA_RAM_IMAGE_START) { - printk(BIOS_DEBUG, "Copying VGA ROM image from %p to 0x%x, 0x%x bytes\n", + printk(BIOS_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); }