Commit f110da99 authored by Bin Meng's avatar Bin Meng Committed by Simon Glass

pci: Disable expansion ROM address decoding when signature check fails

We should not leave the expansion ROM address window open when there
is not a valid ROM.
Suggested-by: default avatarMatt Porter <>
Signed-off-by: default avatarBin Meng <>
Tested-by: default avatarSimon Glass <>
Acked-by: default avatarSimon Glass <>
parent 6c89663c
......@@ -104,6 +104,10 @@ static int pci_rom_probe(pci_dev_t dev, uint class,
if (le16_to_cpu(rom_header->signature) != PCI_ROM_HDR) {
printf("Incorrect expansion ROM header signature %04x\n",
/* Disable expansion ROM address decoding */
pci_write_config_dword(dev, PCI_ROM_ADDRESS, rom_address);
return -EINVAL;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment