1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2019 MediaTek Inc. 4 * Author: Mingming Lee <mingming.lee@mediatek.com> 5 */ 6 7/* 8 * Switch from AArch64 EL2 to AArch32 EL2 9 * @param inputs: 10 * x0: argument, zero 11 * x1: machine nr 12 * x2: fdt address 13 * x3: input argument 14 * x4: kernel entry point 15 * @param outputs for secure firmware: 16 * x0: function id 17 * x1: kernel entry point 18 * x2: machine nr 19 * x3: fdt address 20*/ 21.global armv8_el2_to_aarch32 22armv8_el2_to_aarch32: 23 mov x3, x2 24 mov x2, x1 25 mov x1, x4 26 mov x4, #0 27 /* Define in src\bsp\trustzone\atf\v1.2\ */ 28 /* mt8xxx\plat\mediatek\common\sip_svc.h */ 29 /* MTK_SIP_KERNEL_BOOT_AARCH64 for U-BOOT-64 to KERNEL*/ 30 ldr x0, =0xC2000200 31 SMC #0 32 ret 33