mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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
This commit is contained in:
parent
dc888dd43b
commit
d4a29ed6db
2 changed files with 27 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue