From patchwork Tue Feb 15 13:12:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Lackorzynski X-Patchwork-Id: 83242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D39D6B711C for ; Wed, 16 Feb 2011 00:13:59 +1100 (EST) Received: from localhost ([127.0.0.1]:44678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpKiZ-0004KE-7l for incoming@patchwork.ozlabs.org; Tue, 15 Feb 2011 08:13:23 -0500 Received: from [140.186.70.92] (port=54262 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpKi4-0004Jz-Be for qemu-devel@nongnu.org; Tue, 15 Feb 2011 08:12:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpKi2-0006Ps-OT for qemu-devel@nongnu.org; Tue, 15 Feb 2011 08:12:52 -0500 Received: from os.inf.tu-dresden.de ([141.76.48.99]:41217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpKi2-0006Pc-IA for qemu-devel@nongnu.org; Tue, 15 Feb 2011 08:12:50 -0500 Received: from erwin.inf.tu-dresden.de ([141.76.48.80] helo=os.inf.tu-dresden.de) by os.inf.tu-dresden.de with esmtps (TLSv1:AES128-SHA:128) (Exim 4.74) id 1PpKi0-00083M-NH; Tue, 15 Feb 2011 14:12:48 +0100 Date: Tue, 15 Feb 2011 14:12:45 +0100 From: Adam Lackorzynski To: Peter Maydell Subject: Re: [Qemu-devel] [PATCH 1/3] target-arm: Setup smpboot code in all setups Message-ID: <20110215131245.GE19666@os.inf.tu-dresden.de> References: <20110215104852.GB19666@os.inf.tu-dresden.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 141.76.48.99 Cc: qemu-devel@nongnu.org X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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. */