3.3.3.13. PCIe End PointΒΆ
Introduction
Hardware Setup Details
This cable can be obtained from Adex Electronics (https://www.adexelec.com).
Modify the cable to remove resistors in CK+ and CK- in order to avoid ground loops (power) and smoking clock drivers (clk+/-).
The ends of the modified cable should look like below:
A side
B side
End Point (EP) Device Configuration
DTS Modification
The default dts is configured to be used in root complex mode. In order to use it in endpoint mode, the following changes have to be made in dts file.
Linux Driver Configuration
The following config options have to be enabled in order to configure the PCI controller to be used as a “Endpoint Test” function driver.
Endpoint Controller devices and Function drivers
To find the list of endpoint controller devices in the system:
To find the list of endpoint function drivers in the system:
Using the pci-epf-test function driver
The pci-epf-test function driver can be used to test the endpoint functionality of the PCI controller. Some of the tests that are currently supported are:
Test | Description |
---|---|
BAR | A known pattern is written and read back from BAR |
Interrupt (legacy/MSI/MSI-X) | Raise an interrupt (legacy/MSI/MSI-X) from EP |
Read | Read data from a buffer in RC, and perform a cyclic redundancy check (CRC) for that data |
Write | Write data to a buffer in RC, and perform a cyclic redundancy check (CRC) for that data |
Copy | Copy data from one RC buffer to another RC buffer, and perform a cyclic redundancy check (CRC) for that data |
HOST Device Configuration
The PCI EP device must be powered-on and configured before the PCI HOST device. This restriction is because the PCI HOST doesn’t have hot plug support.
Linux Driver Configuration
The following config options have to be enabled in order to use the “Endpoint Test” PCI device.
lspci output
Using the Endpoint Test function device
Files