2 * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
4 * SPDX-License-Identifier: BSD-3-Clause
8 #include <asm_macros.S>
9 #include <common/bl_common.h>
10 #include <el3_common_macros.S>
13 .globl bl2_vector_table
14 .globl bl2_el3_run_image
15 .globl bl2_run_next_image
18 /* Save arguments x0-x3 from previous Boot loader */
24 el3_entrypoint_common \
26 _warm_boot_mailbox=!PROGRAMMABLE_RESET_ADDRESS \
27 _secondary_cold_boot=!COLD_BOOT_SINGLE_CPU \
30 _exception_vectors=bl2_el3_exceptions
33 * Restore parameters of boot rom
40 bl bl2_el3_early_platform_setup
41 bl bl2_el3_plat_arch_setup
43 /* ---------------------------------------------
44 * Jump to main function.
45 * ---------------------------------------------
49 /* ---------------------------------------------
50 * Should never reach this point.
51 * ---------------------------------------------
53 no_ret plat_panic_handler
54 endfunc bl2_entrypoint
56 func bl2_run_next_image
59 * MMU needs to be disabled because both BL2 and BL31 execute
60 * in EL3, and therefore share the same address space.
61 * BL31 will initialize the address space according to its
64 bl disable_mmu_icache_el3
66 bl bl2_el3_plat_prepare_exit
68 ldp x0, x1, [x20, #ENTRY_POINT_INFO_PC_OFFSET]
72 ldp x6, x7, [x20, #(ENTRY_POINT_INFO_ARGS_OFFSET + 0x30)]
73 ldp x4, x5, [x20, #(ENTRY_POINT_INFO_ARGS_OFFSET + 0x20)]
74 ldp x2, x3, [x20, #(ENTRY_POINT_INFO_ARGS_OFFSET + 0x10)]
75 ldp x0, x1, [x20, #(ENTRY_POINT_INFO_ARGS_OFFSET + 0x0)]
77 endfunc bl2_run_next_image