diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-01-27 15:46:35 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-02-08 10:56:28 +0000 |
commit | dc888dd43bea83b1ccc3d0554d5044179554a5f1 (patch) | |
tree | 4be07f0728f217d678f87ca4c911a7623bb2c8b2 /hw/arm | |
parent | 61b82973e746ff750fbbafe10fa6e3c416b01321 (diff) | |
download | qemu-dc888dd43bea83b1ccc3d0554d5044179554a5f1.zip qemu-dc888dd43bea83b1ccc3d0554d5044179554a5f1.tar.gz qemu-dc888dd43bea83b1ccc3d0554d5044179554a5f1.tar.bz2 |
hw/arm/boot: Prevent setting both psci_conduit and secure_board_setup
Now that we have dealt with the one special case (highbank) that needed
to set both psci_conduit and secure_board_setup, we don't need to
allow that combination any more. It doesn't make sense in general,
so use an assertion to ensure we don't add new boards that do it
by accident without thinking through the consequences.
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-13-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm')
-rw-r--r-- | hw/arm/boot.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 327e449..0424c17 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -1339,6 +1339,16 @@ void arm_load_kernel(ARMCPU *cpu, MachineState *ms, struct arm_boot_info *info) * supported exception level or in a lower one. */ + /* + * If PSCI is enabled, then SMC calls all go to the PSCI handler and + * are never emulated to trap into guest code. It therefore does not + * make sense for the board to have a setup code fragment that runs + * in Secure, because this will probably need to itself issue an SMC of some + * kind as part of its operation. + */ + assert(info->psci_conduit == QEMU_PSCI_CONDUIT_DISABLED || + !info->secure_board_setup); + /* Boot into highest supported EL ... */ if (arm_feature(env, ARM_FEATURE_EL3)) { boot_el = 3; |