diff options
| author | wangxiaoyao <[email protected]> | 2023-02-20 13:48:00 +0800 |
|---|---|---|
| committer | guo <[email protected]> | 2023-02-21 08:48:49 +0800 |
| commit | 484a0d602e8b571a9d8186d38c8b136abc4ccfc9 (patch) | |
| tree | 399ef1a1718bffed545a7354bbf2a8f8133e9c23 /libcpu/arm/cortex-a/cache.h | |
| parent | f84d89b0ca9c8982d436aa12be75554722462090 (diff) | |
[fixup] add cache maintenance ops;
fix bugs on cache maintenance when starting user app
Diffstat (limited to 'libcpu/arm/cortex-a/cache.h')
| -rw-r--r-- | libcpu/arm/cortex-a/cache.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libcpu/arm/cortex-a/cache.h b/libcpu/arm/cortex-a/cache.h new file mode 100644 index 0000000000..c3e096ba0c --- /dev/null +++ b/libcpu/arm/cortex-a/cache.h @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2006-2021, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2019-03-29 quanzhao the first version + */ + +#ifndef __CACHE_H__ +#define __CACHE_H__ + +static inline void rt_hw_icache_invalidate_all(void) +{ + __asm__ volatile("mcr p15, 0, %0, c7, c5, 0"::"r"(0ul)); +} + +#endif /* __CACHE_H__ */ |
