]> Git Repo - qemu.git/commitdiff
leon3: Use cpu_sparc_init() to obtain SPARCCPU
authorAndreas Färber <[email protected]>
Fri, 4 May 2012 00:33:34 +0000 (02:33 +0200)
committerAndreas Färber <[email protected]>
Mon, 4 Jun 2012 21:00:45 +0000 (23:00 +0200)
Needed for main_cpu_reset().

Signed-off-by: Andreas Färber <[email protected]>
Acked-by: Blue Swirl <[email protected]>
hw/leon3.c

index 0a5ff165a19a2920b9cb577a81d5fc43062db745..8ffef835954951cb15ce717a04d01e1c68a6a05d 100644 (file)
@@ -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);
 
This page took 0.02734 seconds and 4 git commands to generate.