From 0bc9279b4966668e719b520be072d072666bc607 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Tue, 14 Oct 2008 12:27:23 +0000 Subject: [PATCH] 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 Acked-by: Ronald G. Minnich git-svn-id: svn://coreboot.org/repository/coreboot-v3@926 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- device/pci_rom.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/device/pci_rom.c b/device/pci_rom.c index eac2a8b2ff..f8e91a7590 100644 --- a/device/pci_rom.c +++ b/device/pci_rom.c @@ -65,7 +65,7 @@ struct rom_header *pci_rom_probe(struct device *dev) /* 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 @@ struct rom_header *pci_rom_probe(struct device *dev) 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 @@ struct rom_header *pci_rom_probe(struct device *dev) 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 @@ struct rom_header *pci_rom_load(struct device *dev, 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); }