Subject: Re: cache flush
To: Matt Thomas <>
From: Emmanuel Dreyfus <>
List: port-powerpc
Date: 11/29/2003 10:20:10
Matt Thomas <> wrote:

> > What is the prefered way to flush caches from C code in the kernel? Is
> > there a routine to call in locore, or should I inline the necessary
> > instructions in asm? (and what are the necessary instructions?)
> Why do you want to do this?

To support this Mach service:


   Function - Get/set the target memory region's special attributes.


          [in scalar] The name of the attribute to be get/set. Possible
          values are:
                Cachability. Aside from the generic values listed below,
                the following special values are defined:
                      Flush from all caches
                      Flush from data caches
                      Flush from instruction caches

For a given range of memory (typically delimited by a uvm_map_entry), I
need to support the following operations:
- flush I cache
- flush D cache
- sync I cache
- sync D cache
- set cachability

Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent 
le binaire et ceux qui ne le comprennent pas.