aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-04 17:45:09 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:44 +0200
commita9bf3df02114563902cd9aa585457f912434e3bc (patch)
treef35c76400f5844e80d8254fa78551d56e23d7320
parentcd79664f76cd3ddabef92f99eef82db376ab137d (diff)
downloadqemu-a9bf3df02114563902cd9aa585457f912434e3bc.zip
qemu-a9bf3df02114563902cd9aa585457f912434e3bc.tar.gz
qemu-a9bf3df02114563902cd9aa585457f912434e3bc.tar.bz2
ppc_prep: Use cpu_ppc_init() to obtain PowerPCCPU
Needed for ppc_prep_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Alexander Graf <agraf@suse.de>
-rw-r--r--hw/ppc_prep.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index b1da114..0b880a5 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -455,6 +455,7 @@ static void ppc_prep_init (ram_addr_t ram_size,
const char *cpu_model)
{
MemoryRegion *sysmem = get_system_memory();
+ PowerPCCPU *cpu = NULL;
CPUPPCState *env = NULL;
char *filename;
nvram_t nvram;
@@ -487,11 +488,13 @@ static void ppc_prep_init (ram_addr_t ram_size,
if (cpu_model == NULL)
cpu_model = "602";
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;
+
if (env->flags & POWERPC_FLAG_RTC_CLK) {
/* POWER / PowerPC 601 RTC clock frequency is 7.8125 MHz */
cpu_ppc_tb_init(env, 7812500UL);