target/arm: Use the any cpu model instead of cortex-a57

The Cortex-A57 doesn't allow use of v8.1+ architecture instructions
This commit is contained in:
Lioncash 2018-03-12 03:29:54 -04:00
parent b90333a531
commit 8e161bb723
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 5 additions and 5 deletions

View file

@ -64,7 +64,9 @@ static int machvirt_init(struct uc_struct *uc, MachineState *machine)
int n;
if (!cpu_model) {
cpu_model = "cortex-a57"; // ARM64
// Unicorn: "any" used instead to allow use of ARMv8.1+ instructions.
//cpu_model = "cortex-a57"; // ARM64
cpu_model = "any";
}
for (n = 0; n < smp_cpus; n++) {

View file

@ -188,7 +188,7 @@ static void aarch64_a53_initfn(struct uc_struct *uc, Object *obj, void *opaque)
define_arm_cp_regs(cpu, cortex_a57_a53_cp_reginfo);
}
#ifdef CONFIG_USER_ONLY
// Unicorn: enabled for the general use-case as well.
static void aarch64_any_initfn(struct uc_struct *uc, Object *obj, void *opaque)
{
ARMCPU *cpu = ARM_CPU(uc, obj);
@ -212,7 +212,6 @@ static void aarch64_any_initfn(struct uc_struct *uc, Object *obj, void *opaque)
cpu->ctr = 0x80038003; /* 32 byte I and D cacheline size, VIPT icache */
cpu->dcz_blocksize = 7; /* 512 bytes */
}
#endif
typedef struct ARMCPUInfo {
const char *name;
@ -223,9 +222,8 @@ typedef struct ARMCPUInfo {
static const ARMCPUInfo aarch64_cpus[] = {
{ "cortex-a57", aarch64_a57_initfn },
{ "cortex-a53", aarch64_a53_initfn },
#ifdef CONFIG_USER_ONLY
// Unicorn: enabled for the general use case as well
{ "any", aarch64_any_initfn },
#endif
{ NULL }
};