fix(cache): fixed preload ascending issue

This commit is contained in:
armando
2026-04-13 13:26:08 +08:00
committed by Armando (Dou Yiwen)
parent 338f341110
commit 0099a7fff1
17 changed files with 154 additions and 72 deletions
+10 -2
View File
@@ -43,6 +43,7 @@ typedef enum {
CACHE_LL_PRELOAD_ARBITRARY = 2,
} cache_ll_preload_strategy_t;
/**
* @brief Initialize the cache clock
*/
@@ -219,14 +220,21 @@ static inline void cache_ll_preload_set_strategy(uint32_t cache_level, cache_typ
* @brief Preload cache (L1 unified)
*
* Starts preload and does not wait. Use cache_ll_preload_wait_done() to wait for completion.
*
* @param cache_level level of the cache (CACHE_LL_LEVEL_EXT_MEM or CACHE_LL_LEVEL_ALL)
* @param type see `cache_type_t`
* @param cache_id id of the cache (unused; pass 0)
* @param vaddr start virtual address of the preload region
* @param size size of the preload region in bytes
* @param order preload order, see `cache_preload_order_t`
*/
__attribute__((always_inline))
static inline void cache_ll_preload(uint32_t cache_level, cache_type_t type, uint32_t cache_id, uint32_t vaddr, uint32_t size, bool ascending)
static inline void cache_ll_preload(uint32_t cache_level, cache_type_t type, uint32_t cache_id, uint32_t vaddr, uint32_t size, cache_preload_order_t order)
{
(void)cache_id;
(void)type;
HAL_ASSERT(cache_level == CACHE_LL_LEVEL_EXT_MEM);
Cache_Start_Preload(vaddr, size, ascending ? 0 : 1);
Cache_Start_Preload(vaddr, size, order);
}
/**