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.

ListMP data not syncing

Other Parts Discussed in Thread: SYSBIOS

Hi,

I am using ListMP to pass data between ARM and DSP in 8148. But the data is not synced always. 

Both ARM and DSP are using gate to protect the List

		// get the gate for the ListMP instance
gate = ListMP_getGate(ghandleListMP);

// Begin protection against modification of the ListMP.
key = GateMP_enter(gate);

while ((elem = ListMP_next(ghandleListMP, elem)) != NULL)
{

pListMPNode = (GRG_RINGIO_LISTMP_NODE *)elem;

if(pListMPNode->u32GrgSessionId == u32GrgSessionId)
{

if(pListMPNode->eRingIODirection == eRingIODirection)
{

System_printf ( "Index = %x", pListMPNode->u32Index);
break;
}

}

}

// End protection against modification of the ListMP.
GateMP_leave(gate, key);

The data is correct in few nodes but not in all nodes

Can anybody help me on this?

Thanks
Jibin
  • Jibin,

    Do you have cache enabled? If you do, you need to maintain the cache coherency for the application portion of the structure you put on the list. For example, if this is your structure

    struct MyListElem {
        ListMP_Elem elem;
        Int sizeofBuffer;
        Char someBuffer[1024];
    };

    struct MyListElem foo;

    Before you add foo onto the ListMP, you must do a

    Cache_wbInv(foo, ...); // look at the ti/sysbios/hal/Cache APIs for the exact definition

    Similarly, on the receiving side, you should invalid the memory to make sure there is no stale data present.

    ListMP maintains cache coherency for the elem portion, but since it does not know the size of the structure, it cannot maintain complete cache coherency. FYI: MessageQ maintains cache coherency on the entire message since it knows the size.

    Todd