[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: Flushing the data cache
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Re: Flushing the data cache |
Date: |
13 Nov 2002 22:00:48 -0500 |
Greetings! This is exactly what I needed. Thanks!
On a separate note -- are there issues with fakeroot or its equivalent
on ia64 currently? I can build acl2 there fine by hand as an ordinary
user, but get a SIGILL when using fakeroot. The later error also
appears to have hit the autobuild.
Take care,
David Mosberger <address@hidden> writes:
> >>>>> On Wed, 13 Nov 2002 19:04:44 -0500, Camm Maguire <address@hidden> said:
>
> Camm> Greetings! GCL loads binary modules into its data section,
> Camm> and then attempts executing the code thus loaded. On some
> Camm> RISC machines, it needs to flush the data cache after writing
> Camm> and before executing. Some samples are included at the end of
> Camm> this post.
>
> Camm> What I'm looking for is the analog on ia64, which does appear
> Camm> to be necessary after all. Can anyone help?
>
> I attached the GNU C routine which flushes the cache in the address
> range [ADDR,ADDR+LEN). Hope that helps.
>
> --david
>
> static void
> flush_cache (void *addr, unsigned long len)
> {
> void *end = (char *) addr + len;
>
> while (addr < end)
> {
> asm volatile ("fc %0" :: "r"(addr));
> addr = (char *) addr + 32;
> }
> asm volatile (";;sync.i;;srlz.i;;");
> }
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah