Hello,
We are running M7 custom binary in which we have integrated rpmsg multi-end point driver from this link. When we run the binary at address 0x80000000 from uboot using below command then,
After some time we are facing the the below error.
[ 182.602982] imx-rproc imx8mp-cm7: imx_rproc_kick: failed (1, err:-62)
[ 182.662979] imx-rproc imx8mp-cm7: imx_rproc_kick: failed (1, err:-62)
[ 197.855286] rpmsg_multiept virtio0.iotgw-rpmsg-openamp-channel.-1.1: timeout waiting for a tx buffer
As it seems to rx/tx buffer size issue we have tried to increase the size of vring0 & vring1 from 0x8000 to 0x80000 in device tree as shown:
After increasing these buffer sizes, we are not able to see the multi-end point created on linux kernel in /dev/ as shown below.
Can you please help with the errors we are facing as mentioned above?
Thanks,
Shivani Patel
Vring size is hardcoded in imx-rpmsg driver, RTOS settings have to follow these settings, else comms won't work.
Instead of looking for more buffers, first try sending in one transfer as mach as you can fit in default max single transfer size, which is 496 bytes. Sending just few bytes at a time drains available buffers very quickly.
Hi @kef2
I am having the same issue with RPMSG on Toradex make Verdin iMX8M-Plus.
While running the Cortex-M7 binary, I am getting this error: imx-rproc imx8mp-cm7: imx_rproc_kick: failed (1, err:-62)
Timing of this error is very random, so I am unable to debug this error.
I don't know the cause of this error.
Can you please explain the reason of this error in detail and share the solution?
Thanks,
Aditya
Hi @kef2 ,
Thanks for your response.
We have tried with 1 MB vring buffer size as below.
1 MB buffer size is working. But when we tried to increase to 2MB or 4MB then rpmsg driver which is "drivers/rpmsg/virtio_rpmsg_bus.c" is not able to allocate memory. See the below image.
Regards,
Shivani
As I wrote previously
Your mods in DT don't increase buffer size any how.
See imx_rpmsg.c\rpmsg\drivers - linux-imx - i.MX Linux kernel (codeaurora.org) or older driver versions, it's just 512 buffers of 512 bytes, which is 0x8000 bytes for host to remote direction, and 0x8000 bytes for remote to host direction. See
rpdev->ivdev[i]->vring[0] = start; rpdev->ivdev[i]->vring[1] = start + 0x8000;
If you mod driver, you need to mod CM side FW as well.