Skip to content

Commit 0439dee

Browse files
MaureenHelmnashif
authored andcommitted
arm: Clear primask and faultmask during startup
A bootloader may leave primask or faultmask set, so clear them during startup when we enable interrupts and switch to the main thread. Previously we only cleared primask for architecture variants which don't support basepri, but now we do it for all architecture variants. Fixes a failure on mimxrt1050_evk with the latency_measure test and shell_module sample when using an nxp internal bootloader. Signed-off-by: Maureen Helm <[email protected]>
1 parent b088a09 commit 0439dee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/arm/include/kernel_arch_func.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ _arch_switch_to_main_thread(struct k_thread *main_thread,
7777
#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE)
7878
"cpsie i \t\n"
7979
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
80+
"cpsie if \t\n"
8081
"movs %%r1, #0 \n\t"
8182
"msr BASEPRI, %%r1 \n\t"
8283
#else

0 commit comments

Comments
 (0)