From patchwork Fri Jan 20 18:25:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 137182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C62711007D3 for ; Sat, 21 Jan 2012 19:17:45 +1100 (EST) Received: from localhost ([::1]:58649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoW8t-0001ic-JS for incoming@patchwork.ozlabs.org; Sat, 21 Jan 2012 03:17:43 -0500 Received: from eggs.gnu.org ([140.186.70.92]:39527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoJ9f-000612-JD for qemu-devel@nongnu.org; Fri, 20 Jan 2012 13:25:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoJ9e-0005sy-Dk for qemu-devel@nongnu.org; Fri, 20 Jan 2012 13:25:39 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:46123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoJ9e-0005sY-98 for qemu-devel@nongnu.org; Fri, 20 Jan 2012 13:25:38 -0500 Received: by ghbg20 with SMTP id g20so499566ghb.4 for ; Fri, 20 Jan 2012 10:25:31 -0800 (PST) Received: by 10.101.174.7 with SMTP id b7mr14533143anp.23.1327083931864; Fri, 20 Jan 2012 10:25:31 -0800 (PST) Received: from localhost (S0106d8b37715ee14.cg.shawcable.net. [68.146.14.168]) by mx.google.com with ESMTPS id r1sm6473945yhh.14.2012.01.20.10.25.29 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Jan 2012 10:25:30 -0800 (PST) Received: by localhost (Postfix, from userid 1000) id 58B423E50B6; Fri, 20 Jan 2012 11:25:28 -0700 (MST) Date: Fri, 20 Jan 2012 11:25:28 -0700 From: Grant Likely To: Rob Herring Message-ID: <20120120182528.GU4223@ponder.secretlab.ca> References: <1326213943-878-1-git-send-email-mark.langsdorf@calxeda.com> <1327008660-16789-1-git-send-email-mark.langsdorf@calxeda.com> <1327008660-16789-5-git-send-email-mark.langsdorf@calxeda.com> <4F18A475.80009@calxeda.com> <4F197099.2020708@calxeda.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4F197099.2020708@calxeda.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.173 X-Mailman-Approved-At: Sat, 21 Jan 2012 03:17:32 -0500 Cc: Peter Maydell , Mark Langsdorf , i.mitsyanko@gmail.com, qemu-devel@nongnu.org, edgar.iglesias@gmail.com, afaerber@suse.de Subject: Re: [Qemu-devel] [PATCH v12 4/4] arm: SoC model for Calxeda Highbank X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Fri, Jan 20, 2012 at 07:48:09AM -0600, Rob Herring wrote: > On 01/20/2012 02:47 AM, Peter Maydell wrote: > > On 19 January 2012 23:17, Rob Herring wrote: > >> On 01/19/2012 03:44 PM, Peter Maydell wrote: > >>> On 19 January 2012 21:31, Mark Langsdorf wrote: > >>>> + highbank_binfo.board_id = 0xEC10100f; /* provided by deviceTree */ > >>> > >>> Where does this number come from? It's not in > >>> http://www.arm.linux.org.uk/developer/machines/ > >>> > >>> Is 3027 (==0xbd3) you? > >>> http://www.arm.linux.org.uk/developer/machines/list.php?id=3027 > >>> > >> > >> Much of the data there is wrong as none of it is used. 0 or -1 is the > >> right value as those are obviously meaningless. A highbank kernel will > >> never be booted without devicetree and in that case this number is > >> irrelevant. This is the legacy boot interface and qemu really needs to > >> learn to boot with a separate dtb. > > > > Yeah, but the documentation even for DTB boot says we should pass > > in a machine number. If 0 or -1 are right then there should be > > some documentation that says so. I'll accept "mailing list post > > from some authoritative person [eg Grant Likely]" if necessary. > > Kernel DT co-maintainer is not authoritative enough for you? > > The documentation needs some clarification. > > > But this is an ABI between boot loaders and the kernel so I don't > > want to just have something random that happens to work. (And in > > particular if -1 is the officially sanctioned number then we need > > to fix arm_boot to be able to pass values >16 bits wide.) > > I've got a patch that fixes arm_boot. I'll send it separately. How about this patch for the kernel: g. diff --git a/Documentation/arm/Booting b/Documentation/arm/Booting index a341d87..72b064d 100644 --- a/Documentation/arm/Booting +++ b/Documentation/arm/Booting @@ -148,7 +148,9 @@ In either case, the following conditions must be met: - CPU register settings r0 = 0, - r1 = machine type number discovered in (3) above. + r1 = machine type number discovered in (3) above, or if booting with + a dtb then this may be set to ~0 if a valid MACH_TYPE_xxx value + does not exist for the machine. r2 = physical address of tagged list in system RAM, or physical address of device tree block (dtb) in system RAM diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt index 7c1329d..33e2b51 100644 --- a/Documentation/devicetree/booting-without-of.txt +++ b/Documentation/devicetree/booting-without-of.txt @@ -176,7 +176,8 @@ it with special cases. r1 : Valid machine type number. When using a device tree, a single machine type number will often be assigned to - represent a class or family of SoCs. + represent a class or family of SoCs. If a valid machine + type number is not assigned, then use ~0. r2 : physical pointer to the device-tree block (defined in chapter II) in RAM. Device tree can be located