From: Ian Campbell Subject: Re: [PATCH 0/5] xen: arm: fixups for systems with RAM above 4GB Date: Thu, 10 Oct 2013 09:40:56 +0100 Message-ID: <1381394456.7600.41.camel@kazak.uk.xensource.com> References: <1381145870.21562.93.camel@kazak.uk.xensource.com> <1381146193.21562.97.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: <1381146193.21562.97.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Tim Deegan , julien Grall , Stefano Stabellini , Anup Patel List-Id: xen-devel@lists.xenproject.org On Mon, 2013-10-07 at 12:43 +0100, Ian Campbell wrote: > On Mon, 2013-10-07 at 12:37 +0100, Ian Campbell wrote: > > I've been testing this with a hack DTB which uses only the AEM > > fastmodel's 36-bit alias of DRAM and a hacked up boot-wrapper to load > > at the appropriate addresses etc. > > I forgot to say that this currently gets as far as loading the dom0 > kernel before it fails because the "at s12el1r" instruction used by > gva_to_ma_par (and therefore copy_to_user) is failing. > > This appears to be because it is truncating the high address given as > input to 32-bits as part of the stage 1 translation, and so the stage 2 > translation fails because the input IPA is invalid. > > I have reported this as a potential model bug because stage 1 > translation is not enabled (SCTLR_EL1.M == 0) and therefore IPA<0:47> is > supposed to be equal to VA<0:47>. ARM support very kindly pointed out that HCR_EL2.RW (register-width bit) was configured for a 32-bit EL1, hence the truncation. Setting the bit correctly for a 64-bit EL1 appears to fix this issue, I just need to decide the cleanest way to do it properly. Ian.