2020-02-14 10:26 AM
What is the best mechanism to access shared memory from the A7’s linux user space? I have tried using mmap and was successful at reading shared memory; however, I get memory exceptions when attempting to write. Could it be that I can only write to this memory in kernel space?
I can find documentation for the M4 processor and how to define shared memory in linker script. No luck with linux doc's other than “remoteproc�? and “rpmsg�? documentation, neither give clear instruction on how this is done.
Could you please refer me to some documentation that could help me get a better understanding on how this is done.
Thanks in advance!
2020-02-16 11:38 PM
Hello,
did you find this https://wiki.st.com/stm32mpu/wiki/Exchanging_buffers_with_the_coprocessor ?
and more specifically this example: https://wiki.st.com/stm32mpu/wiki/How_to_exchange_large_data_buffers_with_the_coprocessor_-_example
Regards
2020-02-17 2:23 PM
Patrick,
Thanks, this was great help! So is the answer to my question is to use DMA to access memory on the A7's side of the shared memory, ie dma_alloc_writecombine?
I need to get a better understanding of DMA and Cache Coherence, so I guess it's time to do that. I think using rpsmg-sdb-mod is the best approach in the long run: however, I also would like to get an understanding how the shared memory actually works.
Please let me know if I'm on the correct track here,
Thanks for your help!
John
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.