Tool/software:
Hello Team,
We are trying to develop a kernel space driver for rpmsg communication with R5F cores. We were able to send/receive data using default endpoint. We want to send data to specific core. For example, if I want to send data to core R5F_MAIN_0_0, how shall I create endpoint for this core and send data through it?
We tried running rpmsg-char-simple example from user space to ensure the communication from user space. We observed that only rproc_id 0 and 1 were working. For other cores, we were getting errors. Attaching the logs for reference.
root@aptiv-ep2000:~# cd install/ root@aptiv-ep2000:~/install# ls bin include lib root@aptiv-ep2000:~/install# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/install/lib root@aptiv-ep2000:~/install# cd bin/ root@aptiv-ep2000:~/install/bin# ks -sh: ks: command not found root@aptiv-ep2000:~/install/bin# ls rpmsg_char_simple root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 0 Created endpt device rpmsg-char-0-1081, fd = 3 port = 1025 Exchanging 100 messages with rpmsg device rpmsg-char-0-1081 on rproc id 0 ... Sending message #0: hello there 0! Received message #0: round trip delay(usecs) = 194115 hello there 0! Sending message #1: hello there 1! Received message #1: round trip delay(usecs) = 90425 hello there 1! Sending message #2: hello there 2! Received message #2: round trip delay(usecs) = 84350 hello there 2! ..... Sending message #98: hello there 98! Received message #98: round trip delay(usecs) = 68700 hello there 98! Sending message #99: hello there 99! Received message #99: round trip delay(usecs) = 78575 hello there 99! Communicated 100 messages successfully on rpmsg-char-0-1081 TEST STATUS: PASSED root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 1 _rpmsg_char_find_rproc: 41400000.r5f is either not probed or not a remoteproc! Can't create an endpoint device: No such file or directory TEST STATUS: FAILED root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 2 Created endpt device rpmsg-char-2-1084, fd = 3 port = 1025 Exchanging 100 messages with rpmsg device rpmsg-char-2-1084 on rproc id 2 ... Sending message #0: hello there 0! Received message #0: round trip delay(usecs) = 145075 hello there 0! Sending message #1: hello there 1! Received message #1: round trip delay(usecs) = 109470 hello there 1! Sending message #2: hello there 2! Received message #2: round trip delay(usecs) = 81365 ..... Sending message #96: hello there 96! Received message #96: round trip delay(usecs) = 67280 hello there 96! Sending message #97: hello there 97! Received message #97: round trip delay(usecs) = 66460 hello there 97! Sending message #98: hello there 98! Received message #98: round trip delay(usecs) = 64750 hello there 98! Sending message #99: hello there 99! Received message #99: round trip delay(usecs) = 66710 hello there 99! Communicated 100 messages successfully on rpmsg-char-2-1084 TEST STATUS: PASSED root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 3 _rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio2.rpmsg_chrdev.-1.14 Can't create an endpoint device: Invalid argument TEST STATUS: FAILED root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 4 _rpmsg_char_find_rproc: 5e00000.r5f does not have any virtio devices! Can't create an endpoint device: No such file or directory TEST STATUS: FAILED root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 5 _rpmsg_char_find_rproc: 5f00000.r5f does not have any virtio devices! Can't create an endpoint device: No such file or directory TEST STATUS: FAILED root@aptiv-ep2000:~/install/bin# ./rpmsg_char_simple -r 6 _rpmsg_char_find_rproc: 4d80800000.dsp is either not probed or not a remoteproc! Can't create an endpoint device: No such file or directory TEST STATUS: FAILED root@aptiv-ep2000:~/install/bin# root@aptiv-ep2000:~# ls /sys/bus/rpmsg/devices virtio0.rpmsg_chrdev.-1.14 virtio1.rpmsg_chrdev.-1.14 virtio2.rpmsg_ctrl.0.0 virtio0.rpmsg_ctrl.0.0 virtio1.rpmsg_ctrl.0.0 virtio2.rpmsg_ns.53.53 virtio0.rpmsg_ns.53.53 virtio1.rpmsg_ns.53.53 virtio0.ti.ipc4.ping-pong.-1.13 virtio1.ti.ipc4.ping-pong.-1.13
Kindly check, provide your suggestions.