arm: All M profile cores are PMSA

All M profile CPUs are PMSA, so set the feature bit.
(We haven't actually implemented the M profile MPU register
interface yet, but setting this feature bit gives us closer
to correct behaviour for the MPU-disabled case.)

Backports commit 790a11503cfb5e1dcd031ea2212bbebae4ca3cec from qemu
This commit is contained in:
Peter Maydell 2018-03-02 19:26:33 -05:00 committed by Lioncash
parent 4d8ae4a2b2
commit 9bc3050c51
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -423,6 +423,14 @@ static void arm_cpu_post_init(struct uc_struct *uc, Object *obj)
{
ARMCPU *cpu = ARM_CPU(uc, obj);
/* M profile implies PMSA. We have to do this here rather than
* in realize with the other feature-implication checks because
* we look at the PMSA bit to see if we should add some properties.
*/
if (arm_feature(&cpu->env, ARM_FEATURE_M)) {
set_feature(&cpu->env, ARM_FEATURE_PMSA);
}
if (arm_feature(&cpu->env, ARM_FEATURE_CBAR) ||
arm_feature(&cpu->env, ARM_FEATURE_CBAR_RO)) {
//qdev_property_add_static(DEVICE(obj), &arm_cpu_reset_cbar_property,