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