Using an OMAPL138, set up a couple SharedRegions, allocated memory using HeapMemMP on the DSP side...how do I get the ptrs across to the ARM side?
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.
Using an OMAPL138, set up a couple SharedRegions, allocated memory using HeapMemMP on the DSP side...how do I get the ptrs across to the ARM side?
If you are going to implement your own low level address forwarding between the cores you can convert each HeapMemMP allocated 'local' pointer to a 'portable' shared-region pointer and always send portable SR-addresses to the remote core. You can use SharedRegion APIs for the conversion:
When the remote core receives the portable SR-pointer, it should be converted to a 'local' virtual address in order for local CPU to access to the shared memory. Following code snippets from the documentation can be used on the sender and receiver sides:
SharedRegion_SRPtr srptr; Ptr addr; UInt16 id;
--- Sender --- // Sender: to get the id of the local address if id is not already known. id = SharedRegion_getId(addr); // Sender: to get the shared region pointer for the local address srptr = SharedRegion_getSRPtr(addr, id);
// now the 'srptr' can be sent across in a message. --------------
---- Receiver ---
// to get the local address from the shared region pointer addr = SharedRegion_getPtr(srptr);
// use 'addr' for local CPU access
------------------
Please note that if you are using higher level APIs for cross core communication (such as codec engine/VISA, syslink, ...) this type of address translation along with additional cache coherence operations are automatically handled for you by the APIs, and you would typically only pass local virtual addresses, so do check the API references.
Also note that, if you have cache enabled for the shared region on either core, you also must ensure cache coherence with respect to each processor's core when passing shared region memory buffers. See following topic for some details:
http://processors.wiki.ti.com/index.php/Cache_Management
Best regards,
Murat
already did that got other problems now cant seem to turn off cache on DSP and get past IPCStart()...