qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for-next 25/74] ppc_oldworld: Use cpu_ppc_init() to


From: Andreas Färber
Subject: [Qemu-devel] [PATCH for-next 25/74] ppc_oldworld: Use cpu_ppc_init() to obtain PowerPCCPU
Date: Sun, 6 May 2012 17:34:25 +0200

Needed for ppc_heathrow_reset().

Signed-off-by: Andreas Färber <address@hidden>
---
 hw/ppc_oldworld.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index 7e73d37..ba8f3ad 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -80,6 +80,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
                                const char *cpu_model)
 {
     MemoryRegion *sysmem = get_system_memory();
+    PowerPCCPU *cpu = NULL;
     CPUPPCState *env = NULL;
     char *filename;
     qemu_irq *pic, **heathrow_irqs;
@@ -104,11 +105,13 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
     if (cpu_model == NULL)
         cpu_model = "G3";
     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 16.6 Mhz */
         cpu_ppc_tb_init(env,  16600000UL);
         qemu_register_reset(ppc_heathrow_reset, env);
-- 
1.7.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]