Re: Cleaning cache on a SBC2440-II (ARM920T) board

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


On Fri, Nov 28, 2008 at 12:10:54PM +0100, Malte Wienecke wrote:
> Is there a possibility to clean the data cache on an arm920t board  
> under arm-linux?
> 
> I'm working on a c program, where a lookup table must be removed from  
> the cache or the entire cache cleaned.
> Is this possible without causing an segmentation fault as normal root  
> user?

There is a system call to allow that - sys_cacheflush.  You may have it
in your C library or you may not.  If not, you'll have to use
syscall() to access it.

The prototype for this call is:

long sys_cacheflush(void *start, void *end, int flags);

where 'flags' should be zero.  To use syscall():

	err = syscall(__ARM_NR_cacheflush, start, end, flags);

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter