diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-04 18:40:14 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:43 +0200 |
commit | 868bac81d76b6149b246731945de426aee6448be (patch) | |
tree | 28b0a6841558076c81556cde36606c7f26320f66 | |
parent | fd2f410b375a3813b827633c79c2c45ab9e7089a (diff) | |
download | hqemu-868bac81d76b6149b246731945de426aee6448be.zip hqemu-868bac81d76b6149b246731945de426aee6448be.tar.gz |
r2d: Store SuperHCPU 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/r2d.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -192,16 +192,16 @@ static qemu_irq *r2d_fpga_init(MemoryRegion *sysmem, } typedef struct ResetData { - CPUSH4State *env; + SuperHCPU *cpu; uint32_t vector; } ResetData; static void main_cpu_reset(void *opaque) { ResetData *s = (ResetData *)opaque; - CPUSH4State *env = s->env; + CPUSH4State *env = &s->cpu->env; - cpu_state_reset(env); + cpu_reset(CPU(s->cpu)); env->pc = s->vector; } @@ -248,7 +248,7 @@ static void r2d_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->pc; qemu_register_reset(main_cpu_reset, reset_info); |