>How I can reset or flush D-Cache on Arm?

>From an application, or in the kernel?

For the former, you need something like this (from glibc):

#define CLEAR_CACHE(BEG,END)                                            \
{                                                                       \
  register unsigned long _beg __asm ("a1") = (unsigned long)(BEG);      \
  register unsigned long _end __asm ("a2") = (unsigned long)(END);      \
  register unsigned long _flg __asm ("a3") = 0;                         \
  __asm __volatile ("swi 0x9f0002               @ sys_cacheflush"       \
                    : /* no outputs */                                  \
                    : /* no inputs */                                   \
                    : "a1");                                            \
}

For the latter, you need the flush_cache_xx() functions that are defined in 
asm-arm/proc-xx/cache.h.

p.



_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm

Reply via email to