This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Synchronization in SMP-system WFE/SEV DMB/DSB

Note: This was originally posted on 31st October 2011 at http://forums.arm.com

Hi, I'm trying to synchronize a Cortex-A9 MPCore in SMP mode, but am failing this far. I tried to figure out how to use the barriers correctly, but apparently I'm missing something. The code looks basically like this:

CPU0:
   str   r0, [ADDR]
   dsb
   sev

CPU1:
   wfe
   dsb    @ I added this later, doesn't seem to have any effect
   ldr   r0, [ADDR]



The problem is, CPU1 reads stale data (at least I consider it stale). I'm pretty sure it's some coherency problem, since the code works as expected with caches disabled.
I already checked:
- the MMU is enabled
- SMP bit is set in aux-ctrl
- I'm accessing fully-cacheable memory
- The SCU reports two CPUs taking part in coherent SMP.

Any hints are appreciated.
Parents Reply Children
No data