Support for MCLASS ARM cpu (Cortex-M3) (#700)

Support for Cortex-M ARM CPU already exists in Qemu. This patch just
exposes a "cortex-m3" CPU.

"uc_open(UC_ARCH_ARM, UC_MODE_THUMB | UC_MODE_MCLASS, &uc);"
Instantiates a CPU with this feature on.

Signed-off-by: Lucian Cojocar <lucian@cojocar.com>
This commit is contained in:
cojocar
2016-12-27 15:49:06 +01:00
committed by Nguyen Anh Quynh
parent efe6efeb84
commit 428cb83060
2 changed files with 6 additions and 3 deletions

View File

@@ -19,8 +19,11 @@
static int tosa_init(struct uc_struct *uc, MachineState *machine)
{
//cpu_arm_init(uc, "pxa255");
uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-a15"); // FIXME
if (uc->mode & UC_MODE_MCLASS) {
uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-m3");
} else {
uc->cpu = (CPUState *)cpu_arm_init(uc, "cortex-a15");
}
return 0;
}