Memory barriers...
Posted: Sat Feb 22, 2014 7:41 pm
The BCM2835 SOC document (p.7) is actually quite clear about when and where memory barriers are required. However, it refers to "memory write barriers" and "memory read barriers".
The ARM v6 ARM talks about DataMemoryBarrier (DMB) and DataSynchronizationBarrier (DSB), noting that the DSB used to be referred to historically (ie. it's deprecated) as DataWriteBarrier (DWB).
Is it thus correct to place a MCR p15,0,r0,c7,c10,5 // DMB instruction wherever the Broadcom doc says one should put a memory read or write barrier?
The ARM v6 ARM talks about DataMemoryBarrier (DMB) and DataSynchronizationBarrier (DSB), noting that the DSB used to be referred to historically (ie. it's deprecated) as DataWriteBarrier (DWB).
Is it thus correct to place a MCR p15,0,r0,c7,c10,5 // DMB instruction wherever the Broadcom doc says one should put a memory read or write barrier?