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.

Linux/DRA72XEVM: How to config ipc with OCMC_RAM1

Part Number: DRA72XEVM
Other Parts Discussed in Thread: DRA725

Tool/software: Linux

Hardware: DRA725

Software: ti-processor-sdk-linux-automotive-dra7xx-evm-03_02_00_03

I try the example from https://e2e.ti.com/support/arm/sitara_arm/f/791/t/503515

it run well on my board. but the memory access performance is no good.

So I try to config ipc with OCMC_RAM1

bellow is my config:

on linux kernel dts:

        cmem_block_mem_1_ocmc1: cmem_block_mem@0x40300000 {
            reg = <0x0 0x40300000 0x0 0x080000>;
            no-map;
            status = "okay";
        };

    cmem {
        compatible = "ti,cmem"; 
        #address-cells = <1>;
        #size-cells = <0>;
        status = "okay";
        #pool-size-cells = <2>;

        cmem_block_0: cmem_block@0 {
             reg = <0>;
             memory-region = <&cmem_block_mem_1_ocmc1>;
             cmem-buf-pools = <4 0 0x20000>;
        };
    };

on ex02_messageq/shared/config.bld

var evmDRA7XX_CMEM = {
        name: "OCMC_RAM1", space: "data", access: "RW",
        base: 0x40300000, len: 0x80000,
        comment: "CMEM Memory (512 KB)"
};

Build.platformTable["ti.platforms.evmDRA7XX:dsp1"] = {
    externalMemoryMap: [
        [ "EXT_CODE", evmDRA7XX_ExtMemMapDsp.EXT_CODE ],
        [ "EXT_DATA", evmDRA7XX_ExtMemMapDsp.EXT_DATA ],
        [ "EXT_HEAP", evmDRA7XX_ExtMemMapDsp.EXT_HEAP ],
        [ "TRACE_BUF", evmDRA7XX_ExtMemMapDsp.TRACE_BUF ],
        [ "EXC_DATA", evmDRA7XX_ExtMemMapDsp.EXC_DATA ],
        [ "PM_DATA", evmDRA7XX_ExtMemMapDsp.PM_DATA ],
        [ evmDRA7XX_CMEM.name, evmDRA7XX_ExtMemMapDsp.CMEM ],
    ],
    codeMemory: "EXT_CODE",
    dataMemory: "EXT_DATA",
    stackMemory: "EXT_DATA",
};

It's compile failure with erro log:

dctools-tree/packages/xdc/platform/Utils.xs", line 104: ti.platforms.evmDRA7XX.Platform.Instance#0 ti.platforms.evmDRA7XX.Platform.Instance#0/externalMemoryMap: Memory name OCMC_RAM1 is already used for an existing memory object

How to configure memory map for OCMC_RAM1 on dsp side?

  • Hi,

    I have forwarded your question to IPC expert.

    Regards,
    Yordan
  • The error indicates that "OCMC_RAM1" name is already used. The evmDRA7XX platform defines the OCMC_RAM1 memory in the memory map by default. Can you check your memory map without your changes? OCMC_RAM1 should already be there.

    Thanks,
    Angela
  • Hi Angela

    I only change the cmem size on dsp firmware to mach 512kB limit. It's run fault with erro log:

    [ 0.000] 18 Resource entries at 0x95000000
    [ 0.000] [t=0x00044ac2] xdc.runtime.Main: --> main:
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [ 0.000] [t=0x0050ea07] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [ 0.000] [t=0x0053c825] xdc.runtime.Main: --> smain:
    [ 0.000] [t=0x00563269] Server: Server_create: server is ready
    [ 0.000] [t=0x0057d0e5] Server: <-- Server_create: 0
    [ 0.000] [t=0x00591bd1] Server: --> Server_exec:
    [ 0.000] [t=0x00000001:b46c630b] Server: Server_exec: not found resource for phys 0x40360000
    [ 0.000]
    [ 0.000] [t=0x00000001:b46ef59d] Server: Server_exec: not found resource for phys 0x40340000
    [ 0.000]
    [ 0.000] [t=0x00000001:b471644e] Server: Server_exec: processed cmd=0x2000000
    [ 0.000] [t=0x00000001:b4739298] Server: <-- Server_exec: 0
  • Looks like your app is failing to do some address translation? Are you using Resource_physToVirt? Address translations using Resource_physToVirt are done based on the remoteproc resource table that is compiled into the image. Have you updated your resource table with entries for the new address?

    You can find information on creating a custom resource table here:

    Thanks,

    Angela