diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-05 14:17:49 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:43 +0200 |
commit | 7ee274c1937deccfaaa0c98389349eb3e9a6c90d (patch) | |
tree | 7715a527b507e916c4d91ddedb43882f23d2f56f /hw/mips_mipssim.c | |
parent | 1004ee8d26ea8584be26cce0212cec68d5d93117 (diff) |
mips_mipssim: 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_mipssim.c')
-rw-r--r-- | hw/mips_mipssim.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c index 1ea7b58323..7c510da2b2 100644 --- a/hw/mips_mipssim.c +++ b/hw/mips_mipssim.c @@ -140,6 +140,7 @@ mips_mipssim_init (ram_addr_t ram_size, MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); MemoryRegion *bios = g_new(MemoryRegion, 1); + MIPSCPU *cpu; CPUMIPSState *env; ResetData *reset_info; int bios_size; @@ -152,11 +153,13 @@ mips_mipssim_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; |