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.

TDA4VH-Q1: Question about IPC and vring buffer address

Part Number: TDA4VH-Q1

Hi,

I see Linux SDK IPC doc "3.5.4. DMA memory Carveouts" introduced the first 1MB of every core region  is for IPC(Virtio/Vring buffers). I think Linux uses this region for rpmsg(for example, rpmsg char), and rtos also use this region to send messages to Linux. In my understanding , Linux uses 0xA2000000 as base address to send messages to MCU2_0.

But I find the IPC code in rtos, when using RPMessage_send() API, it must init first. I see in the code, the IPC use `IPC_VRING_MEM` as vring base address, which is "0xAC000000". So, in the rtos, I think it uses 0xAC000000 as base address to send IPC messages to Linux. However the address 0xAC000000 is diiferent from the base address 0xA2000000 that Linux uses to send rpmsg.

What is the difference between the two addresses? and what address is IPC  actually use? Can you examine me a lot.

Thanks!

  • Hi,

    In my understanding , Linux uses 0xA2000000 as base address to send messages to MCU2_0

    Correct, this region is used primarily for the Linux <-> remoteproc core. Each core uses it's own 1 MB reserved region, which is supplied through the Linux board dts file.

    I see in the code, the IPC use `IPC_VRING_MEM` as vring base address, which is "0xAC000000". So, in the rtos, I think it uses 0xAC000000 as base address to send IPC messages to Linux

    No, this is not used by RTOS core to communicate with Linux. The address is retrieved using the Resource Table vdev entry. The IPC_VRING_MEM address of 0xAC000000 is used for IPC between all the RTOS to RTOS cores. This address needs to be the same across all the remoteproc firmwares.

    This region is marked as a carveout in the Linux dts file, and Linux itself doesn't manage this memory. 

    regards

    Suman

  • Hi, 

        Thanks your reply. For you reply, I understand that the area for {Linux <=> rtos} is different from {rtos <=> rtos}.

         But, when I use RPMessage_send api in rtos to send messages to Linux, I find it also uses IPC_VRING_MEM as base address in IPC init. So this confused me a lot. And I can't find any init code using DDR_MCU2_0_IPC. The only area using it is in j784s4_mpu_cfg.c, but don't know how it init.

     Thanks!

  • Hi,

    The IPC init call only takes in the RTOS-to-RTOS IPC region address.

    And I can't find any init code using DDR_MCU2_0_IPC.

    This is dynamically looked up within the code during initialization using the Resource Table.

    Please look through the PDK IPC module documentation.

    The SDK comes with a default example code that is used to establish communication with Linux, I suggest you to look through this example code (<ti-processor-sdk-rtos-j784s4-evm-09_01_00_06>/pdk_j784s4_09_01_00_22/packages/ti/drv/ipc/examples/common and linux folders).

    The Ipc_loadResourceTable() and the Ipc_isRemoteReady() logic ensures that Linux has allocated and initialized the vring address. This is looked up from within the IPC code.

    regards

    Suman