cache.h 853 B

123456789101112131415161718192021222324252627282930313233343536
  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. * 2021-7-19 JasonHu The first version
  9. */
  10. #ifndef __CACHE_H__
  11. #define __CACHE_H__
  12. #include <rtdef.h>
  13. rt_inline rt_uint32_t rt_cpu_icache_line_size()
  14. {
  15. return 0;
  16. }
  17. rt_inline rt_uint32_t rt_cpu_dcache_line_size()
  18. {
  19. return 0;
  20. }
  21. void rt_hw_cpu_icache_invalidate(void *addr,int size);
  22. void rt_hw_cpu_dcache_invalidate(void *addr,int size);
  23. void rt_hw_cpu_dcache_clean(void *addr,int size);
  24. void rt_hw_cpu_icache_ops(int ops,void *addr,int size);
  25. void rt_hw_cpu_dcache_ops(int ops,void *addr,int size);
  26. void rt_hw_cpu_dcache_flush_all();
  27. void rt_hw_cpu_icache_invalidate_all();
  28. rt_base_t rt_hw_cpu_icache_status();
  29. rt_base_t rt_hw_cpu_dcache_status();
  30. #endif /* __CACHE_H__ */