I have a problem with RPMSG on iMX8MM M4 side
My board is equipped with 4GB DDR
On A53 side, while kernel boot, the function vring_map_one_sg(vq, sg, DMA_FROM_DEVICE), called from
virtqueue_add(...), return the buffer data address that M4 use to write messagges.
vring_map_one_sg() return first address at 0xa8040000.
With 4GB (KO)
Solved! Go to Solution.
Hi Igor
I fixed the issue adding cma to kernel command line. In my case (cma=320M@-2048M)
In this way virtqueue_add() function populates the address list buffers starting from 0x60040000 that is a address accesible by M4.
Reference:
https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html
(cma=nn[MG]@[start[MG][-end[MG]]])
Best Regards
Francesco
Sorry Igor,
I believe that M4 is not able to access the DDR at 0xe8040000. Do you know if M4 can access DDR over 3GB?
Thanks
Francesco
Hi Francesco
I think you are right, according to sect.2.1.3 Cortex-M4 Memory Map
Reference Manual address 0xe8040000 is marked as "reserved".
Best regards
igor
Hi Igor
How can I fix the RPMSG problem with 4GB DDR?
I add a new test that could help:
If I set mem=2048 in kernel command line parameters, RPMSG works fine with 4GBytes of DDR.
Best regards
Francesco
Hi Francesco
seems you already found solution. In general one can debug it
using rpmsg driver description in Linux Manual included in Linux 4.14.98_2.2.0 Documentation
Best regards
igor
Sorry Igor
mem = 2048 is not the solution, I have to use all 4 GB so I can't limit the memory to 2048
Thanks
Francesco
seems this general linux issue, suggest to post issue on kernel mail list.
Majordomo Lists at VGER.KERNEL.ORG
Obviously there is no workaround or solution for M4 access to 0xe8040000 as
this is i.MX8M Mini hardware limitation accordng to 2.1.3 Cortex-M4 Memory Map
i.MX 8M Mini Applications Processor Reference Manual
Also for rpmsg memory usage may be useful to check
https://community.nxp.com/thread/453549
Best regards
igor
Hi Igor
I fixed the issue adding cma to kernel command line. In my case (cma=320M@-2048M)
In this way virtqueue_add() function populates the address list buffers starting from 0x60040000 that is a address accesible by M4.
Reference:
https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html
(cma=nn[MG]@[start[MG][-end[MG]]])
Best Regards
Francesco
Hi Francesco
one can try to configure access permissions using RDC, examples
can be found in SDK EVK-MIMX8M Mini Welcome | MCUXpresso SDK Builder
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------