1
0

cache.h 518 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-03-29 quanzhao the first version
  9. */
  10. #ifndef __CACHE_H__
  11. #define __CACHE_H__
  12. void rt_hw_cpu_icache_invalidate(void *addr, int size);
  13. void rt_hw_cpu_dcache_clean_and_invalidate(void *addr, int size);
  14. static inline void rt_hw_icache_invalidate_all(void)
  15. {
  16. __asm__ volatile("mcr p15, 0, %0, c7, c5, 0"::"r"(0ul));
  17. }
  18. #endif /* __CACHE_H__ */