Skip to content

Commit

Permalink
mips_fulong2e: Pass MIPSCPU to main_cpu_reset()
Browse files Browse the repository at this point in the history
Allows us to use cpu_reset() in place of cpu_state_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
  • Loading branch information
afaerber committed May 9, 2012
1 parent d6d5565 commit b39270a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hw/mips_fulong2e.c
Expand Up @@ -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));
Expand Down Expand Up @@ -287,7 +288,7 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
env = &cpu->env;

register_savevm(NULL, "cpu", 0, 3, cpu_save, cpu_load, 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;
Expand Down

0 comments on commit b39270a

Please sign in to comment.