Skip to content

Commit cac2b42

Browse files
tomchynvlsianpu
authored andcommitted
[nrf noup] loader_manifest_xip: Add S2RAM early hooks
Add missing SoC early hooks, required for the S2RAM functionality to work. Ref: NCSIDB-1870 Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no> (cherry picked from commit dee2542)
1 parent d537e5b commit cac2b42

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

boot/bootutil/src/loader_manifest_xip.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
#include <load_ironside_se_conf.h>
6565
#endif
6666

67+
#ifdef CONFIG_SOC_EARLY_RESET_HOOK
68+
void s2ram_designate_slot(uint8_t slot);
69+
#endif
70+
6771
BOOT_LOG_MODULE_DECLARE(mcuboot);
6872

6973
static struct boot_loader_state boot_data;
@@ -628,6 +632,11 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
628632
#endif
629633
}
630634

635+
#ifdef CONFIG_SOC_EARLY_RESET_HOOK
636+
/* Designate the slot to be used by the PM_S2RAM resume module */
637+
s2ram_designate_slot((uint8_t)state->slot_usage[MCUBOOT_MANIFEST_IMAGE_INDEX].active_slot);
638+
#endif
639+
631640
/* All image loaded successfully. */
632641
#ifdef MCUBOOT_HAVE_LOGGING
633642
print_loaded_images(state);

0 commit comments

Comments
 (0)