Comment 79 for bug 1860284

Revision history for this message
In , bjorn (bjorn-linux-kernel-bugs) wrote :

From the dmesg log in https://bugzilla.kernel.org/attachment.cgi?id=287483,

  BIOS-e820: [mem 0x000000004bc50000-0x00000000cfffffff] reserved
  pci_bus 0000:00: root bus resource [mem 0x65400000-0xbfffffff window]
  pci 0000:00:07.1: PCI bridge to [bus 2b-54]
  pci 0000:00:07.1: bridge window [mem 0x66000000-0x721fffff]
  # add dock
  pcieport 0000:00:07.1: pciehp: Slot(0-1): Card present
  pcieport 0000:00:07.1: pciehp: Slot(0-1): Link Up
  pci 0000:2b:00.0: BAR 14: no space for [mem size 0x0c200000]

From the log in https://bugzilla.kernel.org/attachment.cgi?id=287665, which includes the patch in https://bugzilla.kernel.org/attachment.cgi?id=287661 to "not exclude EFI MMIO regions":

  pci 0000:2b:00.0: BAR 14: assigned [mem 0x66000000-0x721fffff]

The 00:07.1 bridge window was the same in both cases, so the same space is available on bus 2b. I think the reason the first one failed even though the space was available was because the entire MMIO aperture was marked "reserved" in E820, so PCI avoids assigning space from it. The patch basically avoids that E820 checking if the region is EfiMemoryMappedIO.

The patch https://git.kernel.org/linus/d341838d776a ("x86/PCI: Disable E820 reserved region clipping via quirks") appeared in v5.19 and should work around this problem for this machine and others.