summaryrefslogtreecommitdiff
path: root/bl2/bl2_main.c
diff options
context:
space:
mode:
authorRoberto Vargas <roberto.vargas@arm.com>2017-10-30 14:43:43 +0000
committerRoberto Vargas <roberto.vargas@arm.com>2018-01-18 09:42:35 +0000
commitb1d27b484f4172542eca074fdac42ffd13736a0f (patch)
treeaa9ceb97f7bb103de9bfc7237169aa3e833c2ba7 /bl2/bl2_main.c
parent34c2b9c2f144e213533c00bbdedb8da5b786311b (diff)
bl2-el3: Add BL2_EL3 image
This patch enables BL2 to execute at the highest exception level without any dependancy on TF BL1. This enables platforms which already have a non-TF Boot ROM to directly load and execute BL2 and subsequent BL stages without need for BL1. This is not currently possible because BL2 executes at S-EL1 and cannot jump straight to EL3. Change-Id: Ief1efca4598560b1b8c8e61fbe26d1f44e929d69 Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Diffstat (limited to 'bl2/bl2_main.c')
-rw-r--r--bl2/bl2_main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c
index 018deb34..c85db2d4 100644
--- a/bl2/bl2_main.c
+++ b/bl2/bl2_main.c
@@ -13,6 +13,11 @@
#include <platform.h>
#include "bl2_private.h"
+#ifdef AARCH32
+#define NEXT_IMAGE "BL32"
+#else
+#define NEXT_IMAGE "BL31"
+#endif
/*******************************************************************************
* The only thing to do in BL2 is to load further images and pass control to
@@ -49,6 +54,8 @@ void bl2_main(void)
disable_mmu_icache_secure();
#endif /* AARCH32 */
+
+#if !BL2_AT_EL3
console_flush();
/*
@@ -57,4 +64,11 @@ void bl2_main(void)
* be passed to next BL image as an argument.
*/
smc(BL1_SMC_RUN_IMAGE, (unsigned long)next_bl_ep_info, 0, 0, 0, 0, 0, 0);
+#else
+ NOTICE("BL2: Booting " NEXT_IMAGE "\n");
+ print_entry_point_info(next_bl_ep_info);
+ console_flush();
+
+ bl2_run_next_image(next_bl_ep_info);
+#endif
}