1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * (C) Copyright 2021 Rockchip Electronics Co., Ltd 4 */ 5 6#include <config.h> 7 8#ifdef CONFIG_ARM64 9/* 10 * Switch from AArch64 EL2 to AArch32 EL2 11 * 12 * @param inputs: 13 * x0: argument, zero 14 * x1: machine nr 15 * x2: fdt address 16 * x3: input argument 17 * x4: kernel entry point 18 * 19 * @param outputs for secure firmware: 20 * x0: function id 21 * x1: kernel entry point 22 * x2: machine nr 23 * x3: fdt address 24 * x4: input argument 25 */ 26.global armv8_el2_to_aarch32 27armv8_el2_to_aarch32: 28 mov x0, x3 29 mov x3, x2 30 mov x2, x1 31 mov x1, x4 32 mov x4, x0 33 ldr x0, =0x82000023 34 smc #0 35 ret 36#endif 37 38