Re: [RFC] PCI: Unassigned Expansion ROM BARs

From: Daniel J Blueman
Date: Sat Sep 26 2015 - 02:50:42 EST


On Thursday, September 24, 2015 at 10:50:07 AM UTC+8, Myron Stowe wrote:
> I've encountered numerous bugzilla reports related to platform BIOS' not
> programming valid values into a PCI device's Type 0 Configuration space
> "Expansion ROM Base Address" field (a.k.a. Expansion ROM BAR). The main
> observed consequence being 'dmesg' entries like the following that get
> customers excited enough to file reports against the kernel.

PCI option ROMs legitimately hold real-mode/EFI code needed to
initialise devices; the problem is, we can't guarantee that the BIOS
has initialised all devices with the option ROM code, so linux must
ensure they are correctly accessible.

In addition to VMs as Alex points out, hotplug (eg Thunderbold GPUs)
and PCI domains which may not be visible to the BIOS at early boot,
may need the option ROM. Nvidia GPUs primarily have had a lot of
encoder/connector (HDCP?) and product-specific voltage-frequency setup
code and tables in the ROM.

As such, in my NumaConnect open firmware which maps the PCI domains of
multiple servers into one, I have to also reallocate PCI option ROMs
[1] to guarantee GPU VBIOS execution in linux. That said, option ROMs
are a dying trend in favour of shipped binary blobs and open-coded
initialisation for cross-platform support, and there are only 10 users
of pci_map_rom().

Thanks,
Daniel

[1] https://github.com/numascale/nc-utils/blob/master/bootloader/dnc-mmio.c
--
Daniel J Blueman
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/