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/AM5718: IPC MessageQ Problem

Part Number: AM5718
Other Parts Discussed in Thread: SYSBIOS, AM5728,

Tool/software: Linux

I'm trying to run IPC, DRA7XX_linux_elf/ex02_messageq example

but App_create fail..

app_host: ../../../hlos_common/src/utils/MultiProc.c:79: MultiProc_getName: Assertion `id < _MultiProc_cfg.numProcessors' failed.
Aborted (core dumped)

I'm using following SDK and IPC .

ti-processor-sdk-linux-rt-am57xx-evm-05.02.00.10

ipc_3_50_03_04

 

Logs are as folows:

root@am57xx-evm:/apps#
root@am57xx-evm:/apps# dmesg | grep memory
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 32 MiB
[ 0.000000] OF: reserved mem: initialized node ipu2-memory@95800000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 32 MiB
[ 0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000009b000000, size 32 MiB
[ 0.000000] OF: reserved mem: initialized node ipu1-memory@9b000000, compatible id shared-dma-pool
[ 0.000000] Virtual kernel memory layout:
[ 2.111679] omap-rproc 58820000.ipu: assigned reserved memory node ipu1-memory@9b000000
[ 2.533312] omap-rproc 55020000.ipu: assigned reserved memory node ipu2-memory@95800000
[ 2.533634] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
[ 3.149729] Freeing unused kernel memory: 2048K
[ 32.783620] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
[ 2580.863625] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000

root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# 
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > bind
omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
remoteproc remoteproc2: 40800000.dsp is available
prueth pruss1_eth: port 1: using random MAC addr: be:29:3a:39:25:71
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# remoteproc remoteproc2: powering up 40800000.dsp
remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 5263108
omap_hwmod: mmu0_dsp1: _wait_target_disable failed
omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
virtio_rpmsg_bus virtio0: rpmsg host is online
remoteproc remoteproc2: registered virtio0 (type 7)
remoteproc remoteproc2: remote processor 40800000.dsp is now up
prueth pruss1_eth: port 1: using random MAC addr: 16:11:8a:c5:7e:79
virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x3d
omap-rproc 40800000.dsp: received echo reply from 40800000.dsp

root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc#
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# cat /sys/kernel/debug/remoteproc/remoteproc2/trace0
[ 0.000] 29 Resource entries at 0x99000000
[ 0.000] [t=0x0043ee05] xdc.runtime.Main: --> main:
[ 0.000] [t=0x00476e59] ti.sysbios.family.c64p.Hwi: ERROR: line 192: E_alreadyDefined: Hwi already defined: intr# 5
[ 0.000] ti.sysbios.family.c64p.Hwi: line 192: E_alreadyDefined: Hwi already defined: intr# 5
[ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
[ 0.000] [t=0x004bf9c1] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
[ 0.000] [t=0x0057ab8b] xdc.runtime.Main: --> smain:
[ 0.001] [t=0x0059d770] Server: Server_create: server is ready
[ 0.001] [t=0x005af53c] Server: <-- Server_create: 0
[ 0.001] [t=0x005bbd38] Server: --> Server_exec:
[ 0.001] [t=0x005c6fc0] Server: waiting inbound
root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc#

root@am57xx-evm:/apps# cat /sys/kernel/debug/remoteproc/remoteproc2/resource_table
Entry 0 is of type vdev
ID 7
Notify ID 0
Device features 0x1
Guest features 0x1
Config length 0x0
Status 0x7
Number of vrings 2
Reserved (should be zero) [0][0]

Vring 0
Device Address 0x99000000
Alignment 4096
Number of buffers 256
Notify ID 0
Physical Address 0x0

Vring 1
Device Address 0x99004000
Alignment 4096
Number of buffers 256
Notify ID 1
Physical Address 0x0

Entry 1 is of type carveout
Device Address 0x99000000
Physical Address 0x99100000
Length 0x100000 Bytes
Flags 0x0
Reserved (should be zero) [0]
Name DSP_MEM_TEXT

Entry 2 is of type carveout
Device Address 0x99900000
Physical Address 0x99200000
Length 0x1000000 Bytes
Flags 0x0
Reserved (should be zero) [0]
Name DSP_MEM_DATA

Entry 3 is of type carveout
Device Address 0x99400000
Physical Address 0x9a200000
Length 0x400000 Bytes
Flags 0x0
Reserved (should be zero) [0]
Name DSP_MEM_HEAP

Entry 4 is of type carveout
Device Address 0x99800000
Physical Address 0x9a600000
Length 0x100000 Bytes
Flags 0x0
Reserved (should be zero) [0]
Name DSP_MEM_IPC_DATA

Entry 5 is of type carveout
Device Address 0x40300000
Physical Address 0x9a700000
Length 0x200000 Bytes
Flags 0x0
Reserved (should be zero) [0]
Name DSP_OCMC_RAM

....

....

root@am57xx-evm:/apps# ./app_host dsp1
--> main:
--> Main_main:
--> App_create:
app_host: ../../../hlos_common/src/utils/MultiProc.c:79: MultiProc_getName: Assertion `id < _MultiProc_cfg.numProcessors' failed.
Aborted (core dumped)

