Skip to content

Commit e371c84

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 bfa7b63 commit e371c84

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;
@@ -2900,6 +2904,11 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
29002904
}
29012905
}
29022906

2907+
#ifdef CONFIG_SOC_NRF54H20_PM_S2RAM_OVERRIDE
2908+
/* Designate the slot to be used by the PM_S2RAM resume module */
2909+
s2ram_designate_slot((uint8_t)state->slot_usage[0].active_slot);
2910+
#endif
2911+
29032912
/* All image loaded successfully. */
29042913
#ifdef MCUBOOT_HAVE_LOGGING
29052914
print_loaded_images(state);

0 commit comments

Comments
 (0)