diff options
author | Paul Brook <paul@codesourcery.com> | 2009-11-11 19:59:29 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-11-11 19:59:29 +0000 |
commit | be0f204aa0d8743f0627cd3cffb0ffc5bbf962e9 (patch) | |
tree | 78f9e202cea9d82873866424040a663537626665 /hw/realview.c | |
parent | 97fe84f5efbd4f3ded433b7da5daca1f8fd5a82f (diff) |
Fix ARM MCore secondary cpu boot
Make MPCore secondary cpu initialization work with the new reset
handling. Also change the inital FLAG value from 3 to zero to match
recent kenrels.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/realview.c')
-rw-r--r-- | hw/realview.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/hw/realview.c b/hw/realview.c index c494a20c88..95ad727d43 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -24,6 +24,17 @@ static struct arm_boot_info realview_binfo = { .board_id = 0x33b, }; +static void secondary_cpu_reset(void *opaque) +{ + CPUState *env = opaque; + + cpu_reset(env); + /* Set entry point for secondary CPUs. This assumes we're using + the init code from arm_boot.c. Real hardware resets all CPUs + the same. */ + env->regs[15] = 0x80000000; +} + static void realview_init(ram_addr_t ram_size, const char *boot_device, const char *kernel_filename, const char *kernel_cmdline, @@ -59,10 +70,7 @@ static void realview_init(ram_addr_t ram_size, irqp = arm_pic_init_cpu(env); cpu_irq[n] = irqp[ARM_PIC_CPU_IRQ]; if (n > 0) { - /* Set entry point for secondary CPUs. This assumes we're using - the init code from arm_boot.c. Real hardware resets all CPUs - the same. */ - env->regs[15] = 0x80000000; + qemu_register_reset(secondary_cpu_reset, env); } } |