aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRoberto Vargas <roberto.vargas@arm.com>2017-09-26 12:53:01 +0100
committerRoberto Vargas <roberto.vargas@arm.com>2017-10-24 14:04:41 +0100
commit01f62b6d0d90a236cbfdf385aab7ec2ac11f2e65 (patch)
tree573a4998620b283963ecd60536df569f0b988759 /common
parent3b39efa49d9949c80b6e76b99829f84619b46110 (diff)
downloadtrusted-firmware-a-01f62b6d0d90a236cbfdf385aab7ec2ac11f2e65.tar.gz
Add platform hooks for boot redundancy support
These hooks are intended to allow one platform to try load images from alternative places. There is a hook to initialize the sequence of boot locations and a hook to pass to the next sequence. Change-Id: Ia0f84c415208dc4fa4f9d060d58476db23efa5b2 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Diffstat (limited to 'common')
-rw-r--r--common/bl_common.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/common/bl_common.c b/common/bl_common.c
index cad4de90e8..e4473ed309 100644
--- a/common/bl_common.c
+++ b/common/bl_common.c
@@ -354,7 +354,13 @@ static int load_auth_image_internal(unsigned int image_id,
******************************************************************************/
int load_auth_image(unsigned int image_id, image_info_t *image_data)
{
- return load_auth_image_internal(image_id, image_data, 0);
+ int err;
+
+ do {
+ err = load_auth_image_internal(image_id, image_data, 0);
+ } while (err != 0 && plat_try_next_boot_source());
+
+ return err;
}
#else /* LOAD_IMAGE_V2 */
@@ -553,8 +559,14 @@ int load_auth_image(meminfo_t *mem_layout,
image_info_t *image_data,
entry_point_info_t *entry_point_info)
{
- return load_auth_image_internal(mem_layout, image_id, image_base,
- image_data, entry_point_info, 0);
+ int err;
+
+ do {
+ err = load_auth_image_internal(mem_layout, image_id, image_base,
+ image_data, entry_point_info, 0);
+ } while (err != 0 && plat_try_next_boot_source());
+
+ return err;
}
#endif /* LOAD_IMAGE_V2 */