aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorVikram Kanigiri <vikram.kanigiri@arm.com>2014-05-16 18:48:12 +0100
committerVikram Kanigiri <vikram.kanigiri@arm.com>2014-05-22 16:19:32 +0100
commit6871c5d3a227cb95008a25e90e358ec0ac615222 (patch)
treefe40950e7d517aa673ab2cc11b5255c4268ae291 /common
parent4112bfa0c223eda73af1cfe57ca7dc926f767dd8 (diff)
Rework memory information passing to BL3-x images
The issues addressed in this patch are: 1. Remove meminfo_t from the common interfaces in BL3-x, expecting that platform code will find a suitable mechanism to determine the memory extents in these images and provide it to the BL3-x images. 2. Remove meminfo_t and bl31_plat_params_t from all FVP BL3-x code as the images use link-time information to determine memory extents. meminfo_t is still used by common interface in BL1/BL2 for loading images Change-Id: I4e825ebf6f515b59d84dc2bdddf6edbf15e2d60f
Diffstat (limited to 'common')
-rw-r--r--common/bl_common.c61
1 files changed, 2 insertions, 59 deletions
diff --git a/common/bl_common.c b/common/bl_common.c
index a2fa2d6..911ad4c 100644
--- a/common/bl_common.c
+++ b/common/bl_common.c
@@ -74,68 +74,11 @@ void change_security_state(unsigned int target_security_state)
/*******************************************************************************
- * The next two functions are the weak definitions. Platform specific
- * code can override them if it wishes to.
+ * The next function is a weak definition. Platform specific
+ * code can override it if it wishes to.
******************************************************************************/
/*******************************************************************************
- * Function that takes a memory layout into which BL31 has been either top or
- * bottom loaded. Using this information, it populates bl31_mem_layout to tell
- * BL31 how much memory it has access to and how much is available for use. It
- * does not need the address where BL31 has been loaded as BL31 will reclaim
- * all the memory used by BL2.
- * TODO: Revisit if this and init_bl2_mem_layout can be replaced by a single
- * routine.
- ******************************************************************************/
-void init_bl31_mem_layout(const meminfo_t *bl2_mem_layout,
- meminfo_t *bl31_mem_layout,
- unsigned int load_type)
-{
- if (load_type == BOT_LOAD) {
- /*
- * ------------ ^
- * | BL2 | |
- * |----------| ^ | BL2
- * | | | BL2 free | total
- * | | | size | size
- * |----------| BL2 free base v |
- * | BL31 | |
- * ------------ BL2 total base v
- */
- unsigned long bl31_size;
-
- bl31_mem_layout->free_base = bl2_mem_layout->free_base;
-
- bl31_size = bl2_mem_layout->free_base - bl2_mem_layout->total_base;
- bl31_mem_layout->free_size = bl2_mem_layout->total_size - bl31_size;
- } else {
- /*
- * ------------ ^
- * | BL31 | |
- * |----------| ^ | BL2
- * | | | BL2 free | total
- * | | | size | size
- * |----------| BL2 free base v |
- * | BL2 | |
- * ------------ BL2 total base v
- */
- unsigned long bl2_size;
-
- bl31_mem_layout->free_base = bl2_mem_layout->total_base;
-
- bl2_size = bl2_mem_layout->free_base - bl2_mem_layout->total_base;
- bl31_mem_layout->free_size = bl2_mem_layout->free_size + bl2_size;
- }
-
- bl31_mem_layout->total_base = bl2_mem_layout->total_base;
- bl31_mem_layout->total_size = bl2_mem_layout->total_size;
- bl31_mem_layout->attr = load_type;
-
- flush_dcache_range((unsigned long) bl31_mem_layout, sizeof(meminfo_t));
- return;
-}
-
-/*******************************************************************************
* Function that takes a memory layout into which BL2 has been either top or
* bottom loaded along with the address where BL2 has been loaded in it. Using
* this information, it populates bl2_mem_layout to tell BL2 how much memory