From 98128601ac8ff23df8a4c48acff00f9614613463 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 24 Oct 2014 12:19:13 +0100 Subject: target-arm: add emulation of PSCI calls for system emulation Add support for handling PSCI calls in system emulation. Both version 0.1 and 0.2 of the PSCI spec are supported. Platforms can enable support by setting the "psci-conduit" QOM property on the cpus to SMC or HVC emulation and having a PSCI binding in their dtb. Signed-off-by: Rob Herring Signed-off-by: Ard Biesheuvel Signed-off-by: Peter Maydell Message-id: 1412865028-17725-7-git-send-email-peter.maydell@linaro.org [PMM: made system reset/off PSCI functions power down the CPU so we obey the PSCI API requirement never to return from them; rearranged how the code is plumbed into the exception system, so that we split "is this a valid call?" from "do the call"] Signed-off-by: Peter Maydell --- target-arm/cpu-qom.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'target-arm/cpu-qom.h') diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h index aeb7e1d..dcfda7d 100644 --- a/target-arm/cpu-qom.h +++ b/target-arm/cpu-qom.h @@ -101,6 +101,11 @@ typedef struct ARMCPU { /* CPU currently in PSCI powered-off state */ bool powered_off; + /* PSCI conduit used to invoke PSCI methods + * 0 - disabled, 1 - smc, 2 - hvc + */ + uint32_t psci_conduit; + /* [QEMU_]KVM_ARM_TARGET_* constant for this CPU, or * QEMU_KVM_ARM_TARGET_NONE if the kernel doesn't support this CPU type. */ -- cgit v1.1