diff options
author | Peter Maydell | 2012-04-20 09:39:15 +0200 |
---|---|---|
committer | Peter Maydell | 2012-04-27 13:06:18 +0200 |
commit | c5fad12fa08228d0c2f04089ba0cd27718f1b723 (patch) | |
tree | 11ae7d19c76bda0b22e0aed311546c5a0cd576e3 /hw/highbank.c | |
parent | target-arm: Change cpu_arm_init() return type to ARMCPU (diff) | |
download | qemu-c5fad12fa08228d0c2f04089ba0cd27718f1b723.tar.gz qemu-c5fad12fa08228d0c2f04089ba0cd27718f1b723.tar.xz qemu-c5fad12fa08228d0c2f04089ba0cd27718f1b723.zip |
target-arm: Move A9 config_base_address reset value to ARMCPU
Move the A9 config_base_address cp15 register reset value to
ARMCPU. This should become a QOM property so that the Highbank
board can set it without having to pull in cpu-qom.h, but at
least this avoids the implicit dependency on reset ordering
that the previous workaround had.
Cc: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/highbank.c')
-rw-r--r-- | hw/highbank.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/hw/highbank.c b/hw/highbank.c index 906eed5a47..4d6d728a28 100644 --- a/hw/highbank.c +++ b/hw/highbank.c @@ -35,12 +35,6 @@ #define NIRQ_GIC 160 /* Board init. */ -static void highbank_cpu_reset(void *opaque) -{ - CPUARMState *env = opaque; - - env->cp15.c15_config_base_address = GIC_BASE_ADDR; -} static void hb_write_secondary(CPUARMState *env, const struct arm_boot_info *info) { @@ -213,14 +207,17 @@ static void highbank_init(ram_addr_t ram_size, } for (n = 0; n < smp_cpus; n++) { - env = cpu_init(cpu_model); - if (!env) { + ARMCPU *cpu; + cpu = cpu_arm_init(cpu_model); + if (cpu == NULL) { fprintf(stderr, "Unable to find CPU definition\n"); exit(1); } + env = &cpu->env; + /* This will become a QOM property eventually */ + cpu->reset_cbar = GIC_BASE_ADDR; irqp = arm_pic_init_cpu(env); cpu_irq[n] = irqp[ARM_PIC_CPU_IRQ]; - qemu_register_reset(highbank_cpu_reset, env); } sysmem = get_system_memory(); |