For more details and example usage, see Cache
|
struct | CacheP_Config |
| Cache config structure, this used by SysConfig and not to be used by end-users directly. More...
|
|
|
#define | CacheP_CACHELINE_ALIGNMENT (128U) |
| Cache line size for alignment of buffers. Actual CPU defined cache line can be smaller that this value, this define is a utility macro to keep application portable across different CPU's. More...
|
|
◆ CacheP_CACHELINE_ALIGNMENT
#define CacheP_CACHELINE_ALIGNMENT (128U) |
Cache line size for alignment of buffers. Actual CPU defined cache line can be smaller that this value, this define is a utility macro to keep application portable across different CPU's.
◆ CacheP_Type
Cache type.
Enumerator |
---|
CacheP_TYPE_L1P | L1 program cache
|
CacheP_TYPE_L1D | L1 data cache
|
CacheP_TYPE_L2P | L2 program cache
|
CacheP_TYPE_L2D | L2 data cache
|
CacheP_TYPE_L1 | All L1 cache's
|
CacheP_TYPE_L2 | All L2 cache's
|
CacheP_TYPE_ALLP | All program cache's
|
CacheP_TYPE_ALLD | All data cache's
|
CacheP_TYPE_ALL | All cache's
|
◆ CacheP_enable()
void CacheP_enable |
( |
uint32_t |
type | ) |
|
Cache enable.
- Parameters
-
type | [in] cache type's to enable |
◆ CacheP_disable()
void CacheP_disable |
( |
uint32_t |
type | ) |
|
Cache disable.
- Parameters
-
type | [in] cache type's to disable |
◆ CacheP_getEnabled()
uint32_t CacheP_getEnabled |
( |
| ) |
|
Get cache enabled bits.
- Returns
- cache type's that are enabled
◆ CacheP_wbAll()
void CacheP_wbAll |
( |
uint32_t |
type | ) |
|
Cache writeback for full cache.
- Parameters
-
type | [in] cache type's to writeback |
◆ CacheP_wbInvAll()
void CacheP_wbInvAll |
( |
uint32_t |
type | ) |
|
Cache writeback and invalidate for full cache.
- Parameters
-
type | [in] cache type's to writeback and invalidate |
◆ CacheP_wb()
void CacheP_wb |
( |
void * |
addr, |
|
|
uint32_t |
size, |
|
|
uint32_t |
type |
|
) |
| |
Cache writeback for a specified region.
- Parameters
-
addr | [in] region address. Recommend to specify address that is cache line aligned |
size | [in] region size in bytes. Recommend to specify size that is multiple of cache line size |
type | [in] cache type's to writeback |
◆ CacheP_inv()
void CacheP_inv |
( |
void * |
addr, |
|
|
uint32_t |
size, |
|
|
uint32_t |
type |
|
) |
| |
Cache invalidate for a specified region.
- Parameters
-
addr | [in] region address. Recommend to specify address that is cache line aligned |
size | [in] region size in bytes. Recommend to specify size that is multiple of cache line size |
type | [in] cache type's to invalidate |
◆ CacheP_wbInv()
void CacheP_wbInv |
( |
void * |
addr, |
|
|
uint32_t |
size, |
|
|
uint32_t |
type |
|
) |
| |
Cache writeback and invalidate for a specified region.
- Parameters
-
addr | [in] region address. Recommend to specify address that is cache line aligned |
size | [in] region size in bytes. Recommend to specify size that is multiple of cache line size |
type | [in] cache type's to writeback and invalidate |
◆ CacheP_init()
Initialize Cache sub-system, called by SysConfig, not to be called by end users.
◆ gCacheConfig
Externally defined Cache configuration.