aboutsummaryrefslogtreecommitdiff
path: root/bl1
diff options
context:
space:
mode:
authorJuan Castillo <juan.castillo@arm.com>2015-04-13 17:36:19 +0100
committerJuan Castillo <juan.castillo@arm.com>2015-06-25 08:53:26 +0100
commit16948ae1d9e14190229f0fd8602f8cc0f25d57d2 (patch)
tree264ca269eed1b8628622286f2021ac538f3ca4da /bl1
parentd5e0a933b3e6e0ff43e6d46982b93605a5eadf05 (diff)
downloadtrusted-firmware-a-16948ae1d9e14190229f0fd8602f8cc0f25d57d2.tar.gz
Use numbers to identify images instead of names
The Trusted firmware code identifies BL images by name. The platform port defines a name for each image e.g. the IO framework uses this mechanism in the platform function plat_get_image_source(). For a given image name, it returns the handle to the image file which involves comparing images names. In addition, if the image is packaged in a FIP, a name comparison is required to find the UUID for the image. This method is not optimal. This patch changes the interface between the generic and platform code with regard to identifying images. The platform port must now allocate a unique number (ID) for every image. The generic code will use the image ID instead of the name to access its attributes. As a result, the plat_get_image_source() function now takes an image ID as an input parameter. The organisation of data structures within the IO framework has been rationalised to use an image ID as an index into an array which contains attributes of the image such as UUID and name. This prevents the name comparisons. A new type 'io_uuid_spec_t' has been introduced in the IO framework to specify images identified by UUID (i.e. when the image is contained in a FIP file). There is no longer need to maintain a look-up table [iname_name --> uuid] in the io_fip driver code. Because image names are no longer mandatory in the platform port, the debug messages in the generic code will show the image identifier instead of the file name. The platforms that support semihosting to load images (i.e. FVP) must provide the file names as definitions private to the platform. The ARM platform ports and documentation have been updated accordingly. All ARM platforms reuse the image IDs defined in the platform common code. These IDs will be used to access other attributes of an image in subsequent patches. IMPORTANT: applying this patch breaks compatibility for platforms that use TF BL1 or BL2 images or the image loading code. The platform port must be updated to match the new interface. Change-Id: I9c1b04cb1a0684c6ee65dee66146dd6731751ea5
Diffstat (limited to 'bl1')
-rw-r--r--bl1/bl1_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bl1/bl1_main.c b/bl1/bl1_main.c
index a7a872ced9..c270cf49ce 100644
--- a/bl1/bl1_main.c
+++ b/bl1/bl1_main.c
@@ -157,6 +157,8 @@ void bl1_main(void)
/* Find out how much free trusted ram remains after BL1 load */
bl1_tzram_layout = bl1_plat_sec_mem_layout();
+ INFO("BL1: Loading BL2\n");
+
#if TRUSTED_BOARD_BOOT
/* Initialize authentication module */
auth_init();
@@ -168,7 +170,7 @@ void bl1_main(void)
* etc.) so it can be used later.
*/
err = load_image(bl1_tzram_layout,
- BL2_CERT_NAME,
+ BL2_CERT_ID,
BL2_BASE,
&bl2_image_info,
NULL);
@@ -187,7 +189,7 @@ void bl1_main(void)
/* Load the BL2 image */
err = load_image(bl1_tzram_layout,
- BL2_IMAGE_NAME,
+ BL2_IMAGE_ID,
BL2_BASE,
&bl2_image_info,
&bl2_ep);