developer | f596c1a | 2023-07-19 17:17:49 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Copyright (C) 2020 MediaTek Inc. |
| 4 | * Author: Sam Shih <sam.shih@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 | |
| 22 | .global armv8_el2_to_aarch32 |
| 23 | armv8_el2_to_aarch32: |
| 24 | mov x3, x2 |
| 25 | mov x2, x1 |
| 26 | mov x1, x4 |
| 27 | mov x4, #0 |
| 28 | ldr x0, =0x82000200 |
| 29 | SMC #0 |
| 30 | ret |