2 * (C) Copyright 2014, Cavium Inc.
4 * SPDX-License-Identifier: GPL-2.0+
7 #include <asm-offsets.h>
10 #include <asm/macro.h>
12 #include <asm/system.h>
15 * Issue the hypervisor call
17 * x0~x7: input arguments
18 * x0~x3: output arguments
20 void hvc_call(struct pt_regs *args)
36 : "+m" (args->regs[0]), "+m" (args->regs[1]),
37 "+m" (args->regs[2]), "+m" (args->regs[3])
38 : "m" (args->regs[4]), "m" (args->regs[5]),
39 "m" (args->regs[6]), "m" (args->regs[7])
40 : "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7",
41 "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15",
46 * void smc_call(arg0, arg1...arg7)
48 * issue the secure monitor call
50 * x0~x7: input arguments
51 * x0~x3: output arguments
54 void smc_call(struct pt_regs *args)
69 : "+m" (args->regs[0]), "+m" (args->regs[1]),
70 "+m" (args->regs[2]), "+m" (args->regs[3])
71 : "m" (args->regs[4]), "m" (args->regs[5]),
73 : "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7",
74 "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15",
78 void __noreturn psci_system_reset(bool conduit_smc)
82 regs.regs[0] = ARM_PSCI_0_2_FN_SYSTEM_RESET;