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.

evmDM8148: ipc sync failed with ARM A8

Hi, All

I ported my software (A8 Linux app and DSP C674x) from evmDM8168 to evmDM8148. I tried to load my DSP image on evmDM8148 but it always got stuck at Ipc_attach() due to both sides are waiting for remote->startedKey to be set to 1(Ipc_PROCSYNCSTART or ti_sdo_ipc_Ipc_PROCSYNCSTART) but it never happened.

Packages I'm using are:

ipc_1_22_03_23
 codec_engine_3_21_00_13_eng
 xdctools_3_20_09_90_eng
 syslink_02_00_00_68_beta1
 bios_6_31_04_27

 ti_cgt_c6000_7.2.0

TI814X-LINUX-PSP-04.01.00.02

I used CCS to connect to DSP core when it got stuck and found that in Ipc_attach(), Ipc_module->ipcSharedAddr is 0 which caused wrong shared memory pointers, e.g. self and remote in ti_sdo_ipc_Ipc_procSyncStart().

If I changed in ti_sdo_ipc_Ipc_procSyncStart() so that sharedAddr equals to my SR0 base (0x8E000000), then sync OK between A8 and C674, but failed in other place which also uses Ipc_module->ipcSharedAddr.

 

I saw Ipc_start() called following to getipcSharedAddr:

    ipcSharedAddr = ti_sdo_ipc_SharedRegion_reserveMemory(
            0, Ipc_getRegion0ReservedSize());

And in ti_sdo_ipc_SharedRegion_reserveMemory() it uses SharedRegion_module->regions[id] to get actual address, where id=0.

Ptr ti_sdo_ipc_SharedRegion_reserveMemory(UInt16 id, SizeT size)
{
    ti_sdo_ipc_SharedRegion_Region *region;
    UInt32 minAlign;
    SizeT curSize, newSize;
    Ptr   retPtr;
   
    /* Need to make sure id is smaller than numEntries */
    Assert_isTrue((id < ti_sdo_ipc_SharedRegion_numEntries),
        ti_sdo_ipc_SharedRegion_A_idTooLarge);
   
    /* assert that region at specified id is valid */
    Assert_isTrue(SharedRegion_module->regions[id].entry.isValid == TRUE,
                  ti_sdo_ipc_SharedRegion_A_regionInvalid);

    minAlign = Memory_getMaxDefaultTypeAlign();
    if (SharedRegion_getCacheLineSize(id) > minAlign) {
        minAlign = SharedRegion_getCacheLineSize(id);
    }
   
    region = &(SharedRegion_module->regions[id]);
   
    /* Set the current size to the reservedSize */
    curSize = region->reservedSize;
   
    /* No need to round here since curSize is already aligned */
    retPtr = (Ptr)((UInt32)region->entry.base + curSize);
    
    /*  Round the new size to the min alignment since */
    newSize = _Ipc_roundup(size, minAlign);
   
    /* Need to make sure (curSize + newSize) is smaller than region len */
    Assert_isTrue((region->entry.len >= (curSize + newSize)),
                   ti_sdo_ipc_SharedRegion_A_reserveTooMuch);
       
    /* Add the new size to current size */
    region->reservedSize = curSize + newSize;
   
    return (retPtr);
}

I'm attaching my configuration files (most were copied from codec_engine_3_21_00_13_eng\examples\ti\sdo\ce\examples. The main cfg file is devenodeServer.cfg.

I don't know why I got 0 as ipcSharedAddr when I configured my SR0 base as 0x8E000000.

I have asked SysLink and CE team for help, but they didn't see my configurations wrong.

I hope somebody in BIOS forum can help me out of this issue.

 

Many thanks in advance.

Bin


server_cfg.zip
  • Bin, do you check whether Ipc_start succeeds?  A NULL ipcSharedAddr value is indicative of an Ipc_start failure.

    The IPC examples do something like this:

        status = Ipc_start();
        if (status < 0) {
            System_abort("Ipc_start failed\n");
        }

    Ipc_attach currently doesn't check whether Ipc_start succeeded.  We will add such a check in a future release of IPC.

    Regards,

    Shreyas

  • Hi,

    I am currently working on 814X board.  You have mentioned that you have used  TI814X-LINUX-PSP-04.01.00.02 package. I want to download this PSP TI814X-LINUX-PSP-04.01.00.02.But from TI website I can download  TI814X-LINUX-PSP-04.01.00.03 version only.

    So please, send me the link and guide me to download this PSP-04.01.00.02 version. If possible please, upload the complete package while replying to my e-mail.

    Regards...

    PRABHU K

     

  • Sorry, I downloaded from TI internal site. I don't understand why you can not use 04.01.00.03. It should be better than 04.01.00.02.

  • Shreyas,

    I changed build option to build DSP in ELF format instead of COFF. Before that, I have changed and rebuilt SysLink with ELF loader and C674_ELF. My ARM side application was changed and rebuilt too to use new DSP configuration.

    All builds were OK, but when ARM application tried to load DSP, I got "Ipc_procSyncStart failed!" again. All tools are same as we used for COFF (See first post in this thread).

    Is there any thing I missed to change DSP from COFF to ELF?

     

    Thanks,

    Bin