diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-04 19:26:57 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:41 +0200 |
commit | 06d26274cdd2f3ce79ba91dbf2dd0f535cbabd3c (patch) | |
tree | 56357f947fd694a993d43e6210c49054595a5fb7 /hw/xtensa_sim.c | |
parent | 15be3171392a14cb90abd89ac7310681556f736e (diff) | |
download | qemu-06d26274cdd2f3ce79ba91dbf2dd0f535cbabd3c.zip qemu-06d26274cdd2f3ce79ba91dbf2dd0f535cbabd3c.tar.gz qemu-06d26274cdd2f3ce79ba91dbf2dd0f535cbabd3c.tar.bz2 |
xtensa_sim: Use cpu_xtensa_init() to obtain XtensaCPU
Needed for sim_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'hw/xtensa_sim.c')
-rw-r--r-- | hw/xtensa_sim.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/xtensa_sim.c b/hw/xtensa_sim.c index c7e05dc..dae08a1 100644 --- a/hw/xtensa_sim.c +++ b/hw/xtensa_sim.c @@ -47,16 +47,19 @@ static void sim_init(ram_addr_t ram_size, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) { + XtensaCPU *cpu = NULL; CPUXtensaState *env = NULL; MemoryRegion *ram, *rom; int n; for (n = 0; n < smp_cpus; n++) { - env = cpu_init(cpu_model); - if (!env) { + cpu = cpu_xtensa_init(cpu_model); + if (cpu == NULL) { fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } + env = &cpu->env; + env->sregs[PRID] = n; qemu_register_reset(sim_reset, env); /* Need MMU initialized prior to ELF loading, |