1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * CPU reset routines 4 * 5 * Copyright (C) 2001 Deep Blue Solutions Ltd. 6 * Copyright (C) 2012 ARM Ltd. 7 * Copyright (C) 2015 Huawei Futurewei Technol 8 */ 9 10 #include <linux/linkage.h> 11 #include <linux/cfi_types.h> 12 #include <asm/assembler.h> 13 #include <asm/sysreg.h> 14 #include <asm/virt.h> 15 16 .text 17 .pushsection .idmap.text, "a" 18 19 /* 20 * cpu_soft_restart(el2_switch, entry, arg0, a 21 * 22 * @el2_switch: Flag to indicate a switch to E 23 * @entry: Location to jump to for soft reset. 24 * arg0: First argument passed to @entry. (rel 25 * arg1: Second argument passed to @entry.(phy 26 * arg2: Third argument passed to @entry. (phy 27 * 28 * Put the CPU into the same state as it would 29 * branch to what would be the reset vector. I 30 * flat identity mapping. 31 */ 32 SYM_TYPED_FUNC_START(cpu_soft_restart) 33 mov_q x12, INIT_SCTLR_EL1_MMU_OFF 34 pre_disable_mmu_workaround 35 /* 36 * either disable EL1&0 translation re 37 * regime if HCR_EL2.E2H == 1 38 */ 39 msr sctlr_el1, x12 40 isb 41 42 cbz x0, 1f 43 mov x0, #HVC_SOFT_RESTART 44 hvc #0 45 46 1: mov x8, x1 47 mov x0, x2 48 mov x1, x3 49 mov x2, x4 50 br x8 51 SYM_FUNC_END(cpu_soft_restart) 52 53 .popsection
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.