diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-01-27 15:46:36 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-02-08 10:56:28 +0000 |
commit | d4a29ed6db32ae2f21561e87e27936782e0b8a44 (patch) | |
tree | 211ba766f72b40e65547e8a90fe8c8a8e86dc17d /include | |
parent | dc888dd43bea83b1ccc3d0554d5044179554a5f1 (diff) | |
download | qemu-d4a29ed6db32ae2f21561e87e27936782e0b8a44.zip qemu-d4a29ed6db32ae2f21561e87e27936782e0b8a44.tar.gz qemu-d4a29ed6db32ae2f21561e87e27936782e0b8a44.tar.bz2 |
hw/arm/boot: Don't write secondary boot stub if using PSCI
If we're using PSCI emulation to start secondary CPUs, there is no
point in writing the "secondary boot" stub code, because it will
never be used -- secondary CPUs start powered-off, and when powered
on are set to begin execution at the address specified by the guest's
power-on PSCI call, not at the stub.
Move the call to the hook that writes the secondary boot stub code so
that we can do it only if we're starting a Linux kernel and not using
PSCI.
(None of the users of the hook care about the ordering of its call
relative to anything else: they only use it to write a rom blob to
guest memory.)
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-14-peter.maydell@linaro.org
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/arm/boot.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/arm/boot.h b/include/hw/arm/boot.h index 0bcb58b..0cfc1c9 100644 --- a/include/hw/arm/boot.h +++ b/include/hw/arm/boot.h @@ -70,6 +70,9 @@ struct arm_boot_info { * boot loader/boot ROM code, and secondary_cpu_reset_hook() should * perform any necessary CPU reset handling and set the PC for the * secondary CPUs to point at this boot blob. + * + * These hooks won't be called if secondary CPUs are booting via + * emulated PSCI (see psci_conduit below). */ void (*write_secondary_boot)(ARMCPU *cpu, const struct arm_boot_info *info); |