Greetings! Arnaud Patard (Rtp) <[email protected]> writes:
> Camm Maguire <[email protected]> writes: > > Hi, > >> Greetings! OK I think we've found it. >> >> A long time ago, some very helpful arm developer told me how to clear >> the instruction and data caches. GCL needs to do this as it loads >> compiled code into its .data section, relocates it, clears the cache, >> and then executes. >> >> Here is the arm bit: >> >> #define CLEAR_CACHE do {\ >> void *v=memory->cfd.cfd_start,*ve=v+memory->cfd.cfd_size; \ >> register unsigned long _beg __asm ("a1") = (unsigned long)(v); \ >> register unsigned long _end __asm ("a2") = (unsigned long)(ve);\ >> register unsigned long _flg __asm ("a3") = 0; \ >> __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ >> : "=r" (_beg) \ >> : "0" (_beg), "r" (_end), "r"(_flg)); \ >> } while (0) > > hmm... it looks like oabi syscall not eabi syscall. > >> >> >> Since this time, many architectures use more portable alternatives > > On recent enough gcc (>= 4.1 iirc), __clear_cache() should be a more > portable way to clean caches. Can you give it a try ? > Thanks! This is installed and appears to be working. Take care, > > Arnaud > > > -- Camm Maguire [email protected] ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah _______________________________________________ Gcl-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gcl-devel
