diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-05 13:56:22 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:43 +0200 |
commit | 800cf598f98db86da7b30359ae8b173a1efc1cea (patch) | |
tree | f5061a51074f10b4d4ecdf20131cf83923b606d8 /hw/mips_fulong2e.c | |
parent | f0f803669701a39e29f0daf62a729f7f3954a2a3 (diff) |
mips_fulong2e: Pass MIPSCPU to main_cpu_reset()
Allows us to use cpu_reset() in place of cpu_state_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/mips_fulong2e.c')
-rw-r--r-- | hw/mips_fulong2e.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index 08d3aa0eb8..38e4b86150 100644 --- a/hw/mips_fulong2e.c +++ b/hw/mips_fulong2e.c @@ -198,9 +198,10 @@ static void write_bootloader (CPUMIPSState *env, uint8_t *base, int64_t kernel_a static void main_cpu_reset(void *opaque) { - CPUMIPSState *env = opaque; + MIPSCPU *cpu = opaque; + CPUMIPSState *env = &cpu->env; - cpu_state_reset(env); + cpu_reset(CPU(cpu)); /* TODO: 2E reset stuff */ if (loaderparams.kernel_filename) { env->CP0_Status &= ~((1 << CP0St_BEV) | (1 << CP0St_ERL)); @@ -286,7 +287,7 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device, } env = &cpu->env; - qemu_register_reset(main_cpu_reset, env); + qemu_register_reset(main_cpu_reset, cpu); /* fulong 2e has 256M ram. */ ram_size = 256 * 1024 * 1024; |