summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-14 03:50:56 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-11 00:23:04 +0200
commit9077f01b45ee035b8789ba8b4bc469de165bde75 (patch)
tree073562fd2250c4b852723a372c52db3a45e58855 /hw
parent5d309320e3e419187b48b4537d403daf95835bc6 (diff)
downloadqemu-9077f01b45ee035b8789ba8b4bc469de165bde75.tar.gz
qemu-9077f01b45ee035b8789ba8b4bc469de165bde75.tar.bz2
qemu-9077f01b45ee035b8789ba8b4bc469de165bde75.zip
realview: Use cpu_arm_init() to obtain ARMCPU
Needed for arm_pic_init_cpu(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/realview.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/realview.c b/hw/realview.c
index ecf470179a..583993c3a7 100644
--- a/hw/realview.c
+++ b/hw/realview.c
@@ -50,7 +50,8 @@ static void realview_init(ram_addr_t ram_size,
const char *initrd_filename, const char *cpu_model,
enum realview_board_type board_type)
{
- CPUARMState *env = NULL;
+ ARMCPU *cpu = NULL;
+ CPUARMState *env;
MemoryRegion *sysmem = get_system_memory();
MemoryRegion *ram_lo = g_new(MemoryRegion, 1);
MemoryRegion *ram_hi = g_new(MemoryRegion, 1);
@@ -88,14 +89,15 @@ static void realview_init(ram_addr_t ram_size,
break;
}
for (n = 0; n < smp_cpus; n++) {
- env = cpu_init(cpu_model);
- if (!env) {
+ cpu = cpu_arm_init(cpu_model);
+ if (!cpu) {
fprintf(stderr, "Unable to find CPU definition\n");
exit(1);
}
- irqp = arm_pic_init_cpu(env);
+ irqp = arm_pic_init_cpu(&cpu->env);
cpu_irq[n] = irqp[ARM_PIC_CPU_IRQ];
}
+ env = &cpu->env;
if (arm_feature(env, ARM_FEATURE_V7)) {
if (is_mpcore) {
proc_id = 0x0c000000;