From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fu Wei Subject: Re: [PATCH] xen: arm: setup sane EL1 state while building domain 0. Date: Tue, 18 Mar 2014 20:37:41 +0800 Message-ID: <53283E15.4040709@linaro.org> References: <1395070269-32356-1-git-send-email-ian.campbell@citrix.com> <5327BC08.9050003@linaro.org> <1395135665.12847.5.camel@kazak.uk.xensource.com> Reply-To: Fu Wei Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1395135665.12847.5.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: Ian Campbell Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, julien.grall@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 03/18/2014 05:41 PM, Ian Campbell wrote: > On Tue, 2014-03-18 at 11:22 +0800, Fu Wei wrote: >> On 03/17/2014 11:31 PM, Ian Campbell wrote: >>> The address translation functions used while building dom0 rely on certain EL1 >>> state being configured. In particular they are subject to the behaviour of >>> SCTLR_EL1.M (stage 1 MMU enabled). >>> >>> The Xen (and Linux) boot protocol require that the kernel be entered with the >>> MMU disabled but they don't say anything explicitly about exception levels >>> other than the one which is active when entering the kernels. Arguably the >>> protocol could be said to apply to all exception levels but in any case we >>> should cope with this and setup the EL1 state as necessary. >>> >>> Fu Wei discovered this when booting Xen from grub.efi over UEFI, it's not >>> clear whether grub or UEFI is responsible for leaving stage 1 MMU enabled. >>> >>> Reported-by: Fu Wei >>> Signed-off-by: Ian Campbell >>> Cc: Fu Wei >>> --- >>> Fu Wei, can I add your Tested-by here? >> >> Yes, Thanks! >> I have tested this with my GRUB binary, it works fine. > > Great. Thanks. It looks like we might rework the approach, if so I'll CC > you on that as well (or Julien will). > > Are you also going to change grub to leave EL1 in a known good state? I don't think it's the work of grub to modify EL1 register. if the booting.txt(xen or linux) doesn't mention about EL1, I think the kernel(xen or linux) should take care of these EL1 registers. And at the time, xen has booted up, it can modify EL1 registers. Do you agree? :-) > > Ian. > > -- Best regards, Fu Wei LAVA Engineer From Red Hat LAVA Team Linaro.org | Open source software for ARM SoCs Ph: +86 186 2020 4684 (mobile) IRC: fuwei Skype: tekkamanninja Room 1512, Regus One Corporate Avenue,Level 15, One Corporate Avenue,222 Hubin Road,Huangpu District, Shanghai,China 200021