Specifications
20 TMS320C6457 Fixed-Point Digital Signal Processor Silicon Errata SPRZ293A—November 2009
Silicon Updates
www.ti.com
Silicon Revisions 1.0, 1.1, 1.2, 1.3, 1.4 Submit Documentation Feedback
To prevent this sort of race condition, programs should discard in-bound DMA buffers
in UMAP1 immediately after use, and keep a strict policy of buffer ownership, such that
a given buffer is owned only by the CPU or the DMA at any given time.
This model assumes the following steps:
1. DMA fills the buffer during a period when the CPU does not access it
2. DMA engine or other mechanism signals to the CPU that it has finished filling
the buffer.
3. CPU operates on the buffer, reading and writing to it as necessary. The DMA
does not access the buffer at this time.
4. CPU relinquishes control of the buffer, so that DMA may refill it
– This last step may be an implicit step in many implementations if the period
between refills is much longer than the time it takes the CPU to process the
refilled buffer.
To implement this workaround, programmers must write back and invalidate the
buffer from L1D cache after step 3 and before step 4. This simply eliminates the
prerequisite for the bug to occur should another DMA in the future be a set match to
the reads that the CPU just performed.
There are multiple mechanisms for doing this, but the most straightforward is to use
the L1D block cache writeback-invalidate mechanism via L1DWIBAR / L1DWIWC.
Provided with this document is the recommended implementation (see the code listing
for l1d_block_wbinv.asm in section of Appendix A—Code Examples). It can be
invoked as follows:
void l1d_block_wbinv(void *base, size_t byte_count);
To writeback-invalidate a C array, one could then do:
char array[SIZE];
/* ... */
l1d_block_wbinv(&array[0], sizeof(array));
Programmers should insert such a call whenever the code is done with a particular
DMA buffer in UMAP1, before the DMA controller can refill it. The
l1d_block_wbinv() function is non-interruptible. Its overhead is proportional to the
size of the buffer.










