From: Tim Deegan Subject: Re: [PATCH 4/7] arm: map device tree blob in initial page tables Date: Tue, 7 Feb 2012 09:28:32 +0000 Message-ID: <20120207092832.GB49952@ocelot.phlegethon.org> References: <1328296515-25876-1-git-send-email-david.vrabel@citrix.com> <1328296515-25876-5-git-send-email-david.vrabel@citrix.com> <20120203211836.GD78380@ocelot.phlegethon.org> <4F300F93.3020404@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4F300F93.3020404@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: David Vrabel Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org At 17:36 +0000 on 06 Feb (1328549779), David Vrabel wrote: > That was already used in setup_pagetables() to relocate Xen but since > the two uses don't overlap they can share the same slot. Not 100% sure > on the TLB flush after updating the L2 PTE -- it makes it work but is it > sufficient/optimal? Hrmn. Yes, I think that's sufficient. You should be able to use flush_xen_data_tlb_va() to just flush that one entry, AFAICS. > --- a/xen/arch/arm/head.S > +++ b/xen/arch/arm/head.S > @@ -201,6 +201,13 @@ hyp: > add r4, r4, #8 > strd r2, r3, [r1, r4] /* Map it in the fixmap's slot */ > #endif > + mov r3, #0x0 > + lsr r2, r8, #21 > + lsl r2, r2, #21 /* 2MB-aligned paddr of DTB */ > + orr r2, r2, #0xf00 > + orr r2, r2, #0x07d /* r2:r3 := 2MB RAM incl. DTB */ > + add r4, r4, #8 > + strd r2, r3, [r1, r4] /* Map it in the early boot slot */ That's good, but you should move the previous "add r4, r4, #8" out of the #ifdef. :) Tim.