From patchwork Tue Feb 15 13:12:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/3] target-arm: Setup smpboot code in all setups Date: Tue, 15 Feb 2011 03:12:45 -0000 From: Adam Lackorzynski X-Patchwork-Id: 83242 Message-Id: <20110215131245.GE19666@os.inf.tu-dresden.de> To: Peter Maydell Cc: qemu-devel@nongnu.org On Tue Feb 15, 2011 at 13:01:08 +0000, Peter Maydell wrote: > On 15 February 2011 10:48, Adam Lackorzynski wrote: > > Make smpboot available not only for Linux but for all setups. > > I'm not convinced about this. I think if you're providing a raw > image for an SMP system (rather than a Linux kernel) then it's > your job to provide an image which handles the bootup of the > secondary CPUs, the same way it would be if you were providing > a ROM image for real hardware. Ok, this is one possibility. Another one would be something like this: Subject: [PATCH] target-arm: Provide entry vector for non-linux systems Non-Linux systems must provide their own code for secondary CPU boot-up. We use the same entry point as on the first CPU. Signed-off-by: Adam Lackorzynski --- hw/realview.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/hw/realview.c b/hw/realview.c index 6eb6c6a..574bc11 100644 --- a/hw/realview.c +++ b/hw/realview.c @@ -112,7 +112,11 @@ static void secondary_cpu_reset(void *opaque) /* 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] = SMP_BOOT_ADDR; + if (realview_binfo.is_linux) { + env->regs[15] = SMP_BOOT_ADDR; + } else { + env->regs[15] = realview_binfo.entry; + } } /* The following two lists must be consistent. */