Skip to content

Commit 49cec9f

Browse files
nvlsianputomchy
authored andcommitted
[nrf noup] bootutil/loader: integrate nRF54h S2RAM with diect-xip
Added call which designate active slot so MCUBoot can jump to proper slot when CPU is resuming from S2RAM. Signed-off-by: Andrzej Puzdrowski <[email protected]> (cherry picked from commit 1c8a595)
1 parent 018e71a commit 49cec9f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

boot/bootutil/src/loader.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ int pcd_version_cmp_net(const struct flash_area *fap, struct image_header *hdr);
8484
#include "bootutil/key_revocation.h"
8585
#endif
8686

87+
#ifdef CONFIG_SOC_NRF54H20_PM_S2RAM_OVERRIDE
88+
void s2ram_designate_slot(uint8_t slot);
89+
#endif
90+
8791
BOOT_LOG_MODULE_DECLARE(mcuboot);
8892

8993
static struct boot_loader_state boot_data;
@@ -2961,6 +2965,11 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
29612965
}
29622966
}
29632967

2968+
#ifdef CONFIG_SOC_NRF54H20_PM_S2RAM_OVERRIDE
2969+
/* Designate the slot to be used by the PM_S2RAM resume module */
2970+
s2ram_designate_slot((uint8_t)state->slot_usage[0].active_slot);
2971+
#endif
2972+
29642973
/* All image loaded successfully. */
29652974
#ifdef MCUBOOT_HAVE_LOGGING
29662975
print_loaded_images(state);

0 commit comments

Comments
 (0)