aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/allwinner-h3.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-01-27 15:46:28 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-02-08 10:56:27 +0000
commit49865b901466d8f8ad4f16df4bcd076eee268e0f (patch)
tree7b7d9a45266401c706fb70b861492f2f351244dd /hw/arm/allwinner-h3.c
parentae2474f1189dcbe58b1927b0f955bd4a929df8ba (diff)
downloadqemu-49865b901466d8f8ad4f16df4bcd076eee268e0f.zip
qemu-49865b901466d8f8ad4f16df4bcd076eee268e0f.tar.gz
qemu-49865b901466d8f8ad4f16df4bcd076eee268e0f.tar.bz2
hw/arm: allwinner: Don't enable PSCI conduit when booting guest in EL3
Change the allwinner-h3 based board to use the new boot.c functionality to allow us to enable psci-conduit only if the guest is being booted in EL1 or EL2, so that if the user runs guest EL3 firmware code our PSCI emulation doesn't get in its way. To do this we stop setting the psci-conduit property on the CPU objects in the SoC code, and instead set the psci_conduit field in the arm_boot_info struct to tell the common boot loader code that we'd like PSCI if the guest is starting at an EL that it makes sense with. This affects the orangepi-pc board. This commit leaves the secondary CPUs in the powered-down state if the guest is booting at EL3, which is the same behaviour as before this commit. The secondaries can no longer be started by that EL3 code making a PSCI call but can still be started via the CPU Configuration Module registers (which we model in hw/misc/allwinner-cpucfg.c). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Niek Linnenbank <nieklinnenbank@gmail.com> Tested-by: Cédric Le Goater <clg@kaod.org> Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com> Message-id: 20220127154639.2090164-6-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm/allwinner-h3.c')
-rw-r--r--hw/arm/allwinner-h3.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c
index f9b7ed1..318ed43 100644
--- a/hw/arm/allwinner-h3.c
+++ b/hw/arm/allwinner-h3.c
@@ -235,11 +235,10 @@ static void allwinner_h3_realize(DeviceState *dev, Error **errp)
/* CPUs */
for (i = 0; i < AW_H3_NUM_CPUS; i++) {
- /* Provide Power State Coordination Interface */
- qdev_prop_set_int32(DEVICE(&s->cpus[i]), "psci-conduit",
- QEMU_PSCI_CONDUIT_SMC);
-
- /* Disable secondary CPUs */
+ /*
+ * Disable secondary CPUs. Guest EL3 firmware will start
+ * them via CPU reset control registers.
+ */
qdev_prop_set_bit(DEVICE(&s->cpus[i]), "start-powered-off",
i > 0);