summaryrefslogtreecommitdiff
path: root/plat
diff options
context:
space:
mode:
authorAchin Gupta <achin.gupta@arm.com>2014-02-19 17:52:35 +0000
committerDan Handley <dan.handley@arm.com>2014-02-20 19:06:34 +0000
commita3050ed521ec1fd6d34d7d8ba5105ac8bc024992 (patch)
tree0cd32ed1093a11a53f7635e0668a7afd5155513c /plat
parente4d084ea9629703166e59d116d4aefbd6f2be531 (diff)
Add support for BL3-2 in BL2
This patch adds support for loading a BL3-2 image in BL2. In case a BL3-2 image is found, it also passes information to BL3-1 about where it is located and the extents of memory available to it. Information about memory extents is populated by platform specific code. The documentation has also been updated to reflect the above changes. Change-Id: I526b2efb80babebab1318f2b02e319a86d6758b0 Co-authored-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'plat')
-rw-r--r--plat/fvp/bl2_plat_setup.c22
-rw-r--r--plat/fvp/platform.h5
2 files changed, 27 insertions, 0 deletions
diff --git a/plat/fvp/bl2_plat_setup.c b/plat/fvp/bl2_plat_setup.c
index 2e367d71..f0d6e448 100644
--- a/plat/fvp/bl2_plat_setup.c
+++ b/plat/fvp/bl2_plat_setup.c
@@ -122,6 +122,12 @@ void bl2_platform_setup()
/* Initialise the IO layer and register platform IO devices */
io_setup();
+ /*
+ * Ensure that the secure DRAM memory used for passing BL31 arguments
+ * does not overlap with the BL32_BASE.
+ */
+ assert (BL32_BASE > TZDRAM_BASE + sizeof(bl31_args));
+
/* Use the Trusted DRAM for passing args to BL31 */
bl2_to_bl31_args = (bl31_args *) TZDRAM_BASE;
@@ -132,6 +138,22 @@ void bl2_platform_setup()
bl2_to_bl31_args->bl33_meminfo.free_size = DRAM_SIZE;
bl2_to_bl31_args->bl33_meminfo.attr = 0;
bl2_to_bl31_args->bl33_meminfo.next = 0;
+
+ /*
+ * Populate the extents of memory available for loading BL32.
+ * TODO: We are temporarily executing BL2 from TZDRAM; will eventually
+ * move to Trusted SRAM
+ */
+ bl2_to_bl31_args->bl32_meminfo.total_base = BL32_BASE;
+ bl2_to_bl31_args->bl32_meminfo.free_base = BL32_BASE;
+
+ bl2_to_bl31_args->bl32_meminfo.total_size =
+ (TZDRAM_BASE + TZDRAM_SIZE) - BL32_BASE;
+ bl2_to_bl31_args->bl32_meminfo.free_size =
+ (TZDRAM_BASE + TZDRAM_SIZE) - BL32_BASE;
+
+ bl2_to_bl31_args->bl32_meminfo.attr = BOT_LOAD;
+ bl2_to_bl31_args->bl32_meminfo.next = 0;
}
/*******************************************************************************
diff --git a/plat/fvp/platform.h b/plat/fvp/platform.h
index 76a9fca4..11b62cc2 100644
--- a/plat/fvp/platform.h
+++ b/plat/fvp/platform.h
@@ -236,6 +236,11 @@
#define BL31_BASE 0x0400C000
/*******************************************************************************
+ * BL32 specific defines.
+ ******************************************************************************/
+#define BL32_BASE (TZDRAM_BASE + 0x2000)
+
+/*******************************************************************************
* Platform specific page table and MMU setup constants
******************************************************************************/
#define EL3_ADDR_SPACE_SIZE (1ull << 32)