工具/软件:
您好团队:
我们正在尝试开发一个内核空间驱动程序、用于与 R5F 内核进行 rpmsg 通信。 我们能够使用默认端点发送/接收数据。 我们希望将数据发送到特定内核。 例如、如果我要将数据发送到内核 R5F_MAIN_0_0、如何为此内核创建端点并通过它发送数据?
我们尝试从用户空间运行 rpmsg-char-simple 示例、以确保与用户空间进行通信。 我们观察到只有 rproc_id 0和1正常工作。 对于其他内核、则遇到了错误。 附加日志以供参考。
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
请检查,提供您的建议。