Browse Source

【添加】aarch64 启动文件增加 RT_NEED_FLUSH_DCACHE_ALL 选项

Signed-off-by: WillianChan <chentingwei@rt-thread.com>
WillianChan 3 years ago
parent
commit
0c99d88ed4
2 changed files with 7 additions and 0 deletions
  1. 4 0
      libcpu/Kconfig
  2. 3 0
      libcpu/aarch64/cortex-a/entry_point.S

+ 4 - 0
libcpu/Kconfig

@@ -5,6 +5,10 @@ config RT_USING_CACHE
     bool
     default n
 
+config RT_NEED_FLUSH_DCACHE_ALL
+    bool
+    default n
+
 config RT_USING_CPU_FFS
     bool
     default n

+ 3 - 0
libcpu/aarch64/cortex-a/entry_point.S

@@ -13,6 +13,9 @@
 .global __start
 
 __start:
+#ifdef RT_NEED_FLUSH_DCACHE_ALL
+    bl      __asm_flush_dcache_all
+#endif
     bl      rt_hw_cpu_id_set
     /* read cpu id, stop slave cores */
     mrs     x0, tpidr_el1