Просмотр исходного кода

platform/nuttx: Fix dcache operation in os_dcache_flush (#4225)

Replace up_invalidate_dcache_all() with up_flush_dcache_all() in
os_dcache_flush() to properly flush the data cache instead of just
invalidating it. This ensures that any modified data in the cache
is written back to memory before execution.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Huang Qi 9 месяцев назад
Родитель
Сommit
5bdbba0dbe
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      core/shared/platform/nuttx/nuttx_platform.c

+ 1 - 1
core/shared/platform/nuttx/nuttx_platform.c

@@ -118,7 +118,7 @@ os_dcache_flush()
     up_textheap_data_sync();
 #endif
 #ifndef CONFIG_BUILD_KERNEL
-    up_invalidate_dcache_all();
+    up_flush_dcache_all();
 #endif
 }