[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/16] hw/arm: highbank: For EL3 guests, don't enable PSCI, start
From: |
Peter Maydell |
Subject: |
[PATCH 09/16] hw/arm: highbank: For EL3 guests, don't enable PSCI, start all cores |
Date: |
Thu, 27 Jan 2022 15:46:32 +0000 |
Change the highbank/midway boards 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 and start-powered-off
properties on the CPU objects in the board 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 (in which case it will set these
properties).
This means that when running guest code at EL3, all the cores
will start execution at once on poweron. This matches the
real hardware behaviour. (A brief description of the hardware
boot process is in the u-boot documentation for these boards:
https://u-boot.readthedocs.io/en/latest/board/highbank/highbank.html#boot-process
-- in theory one might run the 'a9boot'/'a15boot' secure monitor
code in QEMU, though we probably don't emulate enough for that.)
This affects the highbank and midway boards.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/highbank.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index 4210894d814..048f8550cb9 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -271,12 +271,6 @@ static void calxeda_init(MachineState *machine, enum
cxmachines machine_id)
object_property_set_int(cpuobj, "psci-conduit", QEMU_PSCI_CONDUIT_SMC,
&error_abort);
- if (n) {
- /* Secondary CPUs start in PSCI powered-down state */
- object_property_set_bool(cpuobj, "start-powered-off", true,
- &error_abort);
- }
-
if (object_property_find(cpuobj, "reset-cbar")) {
object_property_set_int(cpuobj, "reset-cbar", MPCORE_PERIPHBASE,
&error_abort);
@@ -397,6 +391,7 @@ static void calxeda_init(MachineState *machine, enum
cxmachines machine_id)
highbank_binfo.board_setup_addr = BOARD_SETUP_ADDR;
highbank_binfo.write_board_setup = hb_write_board_setup;
highbank_binfo.secure_board_setup = true;
+ highbank_binfo.psci_conduit = QEMU_PSCI_CONDUIT_SMC;
arm_load_kernel(ARM_CPU(first_cpu), machine, &highbank_binfo);
}
--
2.25.1
- [PATCH 04/16] hw/arm: imx: Don't enable PSCI conduit when booting guest in EL3, (continued)
- [PATCH 04/16] hw/arm: imx: Don't enable PSCI conduit when booting guest in EL3, Peter Maydell, 2022/01/27
- [PATCH 05/16] hw/arm: allwinner: Don't enable PSCI conduit when booting guest in EL3, Peter Maydell, 2022/01/27
- [PATCH 06/16] hw/arm/xlnx-zcu102: Don't enable PSCI conduit when booting guest in EL3, Peter Maydell, 2022/01/27
- [PATCH 07/16] hw/arm/versal: Let boot.c handle PSCI enablement, Peter Maydell, 2022/01/27
- [PATCH 08/16] hw/arm/virt: Let boot.c handle PSCI enablement, Peter Maydell, 2022/01/27
- [PATCH 09/16] hw/arm: highbank: For EL3 guests, don't enable PSCI, start all cores,
Peter Maydell <=
- [PATCH 14/16] hw/arm/highbank: Drop unused secondary boot stub code, Peter Maydell, 2022/01/27
- [PATCH 10/16] Revert "Revert "arm: tcg: Adhere to SMCCC 1.3 section 5.2"", Peter Maydell, 2022/01/27
- [PATCH 13/16] hw/arm/boot: Don't write secondary boot stub if using PSCI, Peter Maydell, 2022/01/27
- [PATCH 11/16] hw/arm/highbank: Drop use of secure_board_setup, Peter Maydell, 2022/01/27
- [PATCH 15/16] hw/arm/boot: Drop nb_cpus field from arm_boot_info, Peter Maydell, 2022/01/27