From 48d98a76e70438bef6d970723d12e5e31000bd1a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 3 Sep 2018 17:40:06 -0400 Subject: [PATCH] hw/mips/mips_r4k: Fix initialization of MIPS target CPUs MIPS emulation is now possible after this basic fix. Still a few kinks to work out, but at least we hit the translation loop. --- qemu/hw/mips/mips_r4k.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/qemu/hw/mips/mips_r4k.c b/qemu/hw/mips/mips_r4k.c index 267f0e81..a63aa9ef 100644 --- a/qemu/hw/mips/mips_r4k.c +++ b/qemu/hw/mips/mips_r4k.c @@ -22,17 +22,10 @@ #include "hw/boards.h" #include "exec/address-spaces.h" - static int mips_r4k_init(struct uc_struct *uc, MachineState *machine) { -#ifdef TARGET_MIPS64 - const char *cpu_model = MIPS_CPU_TYPE_NAME("R4000"); -#else - const char *cpu_model = MIPS_CPU_TYPE_NAME("24Kf"); -#endif - const char *cpu_type = parse_cpu_model(uc, cpu_model); + uc->cpu = cpu_create(uc, machine->cpu_type); - uc->cpu = cpu_create(uc, cpu_type); if (uc->cpu == NULL) { fprintf(stderr, "Unable to find CPU definition\n"); return -1;