Skip to content

Commit cf62803

Browse files
committed
[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]>
1 parent e6774a3 commit cf62803

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;
@@ -3600,6 +3604,11 @@ context_boot_go(struct boot_loader_state *state, struct boot_rsp *rsp)
36003604
}
36013605
}
36023606

3607+
#ifdef CONFIG_SOC_NRF54H20_PM_S2RAM_OVERRIDE
3608+
/* Designate the slot to be used by the PM_S2RAM resume module */
3609+
s2ram_designate_slot((uint8_t)state->slot_usage[0].active_slot);
3610+
#endif
3611+
36033612
/* All image loaded successfully. */
36043613
#ifdef MCUBOOT_HAVE_LOGGING
36053614
print_loaded_images(state);

0 commit comments

Comments
 (0)