Skip to content

Commit

Permalink
[nrf noup] loader: Do not check reset vector for XIP image
Browse files Browse the repository at this point in the history
The XIP image, 2, does not have reset vector.

Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit d798de3)
  • Loading branch information
de-nordic authored and anangl committed Jun 28, 2024
1 parent 6f1ba91 commit 5fe56c9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,16 @@ boot_validate_slot(struct boot_loader_state *state, int slot,
* overwriting an application written to the incorrect slot.
* This feature is only supported by ARM platforms.
*/
#if MCUBOOT_IMAGE_NUMBER >= 3
/* Currently the MCUboot can be configured for up to 3 image, where image number 2 is
* designated for XIP, where it is the second part of image stored in slots of image
* 0. This part of image is not bootable, as the XIP setup is done by the app in
* image 0 slot, and it does not carry the reset vector.
*/
if (area_id == FLASH_AREA_IMAGE_SECONDARY(2)) {
goto out;
}
#endif
if (area_id == FLASH_AREA_IMAGE_SECONDARY(BOOT_CURR_IMG(state))) {
const struct flash_area *pri_fa = BOOT_IMG_AREA(state, BOOT_PRIMARY_SLOT);
struct image_header *secondary_hdr = boot_img_hdr(state, slot);
Expand Down

0 comments on commit 5fe56c9

Please sign in to comment.