summaryrefslogtreecommitdiff
path: root/bl1/bl1_main.c
diff options
context:
space:
mode:
authorYatharth Kochar <yatharth.kochar@arm.com>2016-06-28 17:07:09 +0100
committerYatharth Kochar <yatharth.kochar@arm.com>2016-09-21 16:27:27 +0100
commitf3b4914be3b41eb2231184f7af80240296f668c5 (patch)
treed55c0effc0e98562e6c08640fcc2a5eb74ae2983 /bl1/bl1_main.c
parent1a0a3f0622e4b569513304109d9a0d093b71228a (diff)
AArch32: Add generic changes in BL1
This patch adds generic changes in BL1 to support AArch32 state. New AArch32 specific assembly/C files are introduced and some files are moved to AArch32/64 specific folders. BL1 for AArch64 is refactored but functionally identical. BL1 executes in Secure Monitor mode in AArch32 state. NOTE: BL1 in AArch32 state ONLY handles BL1_RUN_IMAGE SMC. Change-Id: I6e2296374c7efbf3cf2aa1a0ce8de0732d8c98a5
Diffstat (limited to 'bl1/bl1_main.c')
-rw-r--r--bl1/bl1_main.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/bl1/bl1_main.c b/bl1/bl1_main.c
index 68a17a3c..fbb75e02 100644
--- a/bl1/bl1_main.c
+++ b/bl1/bl1_main.c
@@ -107,15 +107,20 @@ void bl1_main(void)
NOTICE("BL1: %s\n", version_string);
NOTICE("BL1: %s\n", build_message);
- INFO("BL1: RAM 0x%lx - 0x%lx\n", BL1_RAM_BASE, BL1_RAM_LIMIT);
+ INFO("BL1: RAM %p - %p\n", (void *)BL1_RAM_BASE,
+ (void *)BL1_RAM_LIMIT);
#if DEBUG
- unsigned long val;
+ u_register_t val;
/*
* Ensure that MMU/Caches and coherency are turned on
*/
+#ifdef AARCH32
+ val = read_sctlr();
+#else
val = read_sctlr_el3();
+#endif
assert(val & SCTLR_M_BIT);
assert(val & SCTLR_C_BIT);
assert(val & SCTLR_I_BIT);
@@ -223,21 +228,25 @@ void bl1_load_bl2(void)
bl1_init_bl2_mem_layout(bl1_tzram_layout, bl2_tzram_layout);
- ep_info->args.arg1 = (unsigned long)bl2_tzram_layout;
+ ep_info->args.arg1 = (uintptr_t)bl2_tzram_layout;
NOTICE("BL1: Booting BL2\n");
- VERBOSE("BL1: BL2 memory layout address = 0x%llx\n",
- (unsigned long long) bl2_tzram_layout);
+ VERBOSE("BL1: BL2 memory layout address = %p\n",
+ (void *) bl2_tzram_layout);
}
/*******************************************************************************
- * Function called just before handing over to BL31 to inform the user about
- * the boot progress. In debug mode, also print details about the BL31 image's
- * execution context.
+ * Function called just before handing over to the next BL to inform the user
+ * about the boot progress. In debug mode, also print details about the BL
+ * image's execution context.
******************************************************************************/
-void bl1_print_bl31_ep_info(const entry_point_info_t *bl31_ep_info)
+void bl1_print_next_bl_ep_info(const entry_point_info_t *bl_ep_info)
{
+#ifdef AARCH32
+ NOTICE("BL1: Booting BL32\n");
+#else
NOTICE("BL1: Booting BL31\n");
- print_entry_point_info(bl31_ep_info);
+#endif /* AARCH32 */
+ print_entry_point_info(bl_ep_info);
}
#if SPIN_ON_BL1_EXIT