]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen.git/commitdiff
mips_r4k: Use cpu_mips_init() to obtain MIPSCPU
authorAndreas Färber <afaerber@suse.de>
Sat, 5 May 2012 12:21:43 +0000 (14:21 +0200)
committerAndreas Färber <afaerber@suse.de>
Mon, 4 Jun 2012 21:00:43 +0000 (23:00 +0200)
Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
hw/mips_r4k.c

index e2da49c09d739d4500e1c35d4b06c4b91b081e7b..f89957c9ba88337e7a9e705ace51957f174d7caa 100644 (file)
@@ -162,6 +162,7 @@ void mips_r4k_init (ram_addr_t ram_size,
     MemoryRegion *bios;
     MemoryRegion *iomem = g_new(MemoryRegion, 1);
     int bios_size;
+    MIPSCPU *cpu;
     CPUMIPSState *env;
     ResetData *reset_info;
     int i;
@@ -179,11 +180,13 @@ void mips_r4k_init (ram_addr_t ram_size,
         cpu_model = "24Kf";
 #endif
     }
-    env = cpu_init(cpu_model);
-    if (!env) {
+    cpu = cpu_mips_init(cpu_model);
+    if (cpu == NULL) {
         fprintf(stderr, "Unable to find CPU definition\n");
         exit(1);
     }
+    env = &cpu->env;
+
     reset_info = g_malloc0(sizeof(ResetData));
     reset_info->env = env;
     reset_info->vector = env->active_tc.PC;