diff --git a/boards/boardctl.c b/boards/boardctl.c index 388e1e00a7..9e652560d6 100644 --- a/boards/boardctl.c +++ b/boards/boardctl.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -394,6 +395,7 @@ int boardctl(unsigned int cmd, uintptr_t arg) case BOARDIOC_POWEROFF: { reboot_notifier_call_chain(SYS_POWER_OFF, (FAR void *)arg); + up_flush_dcache_all(); ret = board_power_off((int)arg); } break; @@ -410,6 +412,7 @@ int boardctl(unsigned int cmd, uintptr_t arg) case BOARDIOC_RESET: { reboot_notifier_call_chain(SYS_RESTART, (FAR void *)arg); + up_flush_dcache_all(); ret = board_reset((int)arg); } break; diff --git a/sched/misc/assert.c b/sched/misc/assert.c index 506d70ef98..af6cfd0e6a 100644 --- a/sched/misc/assert.c +++ b/sched/misc/assert.c @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -565,6 +566,7 @@ static noreturn_function int pause_cpu_handler(FAR void *arg) { memcpy(g_last_regs[this_cpu()], up_current_regs(), sizeof(g_last_regs[0])); g_cpu_paused[this_cpu()] = true; + up_flush_dcache_all(); while (1); } @@ -742,6 +744,7 @@ static void dump_fatal_info(FAR struct tcb_s *rtcb, static void reset_board(void) { #if CONFIG_BOARD_RESET_ON_ASSERT >= 1 + up_flush_dcache_all(); board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE); #else for (; ; )