2 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
10 #include <platform_def.h>
13 #include <arch_helpers.h>
15 #include <bl2u/bl2u.h>
16 #include <common/bl_common.h>
17 #include <common/debug.h>
18 #include <drivers/auth/auth_mod.h>
19 #include <drivers/console.h>
20 #include <plat/common/platform.h>
22 /*******************************************************************************
23 * This function is responsible to:
24 * Load SCP_BL2U if platform has defined SCP_BL2U_BASE
25 * Perform platform setup.
27 ******************************************************************************/
30 NOTICE("BL2U: %s\n", version_string
);
31 NOTICE("BL2U: %s\n", build_message
);
35 /* Load the subsequent bootloader images */
36 rc
= bl2u_plat_handle_scp_bl2u();
38 ERROR("Failed to load SCP_BL2U (%i)\n", rc
);
43 /* Perform platform setup in BL2U after loading SCP_BL2U */
44 bl2u_platform_setup();
50 * For AArch32 state BL1 and BL2U share the MMU setup.
51 * Given that BL2U does not map BL1 regions, MMU needs
52 * to be disabled in order to go back to BL1.
54 disable_mmu_icache_secure();
55 #endif /* !__aarch64__ */
58 * Indicate that BL2U is done and resume back to
59 * normal world via an SMC to BL1.
60 * x1 could be passed to Normal world,
61 * so DO NOT pass any secret information.
63 smc(FWU_SMC_SEC_IMAGE_DONE
, 0, 0, 0, 0, 0, 0, 0);