Re: [RFC] PCI: Unassigned Expansion ROM BARs

From: Bjorn Helgaas
Date: Fri Sep 25 2015 - 10:35:58 EST

On Thu, Sep 24, 2015 at 09:35:20PM -0700, Yinghai Lu wrote:
> On Thu, Sep 24, 2015 at 12:01 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> > Or do we want to keep a white list to say which device should have
> > ROM bar as mush have, and other is optional to have ?
> Subject: [RFC PATCH] PCI: Add pci_dev_need_rom_bar()
> Only set that for
> 1. if BIOS/firmware already set ROM bar.
> 2. via quirks for some devices.
> We assign those needed ROM bar as required
> and other ROM bars as optional resources.

I'd rather not have a whitelist if we can avoid it. We'd be
continually adding new devices to it, and it makes the system harder
to understand because there's no consistent rule about how ROMs are

Alex mentioned the idea of ripping the ROM, and I'd like to explore
that idea a little more. What if we could temporarily assign space
for the ROM during enumeration, read the contents, cache the contents
somewhere, then deallocate the actual BAR space? We could hang onto
the cache and give it to anybody who later needs the ROM.

I know there are probably issues here, but I don't know what they are,
so I'd like to at least have a conversation about it.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at