This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 259e88436f29b7f65ec642bbb6f7d012017f95f8 Author: huojianchao <[email protected]> AuthorDate: Tue Nov 24 09:38:31 2026 +0800 sched/misc/assert: flush the dcache in reset_board() again "assert: flush dcache before panic other CPU" moved the up_flush_dcache_all() of reset_board() to before the PANIC_KERNEL_FINAL notifiers. dump_core_info() (board crash dump, coredump, syslog_flush()) and the SYS_HALT notifiers run after that flush, so with a write-back dcache what they write can still be in the cache when board_reset() resets the board, and a warm reset loses it, e.g. a coredump written to a ramlog that is kept over the reset. The recursive assert path calls reset_board() without any flush at all. Flush the dcache before board_reset() again. The flush before PANIC_KERNEL_FINAL stays, for the other CPUs that read the shared memory. Assisted-by: Kiro:claude-opus-5-5 Signed-off-by: huojianchao <[email protected]> --- sched/misc/assert.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sched/misc/assert.c b/sched/misc/assert.c index 205e821e0f9..5c9c0b5f629 100644 --- a/sched/misc/assert.c +++ b/sched/misc/assert.c @@ -860,6 +860,7 @@ static void dump_core_info(void) 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 (; ; )
