Page MenuHomeFreeBSD

Remove ThunderX PCIe FDT quirks from pci_host_generic_fdt.c
ClosedPublic

Authored by kd on May 10 2021, 11:06 AM.
Tags
None
Referenced Files
F108515631: D30179.id90591.diff
Sat, Jan 25, 7:48 PM
Unknown Object (File)
Fri, Jan 24, 5:40 PM
Unknown Object (File)
Thu, Jan 9, 3:59 AM
Unknown Object (File)
Nov 29 2024, 1:29 PM
Unknown Object (File)
Nov 29 2024, 11:02 AM
Unknown Object (File)
Nov 25 2024, 12:12 AM
Unknown Object (File)
Nov 17 2024, 7:24 AM
Unknown Object (File)
Nov 8 2024, 9:00 AM
Subscribers

Details

Summary

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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/arm64/cavium/thunder_pcie_fdt.c
236–300

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.

sys/arm64/cavium/thunder_pcie_fdt.c
236–300

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