summaryrefslogtreecommitdiff
path: root/bl2/bl2_main.c
diff options
context:
space:
mode:
authorYatharth Kochar <yatharth.kochar@arm.com>2016-06-30 14:52:12 +0100
committerYatharth Kochar <yatharth.kochar@arm.com>2016-09-21 16:27:58 +0100
commitd48c12e928c6e86d95c3c17e8fb56f0292afc623 (patch)
treeef6d74ab123999b4f3b0e7394b98aea8cabceba8 /bl2/bl2_main.c
parent83fc4a930bad68ca0014a25e0c41dc71cffa28b3 (diff)
AArch32: Add generic changes in BL2
This patch adds generic changes in BL2 to support AArch32 state. New AArch32 specific assembly/C files are introduced and some files are moved to AArch32/64 specific folders. BL2 for AArch64 is refactored but functionally identical. BL2 executes in Secure SVC mode in AArch32 state. Change-Id: Ifaacbc2a91f8640876385b953adb24744d9dbde3
Diffstat (limited to 'bl2/bl2_main.c')
-rw-r--r--bl2/bl2_main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c
index fc93e1b1..514c0053 100644
--- a/bl2/bl2_main.c
+++ b/bl2/bl2_main.c
@@ -60,6 +60,15 @@ void bl2_main(void)
/* Load the subsequent bootloader images. */
next_bl_ep_info = bl2_load_images();
+#ifdef AARCH32
+ /*
+ * For AArch32 state BL1 and BL2 share the MMU setup.
+ * Given that BL2 does not map BL1 regions, MMU needs
+ * to be disabled in order to go back to BL1.
+ */
+ disable_mmu_icache_secure();
+#endif /* AARCH32 */
+
/*
* Run next BL image via an SMC to BL1. Information on how to pass
* control to the BL32 (if present) and BL33 software images will