Commit fe57e7de authored by Raef Coles's avatar Raef Coles Committed by David Brown
Browse files

boot: Move slot usage into boot state

Signed-off-by: default avatarRaef Coles <raef.coles@arm.com>
parent 38453f67
Loading
Loading
Loading
Loading
+16 −0
Changes for boot/bootutil/src/bootutil_priv.h: 16 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -225,6 +225,22 @@ struct boot_loader_state {
#if (BOOT_IMAGE_NUMBER > 1)
    uint8_t curr_img_idx;
#endif

#if defined(MCUBOOT_DIRECT_XIP) || defined(MCUBOOT_RAM_LOAD)
    struct slot_usage_t {
        /* Index of the slot chosen to be loaded */
        uint32_t active_slot;
        bool slot_available[BOOT_NUM_SLOTS];
#if defined(MCUBOOT_RAM_LOAD)
        /* Image destination and size for the active slot */
        uint32_t img_dst;
        uint32_t img_sz;
#elif defined(MCUBOOT_DIRECT_XIP_REVERT)
        /* Swap status for the active slot */
        struct boot_swap_state swap_state;
#endif
    } slot_usage[BOOT_IMAGE_NUMBER];
#endif /* MCUBOOT_DIRECT_XIP || MCUBOOT_RAM_LOAD */
};

fih_int bootutil_verify_sig(uint8_t *hash, uint32_t hlen, uint8_t *sig,
+78 −130

File changed.

Preview size limit exceeded, changes collapsed.