summary refs log tree commit diff stats
path: root/hw/sun4m.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-03 03:14:37 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-04 23:00:45 +0200
commit8968f588e3e42183a49802f1fa18af0f95cf5ba5 (patch)
tree1deeefe53c06544f6b252e9d53c1c335c8123293 /hw/sun4m.c
parente59be77a5b88510ceca87335ee9f241ded566ae2 (diff)
downloadfocaccia-qemu-8968f588e3e42183a49802f1fa18af0f95cf5ba5.tar.gz
focaccia-qemu-8968f588e3e42183a49802f1fa18af0f95cf5ba5.zip
sun4m: Use cpu_sparc_init() to obtain SPARCCPU
Needed for {main,secondary}_cpu_reset().

Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/sun4m.c')
-rw-r--r--hw/sun4m.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 34088ad185..c5d2e40527 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -809,13 +809,15 @@ static TypeInfo ram_info = {
 static void cpu_devinit(const char *cpu_model, unsigned int id,
                         uint64_t prom_addr, qemu_irq **cpu_irqs)
 {
+    SPARCCPU *cpu;
     CPUSPARCState *env;
 
-    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, id);
     if (id == 0) {