target/arm: Introduce ARM_FEATURE_M_MAIN
This feature is intended to distinguish ARMv8-M variants: Baseline and Mainline. ARMv7-M compatibility requires the Main Extension. ARMv6-M compatibility is provided by all ARMv8-M implementations. Signed-off-by: Julia Suvorova <jusual@mail.ru> Message-id: 20180622080138.17702-2-jusual@mail.ru Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
665670aa3a
commit
cc2ae7c9de
|
@ -1238,6 +1238,7 @@ static void cortex_m3_initfn(Object *obj)
|
||||||
ARMCPU *cpu = ARM_CPU(obj);
|
ARMCPU *cpu = ARM_CPU(obj);
|
||||||
set_feature(&cpu->env, ARM_FEATURE_V7);
|
set_feature(&cpu->env, ARM_FEATURE_V7);
|
||||||
set_feature(&cpu->env, ARM_FEATURE_M);
|
set_feature(&cpu->env, ARM_FEATURE_M);
|
||||||
|
set_feature(&cpu->env, ARM_FEATURE_M_MAIN);
|
||||||
cpu->midr = 0x410fc231;
|
cpu->midr = 0x410fc231;
|
||||||
cpu->pmsav7_dregion = 8;
|
cpu->pmsav7_dregion = 8;
|
||||||
cpu->id_pfr0 = 0x00000030;
|
cpu->id_pfr0 = 0x00000030;
|
||||||
|
@ -1262,6 +1263,7 @@ static void cortex_m4_initfn(Object *obj)
|
||||||
|
|
||||||
set_feature(&cpu->env, ARM_FEATURE_V7);
|
set_feature(&cpu->env, ARM_FEATURE_V7);
|
||||||
set_feature(&cpu->env, ARM_FEATURE_M);
|
set_feature(&cpu->env, ARM_FEATURE_M);
|
||||||
|
set_feature(&cpu->env, ARM_FEATURE_M_MAIN);
|
||||||
set_feature(&cpu->env, ARM_FEATURE_THUMB_DSP);
|
set_feature(&cpu->env, ARM_FEATURE_THUMB_DSP);
|
||||||
cpu->midr = 0x410fc240; /* r0p0 */
|
cpu->midr = 0x410fc240; /* r0p0 */
|
||||||
cpu->pmsav7_dregion = 8;
|
cpu->pmsav7_dregion = 8;
|
||||||
|
@ -1287,6 +1289,7 @@ static void cortex_m33_initfn(Object *obj)
|
||||||
|
|
||||||
set_feature(&cpu->env, ARM_FEATURE_V8);
|
set_feature(&cpu->env, ARM_FEATURE_V8);
|
||||||
set_feature(&cpu->env, ARM_FEATURE_M);
|
set_feature(&cpu->env, ARM_FEATURE_M);
|
||||||
|
set_feature(&cpu->env, ARM_FEATURE_M_MAIN);
|
||||||
set_feature(&cpu->env, ARM_FEATURE_M_SECURITY);
|
set_feature(&cpu->env, ARM_FEATURE_M_SECURITY);
|
||||||
set_feature(&cpu->env, ARM_FEATURE_THUMB_DSP);
|
set_feature(&cpu->env, ARM_FEATURE_THUMB_DSP);
|
||||||
cpu->midr = 0x410fd213; /* r0p3 */
|
cpu->midr = 0x410fd213; /* r0p3 */
|
||||||
|
|
|
@ -1482,6 +1482,7 @@ enum arm_features {
|
||||||
ARM_FEATURE_V8_RDM, /* implements v8.1 simd round multiply */
|
ARM_FEATURE_V8_RDM, /* implements v8.1 simd round multiply */
|
||||||
ARM_FEATURE_V8_FP16, /* implements v8.2 half-precision float */
|
ARM_FEATURE_V8_FP16, /* implements v8.2 half-precision float */
|
||||||
ARM_FEATURE_V8_FCMA, /* has complex number part of v8.3 extensions. */
|
ARM_FEATURE_V8_FCMA, /* has complex number part of v8.3 extensions. */
|
||||||
|
ARM_FEATURE_M_MAIN, /* M profile Main Extension */
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline int arm_feature(CPUARMState *env, int feature)
|
static inline int arm_feature(CPUARMState *env, int feature)
|
||||||
|
|
Loading…
Reference in a new issue