aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-04 16:35:51 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:44 +0200
commit322164e0dba9eeb1264a923c9bfafd7663fba8aa (patch)
tree91aa5cc904c7fae88bcef1e29f09caf03ff81062 /hw
parent5b2038e04965a4126a31b7b71cc315efe50a9c8e (diff)
downloadqemu-322164e0dba9eeb1264a923c9bfafd7663fba8aa.zip
qemu-322164e0dba9eeb1264a923c9bfafd7663fba8aa.tar.gz
qemu-322164e0dba9eeb1264a923c9bfafd7663fba8aa.tar.bz2
ppc440_bamboo: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc440_bamboo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
index f0a3ae4..1a4e66a 100644
--- a/hw/ppc440_bamboo.c
+++ b/hw/ppc440_bamboo.c
@@ -172,6 +172,7 @@ static void bamboo_init(ram_addr_t ram_size,
qemu_irq *pic;
qemu_irq *irqs;
PCIBus *pcibus;
+ PowerPCCPU *cpu;
CPUPPCState *env;
uint64_t elf_entry;
uint64_t elf_lowaddr;
@@ -185,11 +186,12 @@ static void bamboo_init(ram_addr_t ram_size,
if (cpu_model == NULL) {
cpu_model = "440EP";
}
- env = cpu_init(cpu_model);
- if (!env) {
+ cpu = cpu_ppc_init(cpu_model);
+ if (cpu == NULL) {
fprintf(stderr, "Unable to initialize CPU!\n");
exit(1);
}
+ env = &cpu->env;
qemu_register_reset(main_cpu_reset, env);
ppc_booke_timers_init(env, 400000000, 0);