From: Ian Campbell Subject: Re: [PATCH 04/12] arm: parse modules from DT during early boot. Date: Thu, 29 Nov 2012 17:13:54 +0000 Message-ID: <1354209234.6269.48.camel@zakaz.uk.xensource.com> References: <1352823779.7491.94.camel@zakaz.uk.xensource.com> <1352823804-28482-4-git-send-email-ian.campbell@citrix.com> <20121129170501.GF80627@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20121129170501.GF80627@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: Stefano Stabellini , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2012-11-29 at 17:05 +0000, Tim Deegan wrote: > > + cell = (const u32 *)prop->data; > > + device_tree_get_reg(&cell, address_cells, size_cells, > > + &mod->start, &size); > > This get_reg returns a start + size -- can/should we encode the module > as one of these rather than encdong start + end separately and > discarding the 'size' fields? Interesting thought, I'm not enough of a DTB guru to know what the right way to express this is (CCing Stefano :-)) This is trying to parse / { chosen { module@1 { start = 0x80000000; end = 0x2000; } } which is roughtly equivalent to how Linux bootloaders pass in initrds (although the name etc differ) I suspect using device_tree_get_reg as things stands is just plain wrong, since the above things are not actually regs. However you might be right that this should be expressed as / { chosen { module@1 { address = <0x80000000 0x2000>; } } and then I think using device_tree_get_reg would be correct. Stefano -- does that make sense? is "address = < ... >" allowed or does the thing have to be called reg? Ian.