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>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@926 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Myles Watson 2008-10-14 12:27:23 +00:00
commit 0bc9279b49

View file

@ -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);
}