Populate BL31 input parameters as per new spec
This patch is based on spec published at
https://github.com/ARM-software/tf-issues/issues/133
It rearranges the bl31_args struct into
bl31_params and bl31_plat_params which provide the
information needed for Trusted firmware and platform
specific data via x0 and x1
On the FVP platform BL3-1 params and BL3-1 plat params
and its constituents are stored at the start of TZDRAM.
The information about memory availability and size for
BL3-1, BL3-2 and BL3-3 is moved into platform specific data.
Change-Id: I8b32057a3d0dd3968ea26c2541a0714177820da9
diff --git a/bl31/aarch64/bl31_entrypoint.S b/bl31/aarch64/bl31_entrypoint.S
index 701bca3..c67d029 100644
--- a/bl31/aarch64/bl31_entrypoint.S
+++ b/bl31/aarch64/bl31_entrypoint.S
@@ -44,11 +44,11 @@
*/
func bl31_entrypoint
- /* ---------------------------------------------
- * Preceding bootloader has populated x0 with a
- * pointer to a 'bl31_args' structure & x1
- * with any other optional information
- * ---------------------------------------------
+ /* ---------------------------------------------------------------
+ * Preceding bootloader has populated x0 with a pointer to a
+ * 'bl31_params' structure & x1 with a pointer to platform
+ * specific structure
+ * ---------------------------------------------------------------
*/
mov x20, x0
mov x21, x1
diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c
index 5a09829..d74b254 100644
--- a/bl31/bl31_main.c
+++ b/bl31/bl31_main.c
@@ -152,7 +152,7 @@
******************************************************************************/
void bl31_prepare_next_image_entry()
{
- el_change_info_t *next_image_info;
+ entry_point_info_t *next_image_info;
uint32_t scr, image_type;
/* Determine which image to execute next */
@@ -176,13 +176,13 @@
* Tell the context mgmt. library to ensure that SP_EL3 points to
* the right context to exit from EL3 correctly.
*/
- cm_set_el3_eret_context(next_image_info->security_state,
- next_image_info->entrypoint,
+ cm_set_el3_eret_context(GET_SECURITY_STATE(next_image_info->h.attr),
+ next_image_info->pc,
next_image_info->spsr,
scr);
/* Finally set the next context */
- cm_set_next_eret_context(next_image_info->security_state);
+ cm_set_next_eret_context(GET_SECURITY_STATE(next_image_info->h.attr));
}
/*******************************************************************************