From d48c12e928c6e86d95c3c17e8fb56f0292afc623 Mon Sep 17 00:00:00 2001 From: Yatharth Kochar Date: Thu, 30 Jun 2016 14:52:12 +0100 Subject: 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 --- bl2/bl2_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bl2/bl2_main.c') 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 -- cgit v1.2.3