gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: Flushing the d-cache (was Re: BFD relocations)


From: Philip Blundell
Subject: [Gcl-devel] Re: Flushing the d-cache (was Re: BFD relocations)
Date: 14 Jun 2002 17:16:11 +0100

On Fri, 2002-06-14 at 16:51, Camm Maguire wrote:
> #define CLEAR_CACHE do {\
>   void *v=memory->cfd.cfd_start,*ve=v+memory->cfd.cfd_size; \
>   for (;v<ve;v+=16)   {   \
>        register unsigned long _beg __asm ("a1") = (unsigned long)(v); \
>        register unsigned long _end __asm ("a2") = (unsigned long)(v+16);\
>        register unsigned long _flg __asm ("a3") = 0;                  \
>        __asm __volatile ("swi 0x9f0002                @ sys_cacheflush"       
> \
>                   : /* no outputs */                                  \
>                   : /* no inputs */                                   \
>                   : "a1");                                            \
>        }\

You don't need the loop.  The arm sys_cacheflush can be given arbitrary
regions, it works the cache line size out for itself.

p.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]