Re: [PATCH v3] PCI: Fix BAR resize for devices on a root bus
Liz Fong-Jones <[email protected]> Sat, 01 Aug 2026 00:43:45 +0000 (UTC)
| Newsgroups | org.freedesktop.lists.amd-gfx,dev.linux.lists.regressions,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
> I guess this must be the drivers/pci/controller/mobiveil/pcie-layerscape-gen4.c > driver. Close, but not in this configuration -- that driver binds on the U-Boot/devicetree variant of this platform. This machine runs the UEFI/ACPI firmware variant (EDK II), where each PCIe controller is exposed as a plain PNP0A08 host bridge with standard ECAM (MCFG OEM "NXP LX2160", 2 entries, one per segment), so it goes through the generic ACPI ECAM path with no controller-specific driver and no MCFG quirk. > so the GPU is on bus 01, which isn't a nice round bus number like > root buses usually are. The typical thing would be a root port on > bus 00 with a secondary bus 01, and amdgpu being on that bus 01. The firmware genuinely declares the root bus as 01: the host bridge _CRS bus range is [bus 01-ff], there is no bus 00 in the segment at all, and no root port device is visible anywhere -- the endpoint is enumerated directly on the root bus. Both segments follow the same pattern (NVMe on 0002:01:00.0, GPU on 0004:01:00.0). I'll defer to Jon (CC'd) on why the firmware hides the root port, but the OS-visible topology is unambiguous. > Can you share a dmesg log? Relevant excerpt below; happy to send the full log off-list or attach to the Launchpad bug. Note this boot is running with the amdgpu.rebar=0 workaround on a 7.0.0-28 distro kernel, so amdgpu initializes successfully (on the native 256MB BAR) -- the host bridge and topology enumeration is identical on the boots that fail. ACPI: MCFG 0x00000000EBE28E98 00004C (v01 NXP LX2160 000000FF INTL 20151124) ... ACPI: MCFG table detected, 2 entries ... ACPI: PCI Root Bridge [PCI0] (domain 0002 [bus 01-ff]) acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC] acpi PNP0A08:00: ECAM area [mem 0x9000100000-0x900fffffff] reserved by PNP0C02:00 acpi PNP0A08:00: ECAM at [mem 0x9000100000-0x900fffffff] for [bus 01-ff] PCI host bridge to bus 0002:01 pci_bus 0002:01: root bus resource [mem 0x9040000000-0x90ffffffff window] (bus address [0x40000000-0xffffffff]) pci_bus 0002:01: root bus resource [mem 0x9400000000-0x97ffffffff window] pci_bus 0002:01: root bus resource [io 0x0000-0xffff window] pci_bus 0002:01: root bus resource [bus 01-ff] pci 0002:01:00.0: [144d:a808] type 00 class 0x010802 PCIe Endpoint pci 0002:01:00.0: BAR 0 [mem 0x9400000000-0x9400003fff 64bit] pci 0002:01:00.0: BAR 0 [mem 0x9400000000-0x9400003fff 64bit]: assigned ACPI: PCI Root Bridge [PCI1] (domain 0004 [bus 01-ff]) acpi PNP0A08:01: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3] acpi PNP0A08:01: _OSC: OS now controls [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC] acpi PNP0A08:01: ECAM area [mem 0xa000100000-0xa00fffffff] reserved by PNP0C02:00 acpi PNP0A08:01: ECAM at [mem 0xa000100000-0xa00fffffff] for [bus 01-ff] PCI host bridge to bus 0004:01 pci_bus 0004:01: root bus resource [mem 0xa040000000-0xa0ffffffff window] (bus address [0x40000000-0xffffffff]) pci_bus 0004:01: root bus resource [mem 0xa400000000-0xa7ffffffff window] pci_bus 0004:01: root bus resource [io 0x10000-0x1ffff window] (bus address [0x0000-0xffff]) pci_bus 0004:01: root bus resource [bus 01-ff] pci 0004:01:00.0: [1002:6981] type 00 class 0x030000 PCIe Legacy Endpoint pci 0004:01:00.0: BAR 0 [mem 0xa400000000-0xa40fffffff 64bit pref] pci 0004:01:00.0: BAR 2 [mem 0xa410000000-0xa4101fffff 64bit pref] pci 0004:01:00.0: BAR 4 [io 0x10000-0x100ff] pci 0004:01:00.0: BAR 5 [mem 0xa046000000-0xa04603ffff] pci 0004:01:00.0: ROM [mem 0xa0fffe0000-0xa0ffffffff pref] pci 0004:01:00.1: [1002:aae0] type 00 class 0x040300 PCIe Legacy Endpoint pci 0004:01:00.1: BAR 0 [mem 0xa410200000-0xa410203fff 64bit] pci 0004:01:00.0: BAR 0 [mem 0xa400000000-0xa40fffffff 64bit pref]: assigned pci 0004:01:00.0: BAR 2 [mem 0xa410000000-0xa4101fffff 64bit pref]: assigned pci 0004:01:00.0: BAR 5 [mem 0xa040000000-0xa04003ffff]: assigned pci 0004:01:00.0: ROM [mem 0xa040040000-0xa04005ffff pref]: assigned pci 0004:01:00.1: BAR 0 [mem 0xa410200000-0xa410203fff 64bit]: assigned pci 0004:01:00.0: BAR 4 [io 0x10000-0x100ff]: assigned pci_bus 0004:01: resource 4 [mem 0xa040000000-0xa0ffffffff window] pci_bus 0004:01: resource 5 [mem 0xa400000000-0xa7ffffffff window] pci_bus 0004:01: resource 6 [io 0x10000-0x1ffff window]