libparanut
A Hardware Abstraction Layer for ParaNut Architectures.
Functions
pn_cache.c File Reference

Contains architecture independent implementations of the Cache Module functions. More...

#include "common.h"
Include dependency graph for pn_cache.c:

Functions

int pn_cache_init (void)
 Function that has to be called in the main function before any of the functions in the Cache Module can be called. Initializes some internal data and enables the cache. More...
 
int pn_cache_enable (void)
 Enables instruction and data cache. When changing this, make sure that the pn_cache_init() function is still correct! More...
 
int pn_cache_disable (void)
 Disables instruction and data cache. More...
 
unsigned long pn_cache_linesize (void)
 Returns the cache line size in bit. More...
 
unsigned long pn_cache_size (void)
 Returns the cache size in Byte. More...
 
int pn_cache_invalidate (void *addr, unsigned long size)
 Invalidates the cache entries containing the given address range. More...
 
int pn_cache_invalidate_all (void)
 Invalidates the whole cache. When changing this, make sure that the pn_cache_init() function is still correct! More...
 
int pn_cache_writeback (void *addr, unsigned long size)
 Writes back the cache lines that cached the given address range. More...
 
int pn_cache_writeback_all (void)
 Writes whole cache back. More...
 
int pn_cache_flush (void *addr, unsigned long size)
 Combination of pn_cache_invalidate() and pn_cache_writeback(). More...
 
int pn_cache_flush_all (void)
 Flushes the whole cache. More...
 

Detailed Description

Contains architecture independent implementations of the Cache Module functions.