root@am57xx-evm:/apps# ./app_host DSP1
--> main:
^CIpc: Caught SIGINT, calling Ipc_stop...
root@am57xx-evm:/apps# ./app_host DSP0
--> main:
^CIpc: Caught SIGINT, calling Ipc_stop...
root@am57xx-evm:/apps# ./app_host DSP
--> main:
^CIpc: Caught SIGINT, calling Ipc_stop...
root@am57xx-evm:/apps# ./app_host dsp
--> main:
^CIpc: Caught SIGINT, calling Ipc_stop...
root@am57xx-evm:/apps# ./app_host dsp1
--> main:
^CIpc: Caught SIGINT, calling Ipc_stop...
root@am57xx-evm:/apps# ./app_host dsp0
--> main:
^CIpc: Caught SIGINT, calling Ipc_stop...
root@am57xx-evm:/apps#

please help me ? 

Regards,

John

  • Hi John,

    Do you use the prebuilt dsp firmware available in Linux SDK or is this a custom dsp binary (modified by you)?

    Best Regards,
    Yordan
  • Hi Yordan,

    I use the custom dsp binary.

    bellow is dsp resource table.

    /*
     * Copyright (c) 2012-2014, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    /*
     *  ======== rsc_table_vayu_dsp.h ========
     *
     *  Define the resource table entries for all DSP cores. This will be
     *  incorporated into corresponding base images, and used by the remoteproc
     *  on the host-side to allocated/reserve resources.
     *
     */
    
    #ifndef _RSC_TABLE_VAYU_DSP_H_
    #define _RSC_TABLE_VAYU_DSP_H_
    
    #include "rsc_types.h"
    
    //sootoo23-170313: PCIe Config Space
    #define DSP_PCIESPACE_SS1    0x20000000
    #define DSP_PCIESPACE_SS2    0x30000000
    
    //sootoo23-170313: PCIe Config Register
    #define DSP_PCIEREG_SS1    0x51000000
    #define DSP_PCIEREG_SS2    0x51800000
    
    //sootoo23-170310: DSP EDMA L3 Reserve
    #define DSP_EDMA_L3MEM  0x43300000
    #define DSP_OCMC_RAM    0x40300000
    
    //sootoo23-170316: DSP1 L2 SRAM Define
    #define DSP_L2_SRAM     0x40800000
    
    //sootoo23-161222 add:
    #define DSP_CMEM_IOBUFS 0x85000000  //=> virtual address of the DSP memory section
    #define CMEM_PHYS_IOBUFS 0xA0000000 //=> physical address of the CMEM (shared) memory section
    #define DSP_CMEM_IOBUFS_SIZE (SZ_1M * 70) //=> size of the CMEM section
    
    /* DSP Memory Map */
    #define L4_DRA7XX_BASE          0x4A000000
    
    #define L4_PERIPHERAL_L4CFG     (L4_DRA7XX_BASE)
    #define DSP_PERIPHERAL_L4CFG    0x4A000000
    
    #define L4_PERIPHERAL_L4PER1    0x48000000
    #define DSP_PERIPHERAL_L4PER1   0x48000000
    
    #define L4_PERIPHERAL_L4PER2    0x48400000
    #define DSP_PERIPHERAL_L4PER2   0x48400000
    
    #define L4_PERIPHERAL_L4PER3    0x48800000
    #define DSP_PERIPHERAL_L4PER3   0x48800000
    
    #define L4_PERIPHERAL_L4EMU     0x54000000
    #define DSP_PERIPHERAL_L4EMU    0x54000000
    
    #define L3_PERIPHERAL_DMM       0x4E000000
    #define DSP_PERIPHERAL_DMM      0x4E000000
    
    #define L3_TILER_MODE_0_1       0x60000000
    #define DSP_TILER_MODE_0_1      0x60000000
    
    #define L3_TILER_MODE_2         0x70000000
    #define DSP_TILER_MODE_2        0x70000000
    
    #define L3_TILER_MODE_3         0x78000000
    #define DSP_TILER_MODE_3        0x78000000
    
    //#define DSP_MEM_TEXT            0x99800000
    #define DSP_MEM_TEXT            0x99000000
    /* Co-locate alongside TILER region for easier flushing */
    #define DSP_MEM_IOBUFS          0x80000000
    //#define DSP_MEM_DATA            0x9A100000
    //#define DSP_MEM_HEAP            0x99C00000
    #define DSP_MEM_DATA            0x99900000
    #define DSP_MEM_HEAP            0x99400000
    
    //#define DSP_MEM_IPC_DATA        0x9A000000
    #define DSP_MEM_IPC_DATA        0x99800000
    #define DSP_MEM_IPC_VRING       0xA0000000
    #define DSP_MEM_RPMSG_VRING0    0xA0000000
    #define DSP_MEM_RPMSG_VRING1    0xA0004000
    #define DSP_MEM_VRING_BUFS0     0xA0040000
    #define DSP_MEM_VRING_BUFS1     0xA0080000
    
    #define DSP_MEM_IPC_VRING_SIZE  SZ_1M
    #define DSP_MEM_IPC_DATA_SIZE   SZ_1M
    #define DSP_MEM_TEXT_SIZE       SZ_1M
    #define DSP_MEM_DATA_SIZE       (SZ_1M * 16)
    #define DSP_MEM_HEAP_SIZE       (SZ_1M * 4)
    #define DSP_MEM_IOBUFS_SIZE     (SZ_1M * 90)
    
    /*
     * Assign fixed RAM addresses to facilitate a fixed MMU table.
     */
    /* See CMA BASE addresses in Linux side: arch/arm/mach-omap2/remoteproc.c */
    #define VAYU_DSP_1
    #if defined (VAYU_DSP_1)
    //#define PHYS_MEM_IPC_VRING      0x99800000
    #define PHYS_MEM_IPC_VRING      0x99000000
    #elif defined (VAYU_DSP_2)
    #define PHYS_MEM_IPC_VRING      0x9F000000
    #endif
    
    /* Need to be identical to that of IPU */
    #define PHYS_MEM_IOBUFS         0xBA300000
    
    /*
     * Sizes of the virtqueues (expressed in number of buffers supported,
     * and must be power of 2)
     */
    #define DSP_RPMSG_VQ0_SIZE      256
    #define DSP_RPMSG_VQ1_SIZE      256
    
    /* flip up bits whose indices represent features we support */
    #define RPMSG_DSP_C0_FEATURES         1
    
    struct my_resource_table {
        struct resource_table base;
    
        UInt32 offset[29];  /* Should match 'num' in actual definition */
    
        /* rpmsg vdev entry */
        struct fw_rsc_vdev rpmsg_vdev;
        struct fw_rsc_vdev_vring rpmsg_vring0;
        struct fw_rsc_vdev_vring rpmsg_vring1;
    
        /* text carveout entry */
        struct fw_rsc_carveout text_cout;
    
        /* data carveout entry */
        struct fw_rsc_carveout data_cout;
    
        /* heap carveout entry */
        struct fw_rsc_carveout heap_cout;
    
        /* ipcdata carveout entry */
        struct fw_rsc_carveout ipcdata_cout;
    
        /* sootoo23 - OCMC carveout entry */
        struct fw_rsc_carveout ocmc_cout;
    
        /* sootoo23 - PCIE Register */
        struct fw_rsc_carveout l2_sram_cout;
    
        /* trace entry */
        struct fw_rsc_trace trace;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem0;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem1;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem2;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem3;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem4;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem5;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem6;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem7;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem8;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem9;
    
        /* devmem entry */
        struct fw_rsc_devmem devmem10;
    
        struct fw_rsc_devmem devmem11;
        struct fw_rsc_devmem devmem12;
        struct fw_rsc_devmem devmem13;
        struct fw_rsc_devmem devmem14;
        struct fw_rsc_devmem devmem15;
        struct fw_rsc_devmem devmem16;
        struct fw_rsc_devmem devmem17;
        struct fw_rsc_devmem devmem18;
        struct fw_rsc_devmem devmem19;
        struct fw_rsc_devmem devmem20;
    };
    extern char ti_trace_SysMin_Module_State_0_outbuf__A;
    #define TRACEBUFADDR (UInt32)&ti_trace_SysMin_Module_State_0_outbuf__A
    
    #pragma DATA_SECTION(ti_ipc_remoteproc_ResourceTable, ".resource_table")
    #pragma DATA_ALIGN(ti_ipc_remoteproc_ResourceTable, 4096)
    
    struct my_resource_table ti_ipc_remoteproc_ResourceTable = {
        1,      /* we're the first version that implements this */
        29,     /* number of entries in the table */
        0, 0,   /* reserved, must be zero */
        /* offsets to entries */
        {
            offsetof(struct my_resource_table, rpmsg_vdev),
            offsetof(struct my_resource_table, text_cout),
            offsetof(struct my_resource_table, data_cout),
            offsetof(struct my_resource_table, heap_cout),
            offsetof(struct my_resource_table, ipcdata_cout),
            offsetof(struct my_resource_table, ocmc_cout),
            offsetof(struct my_resource_table, l2_sram_cout),
            offsetof(struct my_resource_table, trace),
            offsetof(struct my_resource_table, devmem0),
            offsetof(struct my_resource_table, devmem1),
            offsetof(struct my_resource_table, devmem2),
            offsetof(struct my_resource_table, devmem3),
            offsetof(struct my_resource_table, devmem4),
            offsetof(struct my_resource_table, devmem5),
            offsetof(struct my_resource_table, devmem6),
            offsetof(struct my_resource_table, devmem7),
            offsetof(struct my_resource_table, devmem8),
            offsetof(struct my_resource_table, devmem9),
            offsetof(struct my_resource_table, devmem10),
            offsetof(struct my_resource_table, devmem11),
            offsetof(struct my_resource_table, devmem12),
            offsetof(struct my_resource_table, devmem13),
            offsetof(struct my_resource_table, devmem14),
            offsetof(struct my_resource_table, devmem15),
            offsetof(struct my_resource_table, devmem16),
            offsetof(struct my_resource_table, devmem17),
            offsetof(struct my_resource_table, devmem18),
            offsetof(struct my_resource_table, devmem19),
            offsetof(struct my_resource_table, devmem20),
        },
    
        /* rpmsg vdev entry */
        {
            TYPE_VDEV, VIRTIO_ID_RPMSG, 0,
            RPMSG_DSP_C0_FEATURES, 0, 0, 0, 2, { 0, 0 },
            /* no config data */
        },
        /* the two vrings */
        { DSP_MEM_RPMSG_VRING0, 4096, DSP_RPMSG_VQ0_SIZE, 1, 0 },
        { DSP_MEM_RPMSG_VRING1, 4096, DSP_RPMSG_VQ1_SIZE, 2, 0 },
    
        {
            TYPE_CARVEOUT,
            DSP_MEM_TEXT, 0,
            DSP_MEM_TEXT_SIZE, 0, 0, "DSP_MEM_TEXT",
        },
    
        {
            TYPE_CARVEOUT,
            DSP_MEM_DATA, 0,
            DSP_MEM_DATA_SIZE, 0, 0, "DSP_MEM_DATA",
        },
    
        {
            TYPE_CARVEOUT,
            DSP_MEM_HEAP, 0,
            DSP_MEM_HEAP_SIZE, 0, 0, "DSP_MEM_HEAP",
        },
    
        {
            TYPE_CARVEOUT,
            DSP_MEM_IPC_DATA, 0,
            DSP_MEM_IPC_DATA_SIZE, 0, 0, "DSP_MEM_IPC_DATA",
        },
    
        //sootoo23-170310: OCMC Define
        {
            TYPE_CARVEOUT,
            DSP_OCMC_RAM, 0,
            //SZ_1M*3, 0, 0, "DSP_OCMC_RAM",
            SZ_1M*2, 0, 0, "DSP_OCMC_RAM",
        },
    
        //sootoo23-170313: DSP1 L2 SRAM Define
        {
            TYPE_CARVEOUT,
            DSP_L2_SRAM, 0,
            0x48000, 0, 0, "DSP_L2_SRAM",
        },
    
        {
            TYPE_TRACE, TRACEBUFADDR, 0x8000, 0, "trace:dsp",
        },
    
        {
            TYPE_DEVMEM,
            DSP_MEM_IPC_VRING, PHYS_MEM_IPC_VRING,
            DSP_MEM_IPC_VRING_SIZE, 0, 0, "DSP_MEM_IPC_VRING",
        },
    
        {
            TYPE_DEVMEM,
            DSP_MEM_IOBUFS, PHYS_MEM_IOBUFS,
            DSP_MEM_IOBUFS_SIZE, 0, 0, "DSP_MEM_IOBUFS",
        },
    
        {
            TYPE_DEVMEM,
            DSP_TILER_MODE_0_1, L3_TILER_MODE_0_1,
            SZ_256M, 0, 0, "DSP_TILER_MODE_0_1",
        },
    
        {
            TYPE_DEVMEM,
            DSP_TILER_MODE_2, L3_TILER_MODE_2,
            SZ_128M, 0, 0, "DSP_TILER_MODE_2",
        },
    
        {
            TYPE_DEVMEM,
            DSP_TILER_MODE_3, L3_TILER_MODE_3,
            SZ_128M, 0, 0, "DSP_TILER_MODE_3",
        },
    
        {
            TYPE_DEVMEM,
            DSP_PERIPHERAL_L4CFG, L4_PERIPHERAL_L4CFG,
            SZ_16M, 0, 0, "DSP_PERIPHERAL_L4CFG",
        },
    
        {
            TYPE_DEVMEM,
            DSP_PERIPHERAL_L4PER1, L4_PERIPHERAL_L4PER1,
            SZ_2M, 0, 0, "DSP_PERIPHERAL_L4PER1",
        },
    
        {
            TYPE_DEVMEM,
            DSP_PERIPHERAL_L4PER2, L4_PERIPHERAL_L4PER2,
            SZ_4M, 0, 0, "DSP_PERIPHERAL_L4PER2",
        },
    
        {
            TYPE_DEVMEM,
            DSP_PERIPHERAL_L4PER3, L4_PERIPHERAL_L4PER3,
            SZ_8M, 0, 0, "DSP_PERIPHERAL_L4PER3",
        },
    
        {
            TYPE_DEVMEM,
            DSP_PERIPHERAL_L4EMU, L4_PERIPHERAL_L4EMU,
            SZ_16M, 0, 0, "DSP_PERIPHERAL_L4EMU",
        },
    
        {
            TYPE_DEVMEM,
            DSP_PERIPHERAL_DMM, L3_PERIPHERAL_DMM,
            SZ_1M, 0, 0, "DSP_PERIPHERAL_DMM",
        },
    
        //sootoo23-170310: EDMA Define
        {
            TYPE_DEVMEM,
            DSP_EDMA_L3MEM, DSP_EDMA_L3MEM,
            SZ_1M*3, 0, 0, "DSP_EDMA_L3MEM",
        },
        //sootoo23-161228: cmem table define
        {
            TYPE_DEVMEM,
            DSP_CMEM_IOBUFS, CMEM_PHYS_IOBUFS,
            DSP_CMEM_IOBUFS_SIZE, 0, 0, "DSP_CMEM_IOBUFS",
        },
        //sootoo23-170313: PCIE Config Space Define
        {
            TYPE_DEVMEM,
            DSP_PCIESPACE_SS1, DSP_PCIESPACE_SS1,
            SZ_1M*256, 0, 0, "DSP_PCIESPACE_SS1",
        },
        {
            TYPE_DEVMEM,
            DSP_PCIESPACE_SS2, DSP_PCIESPACE_SS2,
            SZ_1M*256, 0, 0, "DSP_PCIESPACE_SS2",
        },
        //sootoo23-170313: PCIE Reg Define.
        {
            TYPE_DEVMEM,
            DSP_PCIEREG_SS1, DSP_PCIEREG_SS1,
            SZ_1M*8, 0, 0, "DSP_PCIEREG_SS1",
        },
        {
            TYPE_DEVMEM,
            DSP_PCIEREG_SS2, DSP_PCIEREG_SS2,
            SZ_1M*8, 0, 0, "DSP_PCIEREG_SS2",
        },
        //
        {
            TYPE_DEVMEM,
            0x40D05000, 0x40D05000,
            0x1000, 0, 0, "DSP_EDMA_TC0",
        },
        {
            TYPE_DEVMEM,
            0x40D06000, 0x40D06000,
            0x1000, 0, 0, "DSP_EDMA_TC1",
        },
        {
            TYPE_DEVMEM,
            0x40D10000, 0x40D10000,
            0x8000, 0, 0, "DSP_EDMA_CC",
        },
        {
            TYPE_DEVMEM,
            0x83000000, 0x40500000,
            0x100000, 0, 0, "DSP_CMEM_OCMC3",
        },
    };
    
    #endif /* _RSC_TABLE_VAYU_DSP_H_ */
    

    Why is there nothing in the Processor List?

    root@am57xx-evm:/apps# ./app_host -l
    --> main:
    Processor List
    root@am57xx-evm:/apps#



    Regards,
    John

  • Hi John,

    Not sure, let me test this on my evms. I only have AM5728 EVMs, but the example should not be different.
    One more clarification, you work on a custom EVM, right?

    Best Regards,
    Yordan
  • Hi Yordan,

    I have an AM5718 custom board and an AM5718 IDK board.

     

    I tried the IPC messageQ example on both boards,

    but the problem was not resolved.

    (ipc_3_50_03_04)

    Regards,

    John

  • Hi John,

    Just for the test, can you try PROCESSOR-SDK-LINUX-AM57X::
    www.ti.com/.../processor-sdk-am57x

    The LINUX-RT version may be missing some libraries in the filesystem.

    Best Regards,
    Yordan
  • Hi Yordan,

    I took a new SDK and tried to create a Rootfs image.
    However, the problem was not solved.

    MessageQ_open function returns MessageQ_E_NOTFOUND.

    root@am57xx-evm:/apps# ./app_host DSP1
    --> main:
    --> Main_main:
    --> App_create:

    Regards,
    John
  • I tried the following.

    root@am57xx-evm:/apps# cat /sys/kernel/debug/remoteproc/remoteproc2/trace0
    [ 0.000] Watchdog enabled: TimerBase = 0x48086000 Freq = 19200000
    [ 0.000] 17 Resource entries at 0x95000000
    [ 0.000] [t=0x000582fd] xdc.runtime.Main: --> main:
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [ 0.000] [t=0x000a610b] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [ 0.000] [t=0x000c80b1] xdc.runtime.Main: --> smain:
    [ 0.000] [t=0x000e73a4] Server: Server_create: server is ready
    [ 0.000] [t=0x000f766d] Server: <-- Server_create: 0
    [ 0.000] [t=0x00104237] Server: --> Server_exec:


    root@am57xx-evm:/apps# killall lad_dra7xx;
    root@am57xx-evm:/apps# /usr/bin/lad_dra7xx -l lad.txt;

    root@am57xx-evm:/apps# cat /tmp/LAD/lad.txt

    [0.418004]
    Initializing LAD... [0.418246]
    opening FIFO: /tmp/LAD/LADCMDS
    [78.051427] Retrieving command...
    [78.051713]
    LAD_CONNECT:
    [78.051724] client FIFO name = /tmp/LAD/1410
    [78.051733] client PID = 1410
    [78.051740] assigned client handle = 0
    [78.051781] FIFO /tmp/LAD/1410 created
    [78.051831]
    WARN: Client /tmp/LAD/1410 has not yet opened, will retry
    [78.052102] FIFO /tmp/LAD/1410 opened for writing
    [78.052147] sent response
    [78.052156] DONE
    [78.052163] Retrieving command...
    [78.052294] Sending response...
    [78.052313] Retrieving command...
    [78.052369] LAD_MULTIPROC_GETCONFIG: calling MultiProc_getConfig()...
    [78.052381] MultiProc_getConfig() - 5 procs
    [78.052389] # processors in cluster: 5
    [78.052396] cluster baseId: 0
    [78.052403] ProcId 0 - "HOST"
    [78.052410] ProcId 1 - "IPU2"
    [78.052417] ProcId 2 - "IPU1"
    [78.052423] ProcId 3 - "DSP2"
    [78.052430] ProcId 4 - "DSP1"
    [78.052437] status = 0
    [78.052443] DONE
    [78.052450] Sending response...
    [78.052463] Retrieving command...
    [78.052519] LAD_NAMESERVER_SETUP: calling NameServer_setup()...
    [78.052531] NameServer_setup: entered, refCount=0
    [78.052575] NameServer_setup: creating listener thread
    [78.052702] NameServer_setup: exiting, refCount=1
    [78.052718] status = 0
    [78.052726] DONE
    [78.052733] Sending response...
    [78.052750] Retrieving command...
    [78.052808] LAD_MESSAGEQ_GETCONFIG: calling MessageQ_getConfig()...
    [78.052818] status = 0
    [78.052826] DONE
    [78.052833] Sending response...
    [78.052848] Retrieving command...
    [78.052900] LAD_MESSAGEQ_SETUP: calling MessageQ_setup()...
    [78.052910] MessageQ_setup: entered, refCount=0
    [78.052918] NameServer_create(): 'MessageQ'
    [78.052939] MessageQ_setup: exiting, refCount=1
    [78.052948] status = 0
    [78.052955] DONE
    [78.052962] Sending response...
    [78.052977] Retrieving command...
    [78.053162] NameServer_attach: --> procId=1, refCount=0
    [78.053298] listener_cb: Entered Listener thread.
    [78.053312] NameServer: waiting for unblockFd: 1, and socks: maxfd: 1
    [78.056124] NameServer_attach: socket failed: Domain 44, Error no 97, Error string:Address family not supported by protocol
    [78.056158] NameServer_attach: <-- refCount=0, status=-1
    [78.056168] Sending response...
    [78.056197] Retrieving command...
    [78.056271] NameServer_attach: --> procId=2, refCount=0
    [78.065785] NameServer_attach: socket failed: Domain 44, Error no 97, Error string:Address family not supported by protocol
    [78.065813] NameServer_attach: <-- refCount=0, status=-1
    [78.065823] Sending response...
    [78.065850] Retrieving command...
    [78.065925] NameServer_attach: --> procId=3, refCount=0
    [78.068515] NameServer_attach: socket failed: Domain 44, Error no 97, Error string:Address family not supported by protocol
    [78.068536] NameServer_attach: <-- refCount=0, status=-1
    [78.068546] Sending response...
    [78.068570] Retrieving command...
    [78.068635] NameServer_attach: --> procId=4, refCount=0
    [78.070960] NameServer_attach: socket failed: Domain 44, Error no 97, Error string:Address family not supported by protocol
    [78.070980] NameServer_attach: <-- refCount=0, status=-1
    [78.070989] Sending response...
    [78.071013] Retrieving command...
    [78.071082] LAD_GATEMP_ISSETUP: calling GateMP_isSetup()...
    [78.071092] status = 0
    [78.071100] DONE
    [78.071108] Sending response...
    [78.071127] Retrieving command...
    [78.071310] LAD_MESSAGEQ_CREATE: calling MessageQ_create(0x307b0, 0x307d0)...
    [78.071322] MessageQ_create: creating 'HOST:MsgQ:01'
    [78.071333] MessageQ_create: returning obj=0x355d8, qid=0x80
    [78.071342] status = 0
    [78.071350] DONE
    [78.071357] Sending response...
    [78.071376] Retrieving command...
    [78.071438] LAD_MESSAGEQ_ANNOUNCE: calling MessageQ_announce(0x307b0, 0x355d8)...
    [78.071449] MessageQ_announce: announcing 0x355d8
    [78.071461] NameServer_add: Entered key: 'HOST:MsgQ:01', data: 0x80
    [78.071470] status = 0
    [78.071529] DONE
    [78.071539] Sending response...
    [78.071560] Retrieving command...
    [78.071792] LAD_NAMESERVER_GETUINT32: calling NameServer_getUInt32(0x354f0, 'DSP1:MsgQ:01')...
    [78.071808] NameServer_getLocal: entry key: 'DSP1:MsgQ:01' not found!
    [78.071839] NameServer_getRemote: no socket connection to processor 1
    [78.071865] NameServer_getRemote: no socket connection to processor 2
    [78.071874] NameServer_getRemote: no socket connection to processor 3
    [78.071882] NameServer_getRemote: no socket connection to processor 4
    [78.071890] value = 0x80
    [78.071897] status = -5
    ......
    ......
    ......


    NameServer_getLocal: entry key: 'DSP1:MsgQ:01' not found!

  • Hi, Yohan,

    Could you try the prebuilt ex02_messageq binaries? I ran it using RT Linux 5.2 release on AM5718 IDK, and I don't see the issue. Below are the console logs.

    root@am57xx-evm:/lib/firmware# uname -a
    Linux am57xx-evm 4.14.79-rt47-g28d73230da #1 SMP PREEMPT RT Sun Dec 16 04:27:40 UTC 2018 armv7l GNU/Linux

    root@am57xx-evm:~# cd /lib/firmware/
    root@am57xx-evm:/lib/firmware# ls -l dra7-dsp?-fw.xe66
    lrwxrwxrwx 1 root root 46 Dec 20 2018 dra7-dsp1-fw.xe66 -> /lib/firmware/dra7-dsp1-fw.xe66.opencl-monitor
    lrwxrwxrwx 1 root root 46 Dec 20 2018 dra7-dsp2-fw.xe66 -> /lib/firmware/dra7-dsp2-fw.xe66.opencl-monitor
    root@am57xx-evm:/lib/firmware#

    root@am57xx-evm:/lib/firmware# ls /usr/bin/ipc/examples/ex02_messageq/debug/
    app_host server_dsp2.xe66 server_ipu2.xem4
    server_dsp1.xe66 server_ipu1.xem4
    root@am57xx-evm:/lib/firmware# ln -sf /usr/bin/ipc/examples/ex02_messageq/debug/server_dsp1.xe66 dra7-dsp1-fw.xe66
    root@am57xx-evm:/lib/firmware# ln -sf /usr/bin/ipc/examples/ex02_messageq/debug/server_dsp2.xe66 dra7-dsp2-fw.xe66

    root@am57xx-evm:/lib/firmware# ls -l dra7-dsp?-fw.xe66
    lrwxrwxrwx 1 root root 58 Dec 16 03:37 dra7-dsp1-fw.xe66 -> /usr/bin/ipc/examples/ex02_messageq/debug/server_dsp1.xe66
    lrwxrwxrwx 1 root root 58 Dec 16 03:37 dra7-dsp2-fw.xe66 -> /usr/bin/ipc/examples/ex02_messageq/debug/server_dsp2.xe66

    [Power Cycle the EVM]

    am57xx-evm login: root
    root@am57xx-evm:~# dmesg | grep dsp
    [ 0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
    [ 0.521300] iommu: Adding device 40800000.dsp to group 0
    [ 16.017348] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
    [ 16.227727] remoteproc remoteproc2: 40800000.dsp is available
    [ 16.787637] remoteproc remoteproc2: powering up 40800000.dsp
    [ 16.787653] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4714172
    [ 16.914838] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    [ 17.195281] remoteproc remoteproc2: remote processor 40800000.dsp is now up

    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc2/name
    40800000.dsp
    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc2/trace0
    [ 0.000] Watchdog disabled: TimerBase = 0x48086000 ClkCtrl = 0x4a009728
    [ 0.000] 17 Resource entries at 0x95000000
    [ 0.000] [t=0x00053fb3] xdc.runtime.Main: --> main:
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [ 0.000] [t=0x000a16c2] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [ 0.000] Watchdog disabled: TimerBase = 0x48086000 ClkCtrl = 0x4a009728
    [ 0.000] [t=0x000da51e] xdc.runtime.Main: --> smain:
    [ 0.000] [t=0x0010a4a1] Server: Server_create: server is ready
    [ 0.000] [t=0x00121091] Server: <-- Server_create: 0
    [ 0.000] [t=0x0013136c] Server: --> Server_exec:
    root@am57xx-evm:~# /usr/bin/ipc/examples/ex02_messageq/debug/app_host DSP1
    --> main:
    --> Main_main:
    --> App_create:
    App_create: Host is ready
    <-- App_create:
    --> App_exec:
    App_exec: sending message 1
    App_exec: sending message 2
    App_exec: sending message 3
    App_exec: message received, sending message 4
    App_exec: message received, sending message 5
    App_exec: message received, sending message 6
    App_exec: message received, sending message 7
    App_exec: message received, sending message 8
    App_exec: message received, sending message 9
    App_exec: message received, sending message 10
    App_exec: message received, sending message 11
    App_exec: message received, sending message 12
    App_exec: message received, sending message 13
    App_exec: message received, sending message 14
    App_exec: message received, sending message 15
    App_exec: message received
    App_exec: message received
    App_exec: message received
    <-- App_exec: 0
    --> App_delete:
    <-- App_delete:
    <-- Main_main:
    <-- main:
  • Below is the log of my board.

    root@am57xx-evm:/lib/firmware# uname -a
    Linux am57xx-evm 4.14.79-rt47-g28d73230da #1 SMP PREEMPT RT Wed Jan 2 10:44:49 KST 2019 armv7l GNU/Linux


    root@am57xx-evm:/lib/firmware# ls -l dra7-dsp*-fw.xe66
    lrwxrwxrwx 1 root root 17 Dec 18 22:55 dra7-dsp1-fw.xe66 -> /usr/bin/ipc/examples/ex02_messageq/debug/server_dsp1.xe66
    lrwxrwxrwx 1 root root 46 Jan 10 2019 dra7-dsp2-fw.xe66 -> /lib/firmware/dra7-dsp2-fw.xe66.opencl-monitor

    root@am57xx-evm:~# cd /sys/bus/platform/drivers/omap-rproc;

    oot@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > unbind
    omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    remoteproc remoteproc0: stopped remote processor 40800000.dsp
    remoteproc remoteproc0: releasing 40800000.dsp
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc#
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 40800000.dsp > bind
    omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
    remoteproc remoteproc0: 40800000.dsp is available
    remoteproc remoteproc0: powering up 40800000.dsp
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# remoteproc remoteproc0: Booting fw image dra7-dsp1-fw.xe66, size 4714172
    omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
    omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
    alloc_contig_range: [99004, 99007) PFNs busy
    prueth pruss1_eth: port 1: using random MAC addr: 8e:88:4d:80:d4:00
    virtio_rpmsg_bus virtio0: rpmsg host is online
    remoteproc remoteproc0: registered virtio0 (type 7)
    remoteproc remoteproc0: remote processor 40800000.dsp is now up
    virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x3d
    prueth pruss1_eth: port 1: using random MAC addr: c2:e6:29:96:27:61
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# cd ~
    root@am57xx-evm:~#

    root@am57xx-evm:~# dmesg | grep dsp
    dmesg | grep dsp
    [ 0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
    [ 0.519136] iommu: Adding device 40800000.dsp to group 0
    [ 2.493640] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
    [ 2.493709] remoteproc remoteproc2: 40800000.dsp is available
    [ 2.575088] remoteproc remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
    [ 2.582873] remoteproc remoteproc2: powering up 40800000.dsp
    [ 2.587320] remoteproc remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
    [ 85.904341] remoteproc remoteproc2: releasing 40800000.dsp
    [ 88.043661] omap-rproc 40800000.dsp: assigned reserved memory node dsp1-memory@99000000
    [ 88.051542] remoteproc remoteproc2: 40800000.dsp is available
    [ 88.476473] remoteproc remoteproc2: powering up 40800000.dsp
    [ 88.480859] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 4714172
    [ 88.497105] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    [ 88.542420] remoteproc remoteproc2: remote processor 40800000.dsp is now up

    root@am57xx-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc2/name
    40800000.dsp
    root@am57xx-evm:~#cat /sys/kernel/debug/remoteproc/remoteproc2/trace0
    [ 0.000] Watchdog enabled: TimerBase = 0x48086000 Freq = 19200000
    [ 0.000] 17 Resource entries at 0x95000000
    [ 0.000] [t=0x00058669] xdc.runtime.Main: --> main:
    [ 0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [ 0.000] [t=0x000a670e] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [ 0.000] [t=0x000c8cb6] xdc.runtime.Main: --> smain:
    [ 0.000] [t=0x000e7df7] Server: Server_create: server is ready
    [ 0.000] [t=0x000f820d] Server: <-- Server_create: 0
    [ 0.000] [t=0x00104e5e] Server: --> Server_exec:
    root@am57xx-evm:~# /usr/bin/ipc/examples/ex02_messageq/debug/app_host DSP1
    --> main:
    --> Main_main:
    --> App_create:
  • Hi, Yohan,

    Is this run on TI IDK or your board? If it is your board, do you see the same on TI AM5718 IDK?
    I can't explain why it doesn't work for you if it is the same software release.
    You should be able to recreate the successful example run using released software.
    If not, you should find out what's different from TI environment.

    Rex
  • Hi Rex,

    The same problem occurs on the IDK board.

    The root file system was too large to delete unnecessary files.
    Optimized RFS is used.

    Maybe this is the cause of the problem.

    We haven't solved the problem yet, but we'll close this thread.
  • Hi, Yohan,

    For 5.2 release, it requires 16GB SD card if that is not what you have. Please give it a try. I'll close this one. Thanks!

    Rex