From: Ian Campbell Subject: Re: [PATCH] xen: arm: load FDT below 0.5G Date: Tue, 30 Jul 2013 10:57:44 +0100 Message-ID: <1375178264.11701.83.camel@kazak.uk.xensource.com> References: <1374599528-4250-1-git-send-email-ijc@hellion.org.uk> <51EFDA28.6050301@linaro.org> <1374676670.6623.180.camel@hastur.hellion.org.uk> <1375109161.12741.15.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: "xen-devel@lists.xen.org" , tim@xen.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2013-07-30 at 10:53 +0100, Julien Grall wrote: > On 29 July 2013 15:46, Ian Campbell wrote: > > On Wed, 2013-07-24 at 15:37 +0100, Ian Campbell wrote: > >> BTW I asked for confirmation on linux-arm-kernel but I don't see that in > >> my l-a-k folder or the archives -- did you get the copy I CCd to you? > >> Subject is "Requirements for FDT load address on ARM". > > > > There was some discussion on L-A-K and I think we know what to do, see > > http://thread.gmane.org/gmane.linux.ports.arm.kernel/254538 and > > http://thread.gmane.org/gmane.linux.ports.arm.kernel/255716 > > > > The updated patch would look like the below (although I may try and > > combine place+check_overlap+load into a single function, which tries a > > bit harder to find a good address by looping until overlap == false). > > Do you plan to support position-dependent DOM0 kernel? If no, as the > kernel will be relocated to the same address, I don't think we need to > automatically find the DTB base address. What do you mean? Even if the kernel is not PIC it will still have to decompress itself somewhere and things move around in RAM etc and potentially clobber the DTB. But anyway, yes we should be supporting PIC kernel, in fact I have a suspicion we only support PIC kernels... > > commit 176dafbc2f916f369450e647a33806c13270be15 > > Author: Ian Campbell > > Date: Tue Jul 23 06:05:29 2013 +0100 > > > > xen: arm: load FDT at correct address > > > > The 64-bit Documentation/arm64/booting.txt requires that the FDT be below > > 512MiB. On 32-bit things are less clear but discussion at > > http://thread.gmane.org/gmane.linux.ports.arm.kernel/254538 suggests that > > below 256MiB should be good. I've submitted a patch to > > Documentation/arm/Booting to cover this. > > > > Also note that 64-bit requires 2MiB alignment for the FDT. We already do this > > but update the comment. > > > > Locating the fdt needs to be called after prepare_kernel so we know which sort > > of kernel it is, so split out into a separate "place_fdt". > > > > Signed-off-by: Ian Campbell > Acked-by: Julien Grall Thanks, I'm not totally sure this will be the final form but if it doesn't change too much I will keep this.