From ba68ef557bfa63c5a44c1f78acaccf1fb5e171f2 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 1 Feb 2018 16:45:51 +0900 Subject: bl2: add bl2_plat_handle_pre_image_load() There are cases where we need to manipulate image information before the load. For example, for decompressing data, we cannot load the compressed images to their final destination. Instead, we need to load them to the temporary buffer for the decompressor. Signed-off-by: Masahiro Yamada --- bl2/bl2_image_load_v2.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bl2') diff --git a/bl2/bl2_image_load_v2.c b/bl2/bl2_image_load_v2.c index 6517703d..ebbad45e 100644 --- a/bl2/bl2_image_load_v2.c +++ b/bl2/bl2_image_load_v2.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -54,6 +54,12 @@ entry_point_info_t *bl2_load_images(void) } } + err = bl2_plat_handle_pre_image_load(bl2_node_info->image_id); + if (err) { + ERROR("BL2: Failure in pre image load handling (%i)\n", err); + plat_error_handler(err); + } + if (!(bl2_node_info->image_info->h.attr & IMAGE_ATTRIB_SKIP_LOADING)) { INFO("BL2: Loading image id %d\n", bl2_node_info->image_id); err = load_auth_image(bl2_node_info->image_id, -- cgit v1.2.3