summaryrefslogtreecommitdiffstats
path: root/hw/mips_r4k.c
diff options
context:
space:
mode:
authorAndreas Färber2012-05-05 14:21:43 +0200
committerAndreas Färber2012-06-04 23:00:43 +0200
commit9ac67e2168a6f1d801c6ca1dd856fe83552021d5 (patch)
tree304760957903db5260431fd156e35c5384166691 /hw/mips_r4k.c
parentmips_mipssim: Store MIPSCPU in ResetData (diff)
downloadqemu-9ac67e2168a6f1d801c6ca1dd856fe83552021d5.tar.gz
qemu-9ac67e2168a6f1d801c6ca1dd856fe83552021d5.tar.xz
qemu-9ac67e2168a6f1d801c6ca1dd856fe83552021d5.zip
mips_r4k: Use cpu_mips_init() to obtain MIPSCPU
Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/mips_r4k.c')
-rw-r--r--hw/mips_r4k.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c
index e2da49c09d..f89957c9ba 100644
--- a/hw/mips_r4k.c
+++ b/hw/mips_r4k.c
@@ -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;