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

Invalidating Cache Lines

Note: This was originally posted on 25th July 2013 at http://forums.arm.com

Hi

I'm trying to invalidate specific areas of the data caches (L1 and L2) on a dual A9 architecture (Zynq 7000). Looking specifically at the L1 cache, some sample code I have suggests:


  for(all affected cache lines)
  {
    MCR p15 DCIMVAC cacheLine
    dsb
}



This is slow  .

I wondered if the dsb is needed between every MCR? Could I just do:


  for(all affected cache lines)
  {
    MCR p15 DCIMVAC cacheLine
  }
  dsb



I noted 'A.1.6. Delayed operation of CP15 instructions' in the 'Fast Models Reference Manual' but I'm having trouble tracking down information on sequential operations on the same coprocessor register.

Also... does anyone have any better cache-range invalidation methods?

Cheers

Joe
0