PCIE test probelem
Mar 04, 2024
Hi,
I’m using Jetson Orin Nx Developer Kit and a PC to test PCIE dma transfer with pci_endpoint_test.c provided by kernel.
Orin Nx board configed by this link
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/Communications/PcieEndpointMode.html?highlight=pcie
Connecting and Configuring the Devices Section
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
[ 846.921118] INFO: task pcitest:3418 blocked for more than 120 seconds.
[ 846.921135] Tainted: G OE 5.15.0-89-generic #99~20.04.1-Ubuntu
[ 846.921141] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 846.921143] task:pcitest state:D stack: 0 pid: 3418 ppid: 3311 flags:0x00000000
[ 846.921155] Call Trace:
[ 846.921159]
[ 846.921165] __schedule+0x2cd/0x890
[ 846.921179] ? usleep_range_state+0x90/0x90
[ 846.921188] schedule+0x69/0x110
[ 846.921194] schedule_timeout+0x206/0x2d0
[ 846.921203] ? putname+0x57/0x70
[ 846.921209] ? usleep_range_state+0x90/0x90
[ 846.921216] __wait_for_common+0xb0/0x160
[ 846.921224] wait_for_completion+0x24/0x30
[ 846.921232] pci_endpoint_test_ioctl+0x92f/0xcd7 [pci_endpoint_test]
[ 846.921242] __x64_sys_ioctl+0x92/0xd0
[ 846.921249] do_syscall_64+0x59/0xc0
[ 846.921256] entry_SYSCALL_64_after_hwframe+0x62/0xcc
[ 846.921262] RIP: 0033:0x7f28999ac3ab
[ 846.921267] RSP: 002b:00007ffd229622d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 846.921274] RAX: ffffffffffffffda RBX: 000056398a36e004 RCX: 00007f28999ac3ab
[ 846.921277] RDX: 00007ffd229622e0 RSI: 0000000040085005 RDI: 0000000000000003
[ 846.921281] RBP: 000056398ac872a0 R08: 0000000000000000 R09: 0000000000000000
[ 846.921284] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffea
[ 846.921287] R13: 0000000000000003 R14: 00007ffd229622e0 R15: 0000000000000001
[ 846.921292]
the lspci shows
0000:05:00.0 RAM memory: NVIDIA Corporation Device 0001
Flags: bus master, fast devsel, latency 0, IRQ 168
Memory at 85e00000 (32-bit, non-prefetchable) [size=64K]
Memory at 6001e00000 (64-bit, prefetchable) [size=128K]
Memory at 85e10000 (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
need some help