qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH qom-next 08/22] strongarm: Use cpu_arm_init() to sto


From: Andreas Färber
Subject: [Qemu-devel] [PATCH qom-next 08/22] strongarm: Use cpu_arm_init() to store ARMCPU in StrongARMState
Date: Mon, 14 May 2012 19:31:55 +0200

Adapt collie accordingly.

Signed-off-by: Andreas Färber <address@hidden>
---
 hw/collie.c    |    2 +-
 hw/strongarm.c |    6 +++---
 hw/strongarm.h |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/collie.c b/hw/collie.c
index 42f4310..e6f8dbf 100644
--- a/hw/collie.c
+++ b/hw/collie.c
@@ -54,7 +54,7 @@ static void collie_init(ram_addr_t ram_size,
     collie_binfo.kernel_cmdline = kernel_cmdline;
     collie_binfo.initrd_filename = initrd_filename;
     collie_binfo.board_id = 0x208;
-    arm_load_kernel(s->env, &collie_binfo);
+    arm_load_kernel(&s->cpu->env, &collie_binfo);
 }
 
 static QEMUMachine collie_machine = {
diff --git a/hw/strongarm.c b/hw/strongarm.c
index 1b15f39..38b1d0c 100644
--- a/hw/strongarm.c
+++ b/hw/strongarm.c
@@ -1563,9 +1563,9 @@ StrongARMState *sa1110_init(MemoryRegion *sysmem,
         exit(1);
     }
 
-    s->env = cpu_init(rev);
+    s->cpu = cpu_arm_init(rev);
 
-    if (!s->env) {
+    if (!s->cpu) {
         error_report("Unable to find CPU definition");
         exit(1);
     }
@@ -1574,7 +1574,7 @@ StrongARMState *sa1110_init(MemoryRegion *sysmem,
     vmstate_register_ram_global(&s->sdram);
     memory_region_add_subregion(sysmem, SA_SDCS0, &s->sdram);
 
-    pic = arm_pic_init_cpu(s->env);
+    pic = arm_pic_init_cpu(&s->cpu->env);
     s->pic = sysbus_create_varargs("strongarm_pic", 0x90050000,
                     pic[ARM_PIC_CPU_IRQ], pic[ARM_PIC_CPU_FIQ], NULL);
 
diff --git a/hw/strongarm.h b/hw/strongarm.h
index 02acac3..d30dd6a 100644
--- a/hw/strongarm.h
+++ b/hw/strongarm.h
@@ -53,7 +53,7 @@ enum {
 };
 
 typedef struct {
-    CPUARMState *env;
+    ARMCPU *cpu;
     MemoryRegion sdram;
     DeviceState *pic;
     DeviceState *gpio;
-- 
1.7.7




reply via email to

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