mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
feat(cache): added cache invalidate all ll apis
This commit is contained in:
@@ -360,6 +360,32 @@ static inline void cache_ll_invalidate_addr(uint32_t cache_level, cache_type_t t
|
||||
Cache_Invalidate_Addr(vaddr, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Invalidate all
|
||||
*
|
||||
* @param cache_level level of the cache
|
||||
* @param type see `cache_type_t`
|
||||
* @param cache_id id of the cache in this type and level
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void cache_ll_invalidate_all(uint32_t cache_level, cache_type_t type, uint32_t cache_id)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case CACHE_TYPE_DATA:
|
||||
Cache_Invalidate_DCache_All();
|
||||
break;
|
||||
case CACHE_TYPE_INSTRUCTION:
|
||||
Cache_Invalidate_ICache_All();
|
||||
break;
|
||||
default: //CACHE_TYPE_ALL
|
||||
Cache_Invalidate_ICache_All();
|
||||
Cache_Invalidate_DCache_All();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Writeback cache supported addr
|
||||
*
|
||||
|
Reference in New Issue
Block a user