Caches¶
API for configuring caches.
Functions
-
void
metal_cache_init
(struct metal_cache *cache, int ways)¶ Initialize a cache.
Initializes a cache with the requested number of ways enabled.
- Parameters
cache
: The handle for the cache to initializeways
: The number of ways to enable
-
int
metal_cache_get_enabled_ways
(struct metal_cache *cache)¶ Get the current number of enabled cache ways.
- Return
- The current number of enabled cache ways
- Parameters
cache
: The handle for the cache
-
int
metal_cache_set_enabled_ways
(struct metal_cache *cache, int ways)¶ Enable the requested number of cache ways.
- Return
- 0 if the ways are successfully enabled
- Parameters
cache
: The handle for the cacheways
: The number of ways to enabled
-
struct
metal_cache
¶ - #include <cache.h>
a handle for a cache