| /* SPDX-License-Identifier: GPL-2.0-only */ |
| * Copyright (C) 2001 Deep Blue Solutions Ltd. |
| * Copyright (C) 2012 ARM Ltd. |
| * Copyright (C) 2015 Huawei Futurewei Technologies. |
| #include <linux/linkage.h> |
| #include <asm/assembler.h> |
| .pushsection .idmap.text, "awx" |
| * __cpu_soft_restart(el2_switch, entry, arg0, arg1, arg2) - Helper for |
| * @el2_switch: Flag to indicate a switch to EL2 is needed. |
| * @entry: Location to jump to for soft reset. |
| * arg0: First argument passed to @entry. (relocation list) |
| * arg1: Second argument passed to @entry.(physical kernel entry) |
| * arg2: Third argument passed to @entry. (physical dtb address) |
| * Put the CPU into the same state as it would be if it had been reset, and |
| * branch to what would be the reset vector. It must be executed with the |
| ENTRY(__cpu_soft_restart) |
| /* Clear sctlr_el1 flags. */ |
| ldr x13, =SCTLR_ELx_FLAGS |
| pre_disable_mmu_workaround |
| cbz x0, 1f // el2_switch? |
| mov x0, #HVC_SOFT_RESTART |
| ENDPROC(__cpu_soft_restart) |