Lines Matching +full:psci +full:- +full:0
2 * Copyright (C) 2014 - Linaro
21 #include "exec/helper-proto.h"
22 #include "kvm-consts.h"
23 #include "qemu/main-loop.h"
26 #include "arm-powerctl.h"
32 * Return true if the exception type matches the configured PSCI conduit. in arm_is_psci_call()
34 * whether we should treat it as a PSCI call or with the architecturally in arm_is_psci_call()
41 if (cpu->psci_conduit != QEMU_PSCI_CONDUIT_HVC) { in arm_is_psci_call()
46 if (cpu->psci_conduit != QEMU_PSCI_CONDUIT_SMC) { in arm_is_psci_call()
61 * Coordination Interface (PSCI) calls (as described in ARM DEN 0022D.b), in arm_handle_psci_call()
67 CPUARMState *env = &cpu->env; in arm_handle_psci_call()
71 int32_t ret = 0; in arm_handle_psci_call()
74 for (i = 0; i < 4; i++) { in arm_handle_psci_call()
76 * All PSCI functions take explicit 32-bit or native int sized in arm_handle_psci_call()
77 * arguments so we can simply zero-extend all arguments regardless in arm_handle_psci_call()
80 param[i] = is_a64(env) ? env->xregs[i] : env->regs[i]; in arm_handle_psci_call()
83 if ((param[0] & QEMU_PSCI_0_2_64BIT) && !is_a64(env)) { in arm_handle_psci_call()
88 switch (param[0]) { in arm_handle_psci_call()
103 case 0: in arm_handle_psci_call()
112 ret = target_cpu->power_state; in arm_handle_psci_call()
115 /* Everything above affinity level 0 is always on. */ in arm_handle_psci_call()
116 ret = 0; in arm_handle_psci_call()
121 /* QEMU reset and shutdown are async requests, but PSCI in arm_handle_psci_call()
134 /* The PSCI spec mandates that newly brought up CPUs start in arm_handle_psci_call()
136 * on the calling CPU. Since the QEMU PSCI implementation is in arm_handle_psci_call()
162 if (param[1] & 0xfffe0000) { in arm_handle_psci_call()
168 env->xregs[0] = 0; in arm_handle_psci_call()
170 env->regs[0] = 0; in arm_handle_psci_call()
192 ret = 0; in arm_handle_psci_call()
212 env->xregs[0] = ret; in arm_handle_psci_call()
214 env->regs[0] = ret; in arm_handle_psci_call()