diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-04 19:28:19 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:41 +0200 |
commit | 11e7bfd7e04346f3acd77150ac82784f58bbe89f (patch) | |
tree | 24353499645bf105a6ad9f2b743d0a59db21bcc1 | |
parent | 06d26274cdd2f3ce79ba91dbf2dd0f535cbabd3c (diff) | |
download | qemu-11e7bfd7e04346f3acd77150ac82784f58bbe89f.zip qemu-11e7bfd7e04346f3acd77150ac82784f58bbe89f.tar.gz qemu-11e7bfd7e04346f3acd77150ac82784f58bbe89f.tar.bz2 |
xtensa_sim: Pass XtensaCPU to sim_reset()
Allows us to use cpu_reset() in place of cpu_state_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
-rw-r--r-- | hw/xtensa_sim.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/xtensa_sim.c b/hw/xtensa_sim.c index dae08a1..1ce07fb 100644 --- a/hw/xtensa_sim.c +++ b/hw/xtensa_sim.c @@ -37,9 +37,11 @@ static uint64_t translate_phys_addr(void *env, uint64_t addr) return cpu_get_phys_page_debug(env, addr); } -static void sim_reset(void *env) +static void sim_reset(void *opaque) { - cpu_state_reset(env); + XtensaCPU *cpu = opaque; + + cpu_reset(CPU(cpu)); } static void sim_init(ram_addr_t ram_size, @@ -61,11 +63,11 @@ static void sim_init(ram_addr_t ram_size, env = &cpu->env; env->sregs[PRID] = n; - qemu_register_reset(sim_reset, env); + qemu_register_reset(sim_reset, cpu); /* Need MMU initialized prior to ELF loading, * so that ELF gets loaded into virtual addresses */ - sim_reset(env); + sim_reset(cpu); } ram = g_malloc(sizeof(*ram)); |