Page MenuHomeFreeBSD

Remove ThunderX PCIe FDT quirks from pci_host_generic_fdt.c

Authored by kd on May 10 2021, 11:06 AM.



ThunderX is the only board known to use them.
Move them to the ThunderX PCIe driver.

Test Plan

Boot a ThuderX board, verify that the network(vnic) still works.

Diff Detail

rG FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline


Is this function needed? It looks like we could move the RMAN_IS_DEFAULT_RANGE code to pci_host_generic_core_alloc_resource and just remove this.


We still need to call thunder_pcie_alloc_resource if no dts node was found.
Also the code under RMAN_IS_DEFAULT_RANGE condition is specific only to the quirk implemented in this diff, I'm not sure if we want it in the generic driver.
We could still call pci_host_generic_core_alloc_resource in order to avoid duplication of the address translation code.
I tried doing just that, but it didn't work.
On TX1 dts is provided directly by firmware.
It looks like we have two overlapping regions:
First: rman_reserve_resource_bound: <PCIe Memory> request: [0x87e005003800, 0x87e00500382f], length 0x30, flags 2, device thunder_mdio0
Then: rman_reserve_resource_bound: <PCIe Memory> request: [0x87e005000000, 0x87e0057fffff], length 0x800000, flags 0, device (null)

The second allocation causes rman_reserve_resource to fail.
Any thoughts?

This revision is now accepted and ready to land.May 26 2021, 12:29 PM