mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-07 22:30:58 +00:00
hw/tosa: Fix initialization of AArch32 CPUs
We have to ensure that we pass the proper formatted name into cpu_new()
This commit is contained in:
parent
c870339a10
commit
0ad97c7ee3
|
@ -21,12 +21,7 @@
|
||||||
|
|
||||||
static int tosa_init(struct uc_struct *uc, MachineState *machine)
|
static int tosa_init(struct uc_struct *uc, MachineState *machine)
|
||||||
{
|
{
|
||||||
if (uc->mode & UC_MODE_MCLASS) {
|
uc->cpu = cpu_create(uc, machine->cpu_type);
|
||||||
uc->cpu = cpu_create(uc, "cortex-m3");
|
|
||||||
} else {
|
|
||||||
uc->cpu = cpu_create(uc, "cortex-a15");
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +30,12 @@ static void tosa_machine_init(struct uc_struct *uc, MachineClass *mc)
|
||||||
mc->init = tosa_init;
|
mc->init = tosa_init;
|
||||||
mc->is_default = 1;
|
mc->is_default = 1;
|
||||||
mc->arch = UC_ARCH_ARM;
|
mc->arch = UC_ARCH_ARM;
|
||||||
|
|
||||||
|
if (uc->mode & UC_MODE_MCLASS) {
|
||||||
|
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
|
||||||
|
} else {
|
||||||
|
mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a15");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_MACHINE("tosa", tosa_machine_init)
|
DEFINE_MACHINE("tosa", tosa_machine_init)
|
||||||
|
|
Loading…
Reference in a new issue