Re: [PATCH] pcie: Add quirk for the Arm Neoverse N1SDP platform

From: Will Deacon
Date: Mon Dec 09 2019 - 11:26:53 EST


On Mon, Dec 09, 2019 at 04:06:38PM +0000, Andre Przywara wrote:
> From: Deepak Pandey <Deepak.Pandey@xxxxxxx>
>
> The Arm N1SDP SoC suffers from some PCIe integration issues, most
> prominently config space accesses to not existing BDFs being answered
> with a bus abort, resulting in an SError.

"Do as I say, not as I do"?

> To mitigate this, the firmware scans the bus before boot (catching the
> SErrors) and creates a table with valid BDFs, which acts as a filter for
> Linux' config space accesses.
>
> Add code consulting the table as an ACPI PCIe quirk, also register the
> corresponding device tree based description of the host controller.
> Also fix the other two minor issues on the way, namely not being fully
> ECAM compliant and config space accesses being restricted to 32-bit
> accesses only.
>
> This allows the Arm Neoverse N1SDP board to boot Linux without crashing
> and to access *any* devices (there are no platform devices except UART).
>
> Signed-off-by: Deepak Pandey <Deepak.Pandey@xxxxxxx>
> [Sudipto: extend to cover the CCIX root port as well]
> Signed-off-by: Sudipto Paul <sudipto.paul@xxxxxxx>
> [Andre: fix coding style issues, rewrite some parts, add DT support]
> Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
> ---
> arch/arm64/configs/defconfig | 1 +
> drivers/acpi/pci_mcfg.c | 7 +
> drivers/pci/controller/Kconfig | 11 ++
> drivers/pci/controller/Makefile | 1 +
> drivers/pci/controller/pcie-n1sdp.c | 196 ++++++++++++++++++++++++++++
> include/linux/pci-ecam.h | 2 +
> 6 files changed, 218 insertions(+)
> create mode 100644 drivers/pci/controller/pcie-n1sdp.c

Where can I buy one of these? They're "unreleased" according to:

https://community.arm.com/developer/tools-software/oss-platforms/w/docs/440/neoverse-n1-sdp

and I don't think we should wreck upstream because of a platform that
doesn't exist.

Will