mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
hw/arm: highbank: For EL3 guests, don't enable PSCI, start all cores
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> 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-10-peter.maydell@linaro.org
This commit is contained in:
parent
52c235ad75
commit
33284d482c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user