Patrick Rudolph (siro@das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14223
-gerrit
commit 149364945a64d9d8b290187c4226ef3500425fc2 Author: Patrick Rudolph siro@das-labor.org Date: Thu Mar 31 19:08:53 2016 +0200
device/pci_rom: support calling pci_rom_probe multiple times
Calling the function twice on the same device causes the rom_address to be of by one as the PCI_ROM_ADDRESS_ENABLE bit is set and not masked.
Mask the PCI_ROM_ADDRESS_ENABLE bit to always return the same rom address.
Change-Id: Iafd8824f66981a3ff08defcdc7ea7e9184fa102c Signed-off-by: Patrick Rudolph siro@das-labor.org --- src/device/pci_rom.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c index 56eafef..288a5f0 100644 --- a/src/device/pci_rom.c +++ b/src/device/pci_rom.c @@ -65,6 +65,7 @@ struct rom_header *pci_rom_probe(struct device *dev) uintptr_t rom_address;
rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS); + rom_address &= ~PCI_ROM_ADDRESS_ENABLE;
if (rom_address == 0x00000000 || rom_address == 0xffffffff) { #if CONFIG_BOARD_EMULATION_QEMU_X86