summaryrefslogtreecommitdiff
path: root/libcpu/aarch64/common/cache.h
diff options
context:
space:
mode:
authorwangxiaoyao <[email protected]>2023-02-20 13:48:00 +0800
committerguo <[email protected]>2023-02-21 08:48:49 +0800
commit484a0d602e8b571a9d8186d38c8b136abc4ccfc9 (patch)
tree399ef1a1718bffed545a7354bbf2a8f8133e9c23 /libcpu/aarch64/common/cache.h
parentf84d89b0ca9c8982d436aa12be75554722462090 (diff)
[fixup] add cache maintenance ops;
fix bugs on cache maintenance when starting user app
Diffstat (limited to 'libcpu/aarch64/common/cache.h')
-rw-r--r--libcpu/aarch64/common/cache.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/libcpu/aarch64/common/cache.h b/libcpu/aarch64/common/cache.h
index 35b9893802..dec4e91bb5 100644
--- a/libcpu/aarch64/common/cache.h
+++ b/libcpu/aarch64/common/cache.h
@@ -11,13 +11,19 @@
#ifndef __CACHE_H__
#define __CACHE_H__
+void __asm_invalidate_icache_all(void);
+
void rt_hw_dcache_flush_all(void);
void rt_hw_dcache_invalidate_all(void);
void rt_hw_dcache_flush_range(unsigned long start_addr, unsigned long size);
-void rt_hw_cpu_dcache_clean(void *addr, int size);
-void rt_hw_cpu_dcache_invalidate(unsigned long start_addr,unsigned long size);
+void rt_hw_cpu_dcache_clean(void *addr, unsigned long size);
+void rt_hw_cpu_dcache_invalidate(void *start_addr, unsigned long size);
+
+static inline void rt_hw_icache_invalidate_all(void)
+{
+ __asm_invalidate_icache_all();
+}
-void rt_hw_icache_invalidate_all();
void rt_hw_icache_invalidate_range(unsigned long start_addr, int size);
#endif /* __CACHE_H__ */