gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: gcl and reverse dependencies on arm


From: Camm Maguire
Subject: [Gcl-devel] Re: gcl and reverse dependencies on arm
Date: Thu, 28 Jan 2010 13:53:46 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Greetings!

Arnaud Patard (Rtp) <address@hidden> writes:

> Camm Maguire <address@hidden> 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                                        address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

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