Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cache flush
Matt Thomas <matt%3am-software.com@localhost> 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:
vm_machine_attribute
_________________________________________________________________
Function - Get/set the target memory region's special attributes.
(...)
attribute
[in scalar] The name of the attribute to be get/set. Possible
values are:
MATTR_CACHE
Cachability. Aside from the generic values listed below,
the following special values are defined:
MATTR_VAL_CACHE_FLUSH
Flush from all caches
MATTR_VAL_DCACHE_FLUSH
Flush from data caches
MATTR_VAL_ICACHE_FLUSH
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.
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index