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
diff --git a/bl2/bl2_main.c b/bl2/bl2_main.c
index fc93e1b..514c005 100644
--- a/bl2/bl2_main.c
+++ b/bl2/bl2_main.c
@@ -60,6 +60,15 @@
/* 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