diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig index 929a85892..62c5aa21d 100644 --- a/boot/zephyr/Kconfig +++ b/boot/zephyr/Kconfig @@ -364,6 +364,13 @@ config MCUBOOT_CLEANUP_RAM help Sets contents of memory to 0 before jumping to application. +config MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP + bool "Infinite loop after RAM cleanup" + depends on MCUBOOT_CLEANUP_RAM + help + Verification option that keeps execution in infinite loop after + RAM cleanup has been performed. + config MBEDTLS_CFG_FILE # It might be awkward to define an Mbed TLS header file when TinyCrypt # is used, but the fact is that Mbed TLS' ASN1 parse module is used diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c index eb54726e6..1e3c0fc9b 100644 --- a/boot/zephyr/main.c +++ b/boot/zephyr/main.c @@ -249,6 +249,9 @@ static void do_boot(struct boot_rsp *rsp) " b clear\n" "out:\n" " dsb\n" +#if CONFIG_MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP + " b out\n" +#endif /*CONFIG_MCUBOOT_INFINITE_LOOP_AFTER_RAM_CLEANUP */ /* jump to reset vector of an app */ " bx r0\n" :