On PC side modify and build the PCI_endpoint_test.c module and insert into kernel
then build pci_epf_test.c to make pcitest function
/dev/pci-endpoint-test.0 can be found
but when i try to run pcitest the task always blocked and the dmesg shows
0000:05:00.0 Unassigned class [ff00]: NVIDIA Corporation Device 0001
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at 85e00000 (64-bit, non-prefetchable) [size=1M]
Memory at 6001e00000 (64-bit, prefetchable) [size=128K]
Memory at 85f00000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [b0] MSI-X: Enable+ Count=8 Masked-
Capabilities: [100] Advanced Error Reporting
Capabilities: [148] Secondary PCI Express
Capabilities: [168] Physical Layer 16.0 GT/s <?>
Capabilities: [18c] Lane Margining at the Receiver <?>
Capabilities: [1a4] Latency Tolerance Reporting
Capabilities: [1ac] L1 PM Substates
Capabilities: [1bc] Vendor Specific Information: ID=0002 Rev=4 Len=100 <?>
Capabilities: [2bc] Vendor Specific Information: ID=0001 Rev=1 Len=038 <?>
Capabilities: [2f4] Data Link Feature <?>
Capabilities: [300] Precision Time Measurement
Capabilities: [30c] Vendor Specific Information: ID=0003 Rev=1 Len=054 <?>
Capabilities: [374] Vendor Specific Information: ID=0006 Rev=0 Len=018 <?>
Kernel driver in use: pci-endpoint-test
Kernel modules: pci_endpoint_test
when i tried to run pcitest.sh
still failed on msi and msix
> BAR tests
>
> BAR0: OKAY
> BAR1: NOT OKAY
> BAR2: NOT OKAY
> BAR3: NOT OKAY
> BAR4: NOT OKAY
> BAR5: NOT OKAY
>
> Interrupt tests
>
> SET IRQ TYPE TO LEGACY: OKAY
> LEGACY IRQ: OKAY
> SET IRQ TYPE TO MSI: OKAY
> MSI1: OKAY
> MSI2: NOT OKAY
> MSI3: NOT OKAY
> MSI4: NOT OKAY
> MSI5: NOT OKAY
> MSI6: NOT OKAY
> MSI7: NOT OKAY
> MSI8: NOT OKAY
> MSI9: NOT OKAY
> MSI10: NOT OKAY
> MSI11: NOT OKAY
> MSI12: NOT OKAY
> MSI13: NOT OKAY
> MSI14: NOT OKAY
> MSI15: NOT OKAY
> MSI16: NOT OKAY
> MSI17: NOT OKAY
> MSI18: NOT OKAY
> MSI19: NOT OKAY
> MSI20: NOT OKAY
> MSI21: NOT OKAY
> MSI22: NOT OKAY
> MSI23: NOT OKAY
> MSI24: NOT OKAY
> MSI25: NOT OKAY
> MSI26: NOT OKAY
> MSI27: NOT OKAY
> MSI28: NOT OKAY
> MSI29: NOT OKAY
> MSI30: NOT OKAY
> MSI31: NOT OKAY
> MSI32: NOT OKAY
>
> SET IRQ TYPE TO MSI-X: OKAY
> MSI-X1: NOT OKAY
> MSI-X2: NOT OKAY
> MSI-X3: NOT OKAY
> MSI-X4: NOT OKAY
> MSI-X5: NOT OKAY
> MSI-X6: NOT OKAY
> MSI-X7: NOT OKAY
> MSI-X8: NOT OKAY
> MSI-X9: NOT OKAY
Update: pcitest run successful on RC
but get new problem
the endpoint side use pci-efp-test driver and RC side use pci_endpoint_test driver to test
the dmesg on endpoint shows below
the DMA fail to transfer and transfer speed seems too low
i tried use terga_pci_dma_test driver on endpoint device but the terga-pcie-ep-mem and terga-pci-dma-test driver fail to run on PC(RC) side with pci_endpoint_test driver didn’t work.
the question is what should do for improve pcie performance and how should i test it?
should i rewrite pci_endpoint_test driver refer to terga-pcie-ep-mem.c to test dma speed?