[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/39] hw/arm: allwinner: Don't enable PSCI conduit when booting g
From: |
Peter Maydell |
Subject: |
[PULL 10/39] hw/arm: allwinner: Don't enable PSCI conduit when booting guest in EL3 |
Date: |
Tue, 8 Feb 2022 11:39:19 +0000 |
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
---
hw/arm/allwinner-h3.c | 9 ++++-----
hw/arm/orangepi.c | 1 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c
index f9b7ed18711..318ed4348c7 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);
diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
index e7963822367..68fe9182414 100644
--- a/hw/arm/orangepi.c
+++ b/hw/arm/orangepi.c
@@ -105,6 +105,7 @@ static void orangepi_init(MachineState *machine)
}
orangepi_binfo.loader_start = h3->memmap[AW_H3_DEV_SDRAM];
orangepi_binfo.ram_size = machine->ram_size;
+ orangepi_binfo.psci_conduit = QEMU_PSCI_CONDUIT_SMC;
arm_load_kernel(ARM_CPU(first_cpu), machine, &orangepi_binfo);
}
--
2.25.1
- [PULL 00/39] target-arm queue, Peter Maydell, 2022/02/08
- [PULL 11/39] hw/arm/xlnx-zcu102: Don't enable PSCI conduit when booting guest in EL3, Peter Maydell, 2022/02/08
- [PULL 05/39] hw/arm/xlnx-zynqmp: 'Or' the QSPI / QSPI DMA IRQs, Peter Maydell, 2022/02/08
- [PULL 06/39] target/arm: make psci-conduit settable after realize, Peter Maydell, 2022/02/08
- [PULL 01/39] target/arm: Fix sve_zcr_len_for_el for VHE mode running, Peter Maydell, 2022/02/08
- [PULL 15/39] arm: tcg: Adhere to SMCCC 1.3 section 5.2, Peter Maydell, 2022/02/08
- [PULL 08/39] hw/arm/boot: Support setting psci-conduit based on guest EL, Peter Maydell, 2022/02/08
- [PULL 02/39] target/arm: Tidy sve_exception_el for CPACR_EL1 access, Peter Maydell, 2022/02/08
- [PULL 10/39] hw/arm: allwinner: Don't enable PSCI conduit when booting guest in EL3,
Peter Maydell <=
- [PULL 13/39] hw/arm/virt: Let boot.c handle PSCI enablement, Peter Maydell, 2022/02/08
- [PULL 12/39] hw/arm/versal: Let boot.c handle PSCI enablement, Peter Maydell, 2022/02/08
- [PULL 03/39] target/arm: Fix {fp, sve}_exception_el for VHE mode running, Peter Maydell, 2022/02/08
- [PULL 07/39] cpu.c: Make start-powered-off settable after realize, Peter Maydell, 2022/02/08
- [PULL 17/39] hw/arm/boot: Prevent setting both psci_conduit and secure_board_setup, Peter Maydell, 2022/02/08
- [PULL 04/39] target/arm: Use CPTR_TFP with CPTR_EL3 in fp_exception_el, Peter Maydell, 2022/02/08
- [PULL 14/39] hw/arm: highbank: For EL3 guests, don't enable PSCI, start all cores, Peter Maydell, 2022/02/08
- [PULL 27/39] hw/intc/arm_gicv3_its: Keep DTEs as a struct, not a raw uint64_t, Peter Maydell, 2022/02/08
- [PULL 39/39] hw/sensor: Add lsm303dlhc magnetometer device, Peter Maydell, 2022/02/08
- [PULL 29/39] hw/intc/arm_gicv3_its: Keep CTEs as a struct, not a raw uint64_t, Peter Maydell, 2022/02/08