[Bug 297536] sys/arm64/marvell: pci_advk driver regression on 16-CURRENT - failed to allocate bus number (ENXIO)

[email protected]
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297536

            Bug ID: 297536
           Summary: sys/arm64/marvell: pci_advk driver regression on
                    16-CURRENT - failed to allocate bus number (ENXIO)
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: arm
          Assignee: [email protected]
          Reporter: [email protected]

Host Architecture: arm64 (aarch64)
SoC / Platform: Marvell Armada 3700 (Cortex-A53)
Regression: Yes (Functional on older branches/stable, broken on modern
stable/current)

[Overview]
An architectural regression exists within the Marvell Aardvark PCIe host bridge
controller driver (sys/arm64/marvell/pci_advk.c). While the parent controller
handles early hardware initialization, it fails during the Newbus child
attachment phase. The OFW PCI coordinator is unable to provision logical bus
resources to pci0, causing a complete failure to map the PCIe bus lanes. Any
downstream devices connected to the mPCIe/M.2 slot (such as Wi-Fi or NVMe
cards) are rendered completely invisible to the kernel.

[Dmesg / Boot Log Output]
pcib0: <Marvell Armada 3700 PCIe Bus Controller> mem 0xd0070000-0xd008ffff irq
5 on simplebus0
pcib0: link up
pci0: <OFW PCI bus> on pcib0
pci0: failed to allocate bus number
device_attach: pci0 attach returned 6

[Technical Analysis]
1. The hardware link layer successfully initializes and registers state changes
("pcib0: link up").
2. The failure occurs immediately afterward during `pci0_attach` inside the
Open Firmware PCI mapping layer.
3. The kernel returns error code 6 (ENXIO - Device not configured / No such
device or address). 
4. This points to a failure inside the driver's resource allocation mechanics
(advk_pcie_alloc_resource). The child `pci0` bus requests logical
identification number ranges via `SYS_RES_BUS`, but the host controller fails
to satisfy the resource allocation constraints imposed by modern FreeBSD
framework tracking rules. 

[Steps to Reproduce]
1. Install recent FreeBSD stable/14 or CURRENT on an Armada 3700 platform with
an active physical device populated in the mPCIe/M.2 slot.
2. Observe the early boot logs. The host bridge controller drops the child
attachment process immediately upon scanning the active lane.

[Expected Behavior]
The host bridge allocator should correctly catch the SYS_RES_BUS allocation
request, map the logical bus range via rman, return 0 (Success) to the Newbus
attachment loop, and enumerate the child devices on the bus.
[Note on Versions]

This hardware configuration attached and functioned perfectly under FreeBSD
14-based baselines. The allocation failure only began occurring after upstream
framework changes were pulled into the 16-CURRENT branch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.