qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH for-next 13/74] leon3: Use cpu_sparc_init() to obtai


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

Needed for main_cpu_reset().

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

diff --git a/hw/leon3.c b/hw/leon3.c
index 0a5ff16..8ffef83 100644
--- a/hw/leon3.c
+++ b/hw/leon3.c
@@ -101,6 +101,7 @@ static void leon3_generic_hw_init(ram_addr_t  ram_size,
                                   const char *initrd_filename,
                                   const char *cpu_model)
 {
+    SPARCCPU *cpu;
     CPUSPARCState   *env;
     MemoryRegion *address_space_mem = get_system_memory();
     MemoryRegion *ram = g_new(MemoryRegion, 1);
@@ -117,11 +118,12 @@ static void leon3_generic_hw_init(ram_addr_t  ram_size,
         cpu_model = "LEON3";
     }
 
-    env = cpu_init(cpu_model);
-    if (!env) {
+    cpu = cpu_sparc_init(cpu_model);
+    if (cpu == NULL) {
         fprintf(stderr, "qemu: Unable to find Sparc CPU definition\n");
         exit(1);
     }
+    env = &cpu->env;
 
     cpu_sparc_set_id(env, 0);
 
-- 
1.7.7




reply via email to

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