hw/arm/boot: Don't write secondary boot stub if using PSCI
commitd4a29ed6db32ae2f21561e87e27936782e0b8a44
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 27 Jan 2022 15:46:36 +0000 (27 15:46 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Feb 2022 10:56:28 +0000 (8 10:56 +0000)
tree211ba766f72b40e65547e8a90fe8c8a8e86dc17d
parentdc888dd43bea83b1ccc3d0554d5044179554a5f1
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
hw/arm/boot.c
include/hw/arm/boot.h