This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IPC at Linux kernel space

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

Hi All,

We are working on a project where we have to forward the data received on ARM side Ethernet driver to DSP. If we use combination of IPC and CMEM, the switching between driver and application will be lot and it may affect the performance of product.

Is there a mechanism where I can pass data from ARM to DSP without dependency on application space?

Following is development environment detail,

   OMAPL138 based custom board

   IPC - 3.35.01.07

   bios - 6.41.01.36

   Linux - 3.10

Please let me know on this.

  • Abhijit,

    Unfortunately, IPC 3.x only supports user-mode. However, I think you can use IPC to setup a low-level data transfer from your Ethernet driver to the DSP which does not use IPC directly.

    First, on OMAP-L138 there are two interrupt lines from ARM to DSP. By default, IPC will only use the first interrupt line. This means your Ethernet driver can use the second interrupt line to signal the DSP.

    Use CMEM to acquire some physically contiguous memory. Use IPC to send the address and size of this memory to the DSP. Also inform your Ethernet driver of this memory. Use the memory for a queue of buffers to transfer data from ARM to DSP. In your control structure, have the ARM update only the tail pointer each time it adds a new buffer to the queue. On the DSP, update only the head pointer each time it consumes a buffer. This way, you don't need any locking mechanism between the two processors.

    On the DSP, create a Hwi instance to handle the second interrupt from the ARM. The one which will be used by the Ethernet driver.

    Once you have the setup complete, your Ethernet driver can place new data into the queue and then raise the interrupt to the DSP. On the DSP, your Hwi ISR will remove the data from the queue and process it.

    Be mindful about cache coherency. You can either configure the CMEM memory to be uncached, or add cache operations yourself.

    Good luck.

    ~Ramsey

  • Hi Ramsey,

    Sorry for late reply.

    I found out that linux provides mechanism for sending and receiving packets at kernel space level, Remote Processor Messaging (rpmsg) Framework.

    IPC 3.00.1.24 has an application demonstrating communication at kernel space. I am planning to pass the shared memory pointer to DSP for passing ethernet packet to DSP core. The latency for 4 bytes of transfer with this method is 400uSec for round trip, which is OK for our requirement.

    The design of shared memory with interrupt, with tail pointer and head pointer needs protection, as the tail pointer will be read by ARM core and head pointer by DSP core.

    Thank you very much for your help :)