Tool/software: TI-RTOS
We have a main program running on Core 0 and “helper” programs running on Cores 1-5. The Core 1-5 programs are identical. The main program on Core 0 puts into MSM data for the Core 1-5 programs to munch on and they return the results also in MSM. Each Core has its own location in MSM so there’s no need for them to “coordinate” with each other. We are using the Semaphore2 mechanism for synchronicity between Core 0 and the Helpers.
Also, its’ worth noting that we don’t have any DDR memory. All of the programs run out of their respective L2 memory. Thus, ALL L2 memory is configured as SRAM, none of it is configured as cache.
What I think I’ve discovered is that when L2 is configured as SRAM, the MSM is automatically configured to be cached by L1D. This presents a problem in that if Core 0 writes data to MSM, Cores 1-5 will not see this new data if the previously read data is in their L1D. And the same happens if Cores 1-5 write data and Core 0 wants to read it.
The same thing happens when DMA is used. And we’re doing a LOT of DMA.
The solution, of course, is to “invalidate L1D” before reading a location in MSM. But this is going to be a pain because Core 0 and Cores 1-5 do a LOT of reading from MSM in many, many places throughout the code. It is just going to be a LOT of invalidating.
We can also completely invalidate ALL of L1D caching, but L1D exists to speed up processing and we also have very tight timing requirements so we would like to take advantage of L1D where we can.
The perfect solution would be to configure MSM as “non-cacheable”. I can do this in VxWorks and every other RTOS that I’ve ever used. But from reading other posts in the Forum and scouring the TI Documentation, this does not seem to be possible with TI-RTOS. I’ve even seen responses from TI in the Forum where they say it is not possible to turn off caching for selective memory regions. Only invalidating, which must be done every time you want to read it.
So, to boil it all down to one question: Is it possible to configure MSM to be non-cacheable for L1D when L2 is used as SRAM?
Thanks,
David Hague