aboutsummaryrefslogtreecommitdiff
path: root/bl1
diff options
context:
space:
mode:
authorRoberto Vargas <roberto.vargas@arm.com>2018-09-24 17:20:48 +0100
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>2018-09-28 15:31:52 +0100
commited51b51f7a9163a7fc48289c5ed97a3fe4fe504f (patch)
tree09c75a5c072abcec2f196dfa5dc82ce1d3153db0 /bl1
parent0b812305998380569fc609ea87157975780fc1e2 (diff)
downloadtrusted-firmware-a-ed51b51f7a9163a7fc48289c5ed97a3fe4fe504f.tar.gz
Remove build option LOAD_IMAGE_V2
The code of LOAD_IMAGE_V2=0 has been removed. Change-Id: Iea03e5bebb90c66889bdb23f85c07d0c9717fffe Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'bl1')
-rw-r--r--bl1/bl1_fwu.c15
-rw-r--r--bl1/bl1_main.c34
-rw-r--r--bl1/tbbr/tbbr_img_desc.c6
3 files changed, 0 insertions, 55 deletions
diff --git a/bl1/bl1_fwu.c b/bl1/bl1_fwu.c
index 25be57708f..d762d07685 100644
--- a/bl1/bl1_fwu.c
+++ b/bl1/bl1_fwu.c
@@ -291,26 +291,11 @@ static int bl1_fwu_image_copy(unsigned int image_id,
return -ENOMEM;
}
-#if LOAD_IMAGE_V2
/* Check that the image size to load is within limit */
if (image_size > image_desc->image_info.image_max_size) {
WARN("BL1-FWU: Image size out of bounds\n");
return -ENOMEM;
}
-#else
- /*
- * Check the image will fit into the free trusted RAM after BL1
- * load.
- */
- const meminfo_t *mem_layout = bl1_plat_sec_mem_layout();
- if (!is_mem_free(mem_layout->free_base, mem_layout->free_size,
- image_desc->image_info.image_base,
- image_size)) {
- WARN("BL1-FWU: Copy not allowed due to insufficient"
- " resources.\n");
- return -ENOMEM;
- }
-#endif
/* Save the given image size. */
image_desc->image_info.image_size = image_size;
diff --git a/bl1/bl1_main.c b/bl1/bl1_main.c
index 047cd6fb86..d681a97ea3 100644
--- a/bl1/bl1_main.c
+++ b/bl1/bl1_main.c
@@ -37,7 +37,6 @@ void bl1_calc_bl2_mem_layout(const meminfo_t *bl1_mem_layout,
assert(bl1_mem_layout != NULL);
assert(bl2_mem_layout != NULL);
-#if LOAD_IMAGE_V2
/*
* Remove BL1 RW data from the scope of memory visible to BL2.
* This is assuming BL1 RW data is at the top of bl1_mem_layout.
@@ -45,19 +44,6 @@ void bl1_calc_bl2_mem_layout(const meminfo_t *bl1_mem_layout,
assert(BL1_RW_BASE > bl1_mem_layout->total_base);
bl2_mem_layout->total_base = bl1_mem_layout->total_base;
bl2_mem_layout->total_size = BL1_RW_BASE - bl1_mem_layout->total_base;
-#else
- /* Check that BL1's memory is lying outside of the free memory */
- assert((BL1_RAM_LIMIT <= bl1_mem_layout->free_base) ||
- (BL1_RAM_BASE >= bl1_mem_layout->free_base +
- bl1_mem_layout->free_size));
-
- /* Remove BL1 RW data from the scope of memory visible to BL2 */
- *bl2_mem_layout = *bl1_mem_layout;
- reserve_mem(&bl2_mem_layout->total_base,
- &bl2_mem_layout->total_size,
- BL1_RAM_BASE,
- BL1_RAM_LIMIT - BL1_RAM_BASE);
-#endif /* LOAD_IMAGE_V2 */
flush_dcache_range((unsigned long)bl2_mem_layout, sizeof(meminfo_t));
}
@@ -183,27 +169,7 @@ static void bl1_load_bl2(void)
plat_error_handler(err);
}
-#if LOAD_IMAGE_V2
err = load_auth_image(BL2_IMAGE_ID, image_info);
-#else
- entry_point_info_t *ep_info;
- meminfo_t *bl1_tzram_layout;
-
- /* Get the entry point info */
- ep_info = &image_desc->ep_info;
-
- /* Find out how much free trusted ram remains after BL1 load */
- bl1_tzram_layout = bl1_plat_sec_mem_layout();
-
- /* Load the BL2 image */
- err = load_auth_image(bl1_tzram_layout,
- BL2_IMAGE_ID,
- image_info->image_base,
- image_info,
- ep_info);
-
-#endif /* LOAD_IMAGE_V2 */
-
if (err) {
ERROR("Failed to load BL2 firmware.\n");
plat_error_handler(err);
diff --git a/bl1/tbbr/tbbr_img_desc.c b/bl1/tbbr/tbbr_img_desc.c
index 44f58d3fa5..2581d90dfa 100644
--- a/bl1/tbbr/tbbr_img_desc.c
+++ b/bl1/tbbr/tbbr_img_desc.c
@@ -15,9 +15,7 @@ image_desc_t bl1_tbbr_image_descs[] = {
SET_STATIC_PARAM_HEAD(image_info, PARAM_IMAGE_BINARY,
VERSION_1, image_info_t, 0),
.image_info.image_base = BL2_BASE,
-#if LOAD_IMAGE_V2
.image_info.image_max_size = BL2_LIMIT - BL2_BASE,
-#endif
SET_STATIC_PARAM_HEAD(ep_info, PARAM_IMAGE_BINARY,
VERSION_1, entry_point_info_t, SECURE),
},
@@ -35,9 +33,7 @@ image_desc_t bl1_tbbr_image_descs[] = {
SET_STATIC_PARAM_HEAD(image_info, PARAM_IMAGE_BINARY,
VERSION_1, image_info_t, 0),
.image_info.image_base = SCP_BL2U_BASE,
-#if LOAD_IMAGE_V2
.image_info.image_max_size = SCP_BL2U_LIMIT - SCP_BL2U_BASE,
-#endif
SET_STATIC_PARAM_HEAD(ep_info, PARAM_IMAGE_BINARY,
VERSION_1, entry_point_info_t, SECURE),
},
@@ -48,9 +44,7 @@ image_desc_t bl1_tbbr_image_descs[] = {
SET_STATIC_PARAM_HEAD(image_info, PARAM_EP,
VERSION_1, image_info_t, 0),
.image_info.image_base = BL2U_BASE,
-#if LOAD_IMAGE_V2
.image_info.image_max_size = BL2U_LIMIT - BL2U_BASE,
-#endif
SET_STATIC_PARAM_HEAD(ep_info, PARAM_EP,
VERSION_1, entry_point_info_t, SECURE | EXECUTABLE),
.ep_info.pc = BL2U_BASE,