diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-05 14:23:25 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:43 +0200 |
commit | fa156e5127d367987289e90563cad4c4ca83a2d8 (patch) | |
tree | 456a1b9fc44c350c2f895dbf36daa31b10c93205 | |
parent | 9ac67e2168a6f1d801c6ca1dd856fe83552021d5 (diff) |
mips_r4k: Store MIPSCPU in ResetData
Allows us to use cpu_reset() in place of cpu_state_reset() in
main_cpu_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>
-rw-r--r-- | hw/mips_r4k.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c index f89957c9ba..d68599965a 100644 --- a/hw/mips_r4k.c +++ b/hw/mips_r4k.c @@ -65,7 +65,7 @@ static const MemoryRegionOps mips_qemu_ops = { }; typedef struct ResetData { - CPUMIPSState *env; + MIPSCPU *cpu; uint64_t vector; } ResetData; @@ -143,9 +143,9 @@ static int64_t load_kernel(void) static void main_cpu_reset(void *opaque) { ResetData *s = (ResetData *)opaque; - CPUMIPSState *env = s->env; + CPUMIPSState *env = &s->cpu->env; - cpu_state_reset(env); + cpu_reset(CPU(s->cpu)); env->active_tc.PC = s->vector; } @@ -188,7 +188,7 @@ void mips_r4k_init (ram_addr_t ram_size, env = &cpu->env; reset_info = g_malloc0(sizeof(ResetData)); - reset_info->env = env; + reset_info->cpu = cpu; reset_info->vector = env->active_tc.PC; qemu_register_reset(main_cpu_reset, reset_info); |