L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
Cache Consistency

Various functions for cache consistency. More...

+ Collaboration diagram for Cache Consistency:

Functions

int l4_cache_clean_data (unsigned long start, unsigned long end) L4_NOTHROW
 Cache clean a range in D-cache; writes back to PoC.
 
int l4_cache_flush_data (unsigned long start, unsigned long end) L4_NOTHROW
 Cache flush a range; writes back to PoC.
 
int l4_cache_inv_data (unsigned long start, unsigned long end) L4_NOTHROW
 Cache invalidate a range; might write back to PoC.
 
int l4_cache_coherent (unsigned long start, unsigned long end) L4_NOTHROW
 Make memory coherent between I-cache and D-cache; writes back to PoU.
 
int l4_cache_dma_coherent (unsigned long start, unsigned long end) L4_NOTHROW
 Make memory coherent for use with external memory; writes back to PoC.
 
int l4_cache_dma_coherent_full (void) L4_NOTHROW
 Make memory coherent for use with external memory; writes back to PoC.
 

Detailed Description

Various functions for cache consistency.

These functions shall be used to ensure that

Certain functions are NOPs on certain architectures, for example on Intel it's not necessary to explicitly make caches coherent to PoU.

Function Documentation

◆ l4_cache_clean_data()

int l4_cache_clean_data ( unsigned long  start,
unsigned long  end 
)
inline

Cache clean a range in D-cache; writes back to PoC.

Parameters
startStart of range (inclusive)
endEnd of range (exclusive)
Return values
0on success
-EFAULTin the case of an unresolved page fault in the given area

Writes back any dirty cache lines in the range but leaves them in the cache and marks the cached copies clean.

Examples
examples/libs/l4re/c++/shared_ds/ds_clnt.cc.

Definition at line 81 of file cache.h.

◆ l4_cache_coherent()

int l4_cache_coherent ( unsigned long  start,
unsigned long  end 
)
inline

Make memory coherent between I-cache and D-cache; writes back to PoU.

Parameters
startStart of range (inclusive)
endEnd of range (exclusive)
Return values
0on success
-EFAULTin the case of an unresolved page fault in the given area

Definition at line 105 of file cache.h.

◆ l4_cache_dma_coherent()

int l4_cache_dma_coherent ( unsigned long  start,
unsigned long  end 
)
inline

Make memory coherent for use with external memory; writes back to PoC.

Parameters
startStart of range (inclusive)
endEnd of range (exclusive)
Return values
0on success
-EFAULTin the case of an unresolved page fault in the given area

Definition at line 113 of file cache.h.

◆ l4_cache_flush_data()

int l4_cache_flush_data ( unsigned long  start,
unsigned long  end 
)
inline

Cache flush a range; writes back to PoC.

Parameters
startStart of range (inclusive)
endEnd of range (exclusive)
Return values
0on success
-EFAULTin the case of an unresolved page fault in the given area

Writes back any dirty cache lines and invalidates all cache entries in the range.

Definition at line 89 of file cache.h.

◆ l4_cache_inv_data()

int l4_cache_inv_data ( unsigned long  start,
unsigned long  end 
)
inline

Cache invalidate a range; might write back to PoC.

Parameters
startStart of range (inclusive)
endEnd of range (exclusive)
Return values
0on success
-EFAULTin the case of an unresolved page fault in the given area

Invalidates all cache entries in the range but does not necessarily write back dirty cache lines.

Note
Implementations may choose to write back dirty lines nonetheless if this is more efficient.

Definition at line 97 of file cache.h.