Skip to content

Commit

Permalink
arm: Don't clear ARM_FEATURE_PMSA for no-mpu configs
Browse files Browse the repository at this point in the history
Fix the handling of QOM properties for PMSA CPUs with no MPU:

Allow no-MPU to be specified by either:
 * has-mpu = false
 * pmsav7_dregion = 0
and make setting one imply the other. Don't clear the PMSA
feature bit in this situation.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1493122030-32191-6-git-send-email-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Jun 2, 2017
1 parent 452a095 commit f50cd31
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion target/arm/cpu.c
Expand Up @@ -763,8 +763,14 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
cpu->id_pfr1 &= ~0xf000;
}

/* MPU can be configured out of a PMSA CPU either by setting has-mpu
* to false or by setting pmsav7-dregion to 0.
*/
if (!cpu->has_mpu) {
unset_feature(env, ARM_FEATURE_PMSA);
cpu->pmsav7_dregion = 0;
}
if (cpu->pmsav7_dregion == 0) {
cpu->has_mpu = false;
}

if (arm_feature(env, ARM_FEATURE_PMSA) &&
Expand Down

0 comments on commit f50cd31

Please sign in to comment.