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)
已解决! 转到解答。
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 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
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!
-----------------------------------------------------------------------------------------------------------------------