This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello,
I'm trying to understand how IPC is meant to work and get a basic system running. From my vision apps base image, my goal is to replace all the subcore images with the ipc_echo_test image, and confirm that all of them are talking with rpmsg_char_simple.
I've linked all of the firmwares to their respective images:
root@j722s-evm:/lib/firmware# ls -l lrwxrwxrwx 1 weston weston 65 Oct 25 2024 j722s-c71_0-fw -> /lib/firmware/ti-ipc/j722s/ipc_echo_test_c7x_1_release_strip.xe71 lrwxrwxrwx 1 weston weston 68 Mar 9 2018 j722s-c71_0-fw-sec -> /usr/lib/firmware/vision_apps_evm/vx_app_rtos_linux_c7x_1.out.signed lrwxrwxrwx 1 weston weston 65 Oct 25 2024 j722s-c71_1-fw -> /lib/firmware/ti-ipc/j722s/ipc_echo_test_c7x_2_release_strip.xe71 lrwxrwxrwx 1 weston weston 68 Mar 9 2018 j722s-c71_1-fw-sec -> /usr/lib/firmware/vision_apps_evm/vx_app_rtos_linux_c7x_2.out.signed lrwxrwxrwx 1 weston weston 67 Oct 24 2024 j722s-main-r5f0_0-fw -> /lib/firmware/ti-ipc/j722s/ipc_echo_test_mcu3_0_release_strip.xer5f lrwxrwxrwx 1 weston weston 69 Mar 9 2018 j722s-main-r5f0_0-fw-sec -> /usr/lib/firmware/vision_apps_evm/vx_app_rtos_linux_mcu2_0.out.signed lrwxrwxrwx 1 weston weston 71 Mar 9 2018 j722s-mcu-r5f0_0-fw -> /usr/lib/firmware/ti-ipc/j722s/ipc_echo_test_mcu2_0_release_strip.xer5f lrwxrwxrwx 1 weston weston 78 Mar 9 2018 j722s-mcu-r5f0_0-fw-sec -> /usr/lib/firmware/ti-ipc/j722s/ipc_echo_test_mcu2_0_release_strip.xer5f.signed
I've confirmed the correct memory regions are being reserved for these image:
root@j722s-evm:/lib/firmware# dmesg | grep Reserved [ 0.000000] Reserved memory: created CMA memory pool at 0x00000009c8000000, size 896 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0000000, size 1 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a0100000, size 15 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1000000, size 1 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a1100000, size 15 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2000000, size 1 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a2100000, size 15 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a3000000, size 1 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a3100000, size 15 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4000000, size 1 MiB [ 0.000000] Reserved memory: created DMA memory pool at 0x00000000a4100000, size 15 MiB
However, during boot the system is unable to initialize the c7x cores:
[ 11.849083] k3-dsp-rproc 7e000000.dsp: assigned reserved memory node c7x-dma-memory@a3000000 [ 11.858477] k3-dsp-rproc 7e000000.dsp: configured DSP for IPC-only mode [ 11.866588] remoteproc remoteproc0: 7e000000.dsp is available [ 11.877477] remoteproc remoteproc0: attaching to 7e000000.dsp [ 11.885134] videodev: Linux video capture interface: v2.00 [ 11.887308] remoteproc remoteproc0: carveout rsc has non zero reserved bytes [ 11.890760] OF: graph: no port node found in /bus@f0000/dss@30220000/oldi-txes/oldi@1/ports [ 11.900706] remoteproc remoteproc0: Failed to process resources: -22 [ 11.922267] k3-dsp-rproc 7e000000.dsp: error -EINVAL: failed to add register device with remoteproc core [ 11.933600] k3-dsp-rproc: probe of 7e000000.dsp failed with error -22 [ 11.953474] remoteproc remoteproc0: releasing 7e000000.dsp [ 11.965282] k3-dsp-rproc 7e200000.dsp: assigned reserved memory node c7x-dma-memory@a4000000 [ 11.978734] k3-dsp-rproc 7e200000.dsp: configured DSP for IPC-only mode [ 11.994471] remoteproc remoteproc0: 7e200000.dsp is available [ 11.995411] platform 79000000.r5f: configured R5F for IPC-only mode [ 12.001356] remoteproc remoteproc0: attaching to 7e200000.dsp [ 12.007604] platform 79000000.r5f: assigned reserved memory node mcu-r5fss-dma-memory-region@a1000000 [ 12.018550] remoteproc remoteproc0: unsupported vendor resource 128 [ 12.029075] remoteproc remoteproc0: rsc table is truncated [ 12.034968] remoteproc remoteproc0: Failed to process resources: -22 [ 12.049025] OF: graph: no port node found in /bus@f0000/dss@30220000/oldi-txes/oldi@1/ports [ 12.073072] remoteproc remoteproc1: 79000000.r5f is available [ 12.081261] remoteproc remoteproc1: attaching to 79000000.r5f [ 12.105322] k3-dsp-rproc 7e200000.dsp: error -EINVAL: failed to add register device with remoteproc core [ 12.115149] OF: graph: no port node found in /bus@f0000/dss@30220000/oldi-txes/oldi@1/ports [ 12.123763] k3-dsp-rproc: probe of 7e200000.dsp failed with error -22 [ 12.136672] remoteproc remoteproc0: releasing 7e200000.dsp
Subsequently I am unable to communicate over IPC.
I'm sure I'm misunderstanding something simple, but the documentation is quite sparse. Any pointers would be appreciated.
Hello,
For IPC communication on J722S , you need to run ipc_rpmsg_echo_linux from MCU+SDK. ipc_Echo_test is part of PDK which is not there in J722S. Share me the steps how you built the example , how you modified the soft link.
Regards
Tarun Mukesh
Hi Tarun,
I did the same test with ipc_rpmsg_echo_linux but unfortunately with the same result. Perhaps there is something wrong with my methodology, hopefully you can help.
I built both the linux sdk and RTOS sdk as described in the documentation. Pretty much just make all for the RTOS one and setup.sh for the linux one. I set up linux with tftp boot and NFS to make development easier.
Then I went into the RTOS build and found ipc_rpmsg_echo_linux.c75ss0-0.release.strip.out, and moved it into a folder in the NFS. Then I symlinked in the NFS using `ln -sf /lib/firmware/mine/ipc_rpmsg_echo_linux.c75ss0-0.release.strip.out j722s-c71_0-fw`
When booting linux I get the same issue as before, where remoteproc rejects the c7x cores
[ 11.803989] remoteproc remoteproc0: 7e000000.dsp is available [ 11.822192] remoteproc remoteproc0: attaching to 7e000000.dsp [ 11.828834] remoteproc remoteproc0: carveout rsc has non zero reserved bytes [ 11.836701] remoteproc remoteproc0: Failed to process resources: -22 [ 11.888749] remoteproc remoteproc1: 79000000.r5f is available [ 11.895719] remoteproc remoteproc1: attaching to 79000000.r5f [ 11.901313] k3-dsp-rproc 7e000000.dsp: error -EINVAL: failed to add register device with remoteproc core [ 11.988673] remoteproc remoteproc0: releasing 7e000000.dsp [ 12.055787] remoteproc remoteproc0: 7e200000.dsp is available [ 12.072371] remoteproc remoteproc0: attaching to 7e200000.dsp [ 12.086104] remoteproc remoteproc0: unsupported resource 33554432 [ 12.093808] remoteproc remoteproc0: rsc table is truncated [ 12.104511] remoteproc remoteproc0: Failed to process resources: -22 [ 12.117432] k3-dsp-rproc 7e200000.dsp: error -EINVAL: failed to add register device with remoteproc core
lrwxrwxrwx 1 weston weston 66 Oct 29 2024 j722s-c71_0-fw -> /lib/firmware/mine/ipc_rpmsg_echo_linux.c75ss0-0.release.strip.out lrwxrwxrwx 1 weston weston 68 Mar 9 2018 j722s-c71_0-fw-sec -> /usr/lib/firmware/vision_apps_evm/vx_app_rtos_linux_c7x_1.out.signed lrwxrwxrwx 1 weston weston 66 Oct 29 2024 j722s-c71_1-fw -> /lib/firmware/mine/ipc_rpmsg_echo_linux.c75ss1-0.release.strip.out lrwxrwxrwx 1 weston weston 68 Mar 9 2018 j722s-c71_1-fw-sec -> /usr/lib/firmware/vision_apps_evm/vx_app_rtos_linux_c7x_2.out.signed lrwxrwxrwx 1 weston weston 67 Oct 24 2024 j722s-main-r5f0_0-fw -> /lib/firmware/ti-ipc/j722s/ipc_echo_test_mcu3_0_release_strip.xer5f lrwxrwxrwx 1 weston weston 69 Mar 9 2018 j722s-main-r5f0_0-fw-sec -> /usr/lib/firmware/vision_apps_evm/vx_app_rtos_linux_mcu2_0.out.signed lrwxrwxrwx 1 weston weston 71 Mar 9 2018 j722s-mcu-r5f0_0-fw -> /usr/lib/firmware/ti-ipc/j722s/ipc_echo_test_mcu2_0_release_strip.xer5f lrwxrwxrwx 1 weston weston 78 Mar 9 2018 j722s-mcu-r5f0_0-fw-sec -> /usr/lib/firmware/ti-ipc/j722s/ipc_echo_test_mcu2_0_release_strip.xer5f.signed
On further investigation, I saw that the firmware loads happening inside uboot are the incorrect sizes:
50228 bytes read in 103 ms (475.6 KiB/s) Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices Load Remote Processor 0 with data@addr=0x82000000 50228 bytes: Success! 45492 bytes read in 103 ms (430.7 KiB/s) Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices Load Remote Processor 2 with data@addr=0x82000000 45492 bytes: Success! 11821224 bytes read in 588 ms (19.2 MiB/s) Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices Load Remote Processor 3 with data@addr=0x82000000 11821224 bytes: Success! 11821224 bytes read in 589 ms (19.1 MiB/s) Warning: Did not detect image signing certificate. Skipping authentication to prevent boot failure. This will fail on Security Enforcing(HS-SE) devices Load Remote Processor 4 with data@addr=0x82000000 11821224 bytes: Success!
So I suspect the firmwares are being loaded from the image on the sd card. Obviously I would prefer it to load from NFS, so there is an undesirable difference between the files uboot is using and the ones linux is using.
By deleting the `run boot_rprocs` command from the u-boot script, linux now initializes the cores instead of uboot, which is much more desirable. I'm not sure why someone would want u-boot to do it.
I'm now able to communicate with the cores with rpmsg_char_simple, so my issue seems to be resolved for now
Hello,
Usually uboot loads all the firmwares since it will take some time more to linux to be up,
By deleting the `run boot_rprocs` command from the u-boot script, linux now initializes the cores instead of uboot,
You did correct if you don't desire loading of other cores at u boot , you can change as modified and linux will load and initialise the cores.
'm now able to communicate with the cores with rpmsg_char_simple, so my issue seems to be resolved for now
Good to hear.
Regards
Tarun Mukesh