Skip to main content
Visitor II
February 14, 2020
Question

Shared memory access from the A7’s linux user space.

  • February 14, 2020
  • 1 reply
  • 839 views

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!

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 17, 2020
    JSpraAuthor
    Visitor II
    February 17, 2020

    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