Skip to content

Commit ccaf7f8

Browse files
mark-horvath-armutzig
authored andcommitted
boot: Multi-image boot for direct-xip and ram-load
Multiple image boot support is implemented for direct-xip and ram-load strategies. Dependency checking is also added, and for ram-load more executable ram regions can be set. Wrapper functions are intoduced to all boot strategies. Change-Id: I59b346277dcb2c17cef4800f1e556b4ea9144845 Signed-off-by: Mark Horvath <mark.horvath@arm.com>
1 parent f04aa54 commit ccaf7f8

File tree

4 files changed

+881
-293
lines changed

4 files changed

+881
-293
lines changed
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright (c) 2021, Arm Limited. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef __RAMLOAD_H__
8+
#define __RAMLOAD_H__
9+
10+
#include <stdint.h>
11+
12+
#ifdef __cplusplus
13+
extern "C" {
14+
#endif
15+
16+
#ifdef MULTIPLE_EXECUTABLE_RAM_REGIONS
17+
/**
18+
* Provides information about the Executable RAM for a given image ID.
19+
*
20+
* @param image_id Index of the image (from 0).
21+
* @param exec_ram_start Pointer to store the start address of the exec RAM
22+
* @param exec_ram_size Pointer to store the size of the exec RAM
23+
*
24+
* @return 0 on success; nonzero on failure.
25+
*/
26+
int boot_get_image_exec_ram_info(uint32_t image_id,
27+
uint32_t *exec_ram_start,
28+
uint32_t *exec_ram_size);
29+
#endif
30+
31+
#ifdef __cplusplus
32+
}
33+
#endif
34+
35+
#endif /* __RAMLOAD_H__ */

boot/bootutil/src/bootutil_priv.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2017-2020 Linaro LTD
55
* Copyright (c) 2017-2019 JUUL Labs
6-
* Copyright (c) 2019-2020 Arm Limited
6+
* Copyright (c) 2019-2021 Arm Limited
77
*
88
* Original license:
99
*
@@ -143,9 +143,6 @@ _Static_assert(BOOT_IMAGE_NUMBER > 0, "Invalid value for BOOT_IMAGE_NUMBER");
143143
#else
144144
#define ARE_SLOTS_EQUIVALENT() 1
145145

146-
#if (BOOT_IMAGE_NUMBER != 1)
147-
#error "The MCUBOOT_DIRECT_XIP and MCUBOOT_RAM_LOAD mode only supports single-image boot (MCUBOOT_IMAGE_NUMBER=1)."
148-
#endif
149146
#ifdef MCUBOOT_ENC_IMAGES
150147
#error "Image encryption (MCUBOOT_ENC_IMAGES) is not supported when MCUBOOT_DIRECT_XIP or MCUBOOT_RAM_LOAD mode is selected."
151148
#endif

0 commit comments

Comments
 (0)