qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

target-arm: Add the Cortex-M4 CPU

This patch adds the Cortex-M4 CPU. The M4 is basically the same as
the M3, the main differences being the DSP instructions and an
optional FPU. Only no-FPU cortex-M4 is implemented here, cortex-M4F
is not because the core target-arm code doesn't support the M-profile
FPU model yet.

Signed-off-by: Aurelio C. Remonda <aurelioremonda@gmail.com>
Message-id: 1434461850-4104-1-git-send-email-aurelioremonda@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

authored by

Aurelio C. Remonda and committed by
Peter Maydell
ba890a9b ffdb1409

+11
+11
target-arm/cpu.c
··· 812 812 cpu->midr = 0x410fc231; 813 813 } 814 814 815 + static void cortex_m4_initfn(Object *obj) 816 + { 817 + ARMCPU *cpu = ARM_CPU(obj); 818 + 819 + set_feature(&cpu->env, ARM_FEATURE_V7); 820 + set_feature(&cpu->env, ARM_FEATURE_M); 821 + set_feature(&cpu->env, ARM_FEATURE_THUMB_DSP); 822 + cpu->midr = 0x410fc240; /* r0p0 */ 823 + } 815 824 static void arm_v7m_class_init(ObjectClass *oc, void *data) 816 825 { 817 826 CPUClass *cc = CPU_CLASS(oc); ··· 1213 1222 { .name = "arm1176", .initfn = arm1176_initfn }, 1214 1223 { .name = "arm11mpcore", .initfn = arm11mpcore_initfn }, 1215 1224 { .name = "cortex-m3", .initfn = cortex_m3_initfn, 1225 + .class_init = arm_v7m_class_init }, 1226 + { .name = "cortex-m4", .initfn = cortex_m4_initfn, 1216 1227 .class_init = arm_v7m_class_init }, 1217 1228 { .name = "cortex-a8", .initfn = cortex_a8_initfn }, 1218 1229 { .name = "cortex-a9", .initfn = cortex_a9_initfn },