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
Unknown Object (File)
Fri, Nov 8, 9:00 AM
Unknown Object (File)
Fri, Nov 8, 6:40 AM
Unknown Object (File)
Wed, Oct 23, 9:26 AM
Unknown Object (File)
Tue, Oct 22, 6:55 PM
Unknown Object (File)
Oct 6 2024, 10:38 PM
Unknown Object (File)
Oct 5 2024, 11:35 PM
Unknown Object (File)
Oct 2 2024, 10:53 PM
Unknown Object (File)
Sep 30 2024, 8:00 PM
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