5 Replies Latest reply on Aug 5, 2016 6:49 AM by rbulha

    Shared memory between Atom and Quark MCU?


      Hey all,

      according to the diagram in [1] there seem to be some explicit shared memory between Atom <> Quark.


      However, I cannot find any API on the MCU side to access that. I am not interested in IPC, what I am trying to get is a one-writer-one-reader circular buffer shared between the two CPUs.

      I am aware of the fact that implementing a MP circular buffer can be tricky  (ioremaps, caching issues, atomicity, etc...) but this is NOT the point and out of the scope of this thread.

      I understand that there might not be a SHM solution that works out of the box (the mcu_api.h seem pretty minimal) and I am perfecly fine doing the kernel-space drive plumbing myself. However, I cannot find any useful resource, documentation, BSP source code for the Quark MCU, which makes this a bit tougher.


      From the kernel sources in [2] I can see that the Atom sees the Quark as a PCI device (0x11a4) which exposes two PCI BAR: a 512k and a 32k BAR.

      If I am reading the code correctly the first BAR is used to load the MCU firmware and the second one to implement the uart and the other two IPC channels.

      It is very clear to me how to access those BARs from the Atom side.

      What is less clear to me is:

      - Is there any way to access the corresponding memory from the MCU?

      - Is there any area of one of the two bars that can be safely used? For instance, once the firmware is loaded can the BAR #0 (512k) be used as a generic SHM? Is there any free area left in the other 32K bar (I am fine assuming that my code will never use either the UART of one of the  IPC channels)?

      I guess my main problem is that I cannot find the sources for the MCU-side binary to see how the mcu_api.h is implemented. All I got from the MCU sdk is a intel_mcu.a static library.

      Is the source of that available anywhere?




      [1] Creating applications with the MCU SDK for the Intel® Edison board | Intel® Developer Zone

      [2] edison-kernel/intel_mcu_common.c at 10c461579cd83202c0dacae8604f7bc5b110c8d5 · primiano/edison-kernel · GitHub