libparanut
A Hardware Abstraction Layer for ParaNut Architectures.
|
Special functions for controlling the shared ParaNut cache. More...
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... | |
Special functions for controlling the shared ParaNut cache.
int pn_cache_disable | ( | void | ) |
Disables instruction and data cache.
Can only be used on CePU.
int pn_cache_enable | ( | void | ) |
Enables instruction and data cache. When changing this, make sure that the pn_cache_init() function is still correct!
Can only be used on CePU.
int pn_cache_flush | ( | void * | addr, |
unsigned long | size | ||
) |
Combination of pn_cache_invalidate() and pn_cache_writeback().
[in] | addr | is the (virtual)start address of the memory you want flushed. |
[in] | size | is the size of the address range you want flushed in byte. The size will always be aligned to the cache line size. |
int pn_cache_flush_all | ( | void | ) |
Flushes the whole cache.
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.
Can only be used on CePU.
int pn_cache_invalidate | ( | void * | addr, |
unsigned long | size | ||
) |
Invalidates the cache entries containing the given address range.
[in] | addr | is the (virtual) start address of the memory you want to invalidate. |
[in] | size | is the size of the address range you want to invalidate in byte. The size will always be aligned to the cache line size. |
int pn_cache_invalidate_all | ( | void | ) |
Invalidates the whole cache. When changing this, make sure that the pn_cache_init() function is still correct!
unsigned long pn_cache_linesize | ( | void | ) |
Returns the cache line size in bit.
unsigned long pn_cache_size | ( | void | ) |
Returns the cache size in Byte.
int pn_cache_writeback | ( | void * | addr, |
unsigned long | size | ||
) |
Writes back the cache lines that cached the given address range.
[in] | addr | is the (virtual) start address of the memory you want written back. |
[in] | size | is the size of the address range you want written back in byte. The size will always be aligned to the cache line size. |
int pn_cache_writeback_all | ( | void | ) |
Writes whole cache back.