Are there RC and EP test codes for pcie ?
Now I have two LX2080 custom boards, one of which PCIE1 is configured as endpoint mode, and the
other PCIE1 is configured as RC mode. Now I want to test their inbound and outbound functions,
are there any demos for reference?
You could refer to drivers/pci/endpoint/functions/pci-epf-test.c in Linux Kernel source code.
For details about pci-epf-test.c, please refer to Documentation/PCI/endpoint/pci-test-howto.rst.
For PCIE EP testing, you could refer to section "7.2.8.4 PCIe Endpoint Mode Linux driver" in LSDK 21.08 user manual.