diff options
author | Andreas Färber <afaerber@suse.de> | 2012-05-04 17:29:07 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-06-04 23:00:44 +0200 |
commit | 8f8204ecb7514a384f9e3776b16ef274ddf1e221 (patch) | |
tree | a38d1da02488406f8483c9090292844117e4eca6 /hw/ppc_newworld.c | |
parent | 90cb09d9d3c2fffc5722d091c059702e2cd089f5 (diff) | |
download | qemu-8f8204ecb7514a384f9e3776b16ef274ddf1e221.zip |
ppc_newworld: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for ppc_core99_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc_newworld.c')
-rw-r--r-- | hw/ppc_newworld.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c index 879651018b..6f7f1b5b6f 100644 --- a/hw/ppc_newworld.c +++ b/hw/ppc_newworld.c @@ -136,6 +136,7 @@ static void ppc_core99_init (ram_addr_t ram_size, const char *initrd_filename, const char *cpu_model) { + PowerPCCPU *cpu = NULL; CPUPPCState *env = NULL; char *filename; qemu_irq *pic, **openpic_irqs; @@ -166,11 +167,13 @@ static void ppc_core99_init (ram_addr_t ram_size, cpu_model = "G4"; #endif for (i = 0; i < smp_cpus; i++) { - env = cpu_init(cpu_model); - if (!env) { + cpu = cpu_ppc_init(cpu_model); + if (cpu == NULL) { fprintf(stderr, "Unable to find PowerPC CPU definition\n"); exit(1); } + env = &cpu->env; + /* Set time-base frequency to 100 Mhz */ cpu_ppc_tb_init(env, 100UL * 1000UL * 1000UL); qemu_register_reset(ppc_core99_reset, env); |