This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 4af78135b1643f546e328e075511ed585739defa Author: ligd <[email protected]> AuthorDate: Tue Feb 18 22:28:03 2025 +0800 armv8m: set msplim & psplim to 0 when HW STACKCHECK disabled in case of the pervious boot stage has remain setting, eg: bootloader set msplim, but ap don't set. usually, the bootloader just jump to ap, but not a warm reset Signed-off-by: ligd <[email protected]> --- arch/arm/src/armv8-m/arm_initialstate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/src/armv8-m/arm_initialstate.c b/arch/arm/src/armv8-m/arm_initialstate.c index aa4062a314b..76d0eb36183 100644 --- a/arch/arm/src/armv8-m/arm_initialstate.c +++ b/arch/arm/src/armv8-m/arm_initialstate.c @@ -211,6 +211,9 @@ noinline_function void arm_initialize_stack(void) #ifdef CONFIG_ARMV8M_STACKCHECK_HARDWARE "mrs %1, msplim\n" "msr psplim, %1\n" +#else + "mov %1, #0\n" + "msr psplim, %1\n" #endif "isb sy\n" @@ -227,6 +230,9 @@ noinline_function void arm_initialize_stack(void) "msr msp, %0\n" #ifdef CONFIG_ARMV8M_STACKCHECK_HARDWARE "msr msplim, %2\n" +#else + "mov %1, #0\n" + "msr msplim, %1\n" #endif "isb sy\n" :
