From: Ian Campbell Subject: Re: [PATCH v2 3/9] xen/arm: Reserve FDT via early module mechanism Date: Fri, 13 Sep 2013 14:08:41 +0100 Message-ID: <1379077721.19256.75.camel@kazak.uk.xensource.com> References: <1379072409.19256.40.camel@kazak.uk.xensource.com> <1379072437-28099-3-git-send-email-ian.campbell@citrix.com> <52330D45.6000000@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52330D45.6000000@linaro.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: Julien Grall Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, andre.przywara@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org > > ret = fdt_check_header(fdt); > > if ( ret < 0 ) > > early_panic("No valid device tree\n"); > > > > + mod = &early_info.modules.module[MOD_FDT]; > > + mod->start = paddr & PAGE_MASK; > > Why do we need to align the flat device tree and not the other modules > (ie: initramfs, kernel,...)? No reason, I just thought it might be a good idea when I wrote this. > I looked at the memory code and it seems to handle non-aligned module. In which case I'll drop the aligning. > > + mod->size = (fdt_totalsize(fdt) + ~PAGE_MASK) & PAGE_MASK; > > You can use PAGE_ALIGN(fdt_totalsize(fdt)). That's what I was searching for and failing to find! Of course I don't need it now. Ian.