Skip to content

Commit 56c15e7

Browse files
committed
zephyr: added ISB after cortex control was set
After modifying the CONTROL register, ISB function should be used to ensure the effect of the change applies to subsequent code. Due to the simple nature of the Cortex-M3, Cortex-M4, Cortex-M0+, Cortex-M0, and Cortex-M1 pipeline, omission of the ISB instruction does not cause any problem. But might cause problem on a more advanced core. Signed-off-by: Andrzej Puzdrowski <[email protected]>
1 parent ce11597 commit 56c15e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

boot/zephyr/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ static void do_boot(struct boot_rsp *rsp)
182182
__set_MSP(vt->msp);
183183
#if CONFIG_MCUBOOT_CLEANUP_ARM_CORE
184184
__set_CONTROL(0x00); /* application will configures core on its own */
185+
__ISB();
185186
#endif
186187
((void (*)(void))vt->reset)();
187188
}

0 commit comments

Comments
 (0)