All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fu Wei <fu.wei@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org,
	julien.grall@linaro.org, xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: arm: setup sane EL1 state while building domain 0.
Date: Tue, 18 Mar 2014 20:37:41 +0800	[thread overview]
Message-ID: <53283E15.4040709@linaro.org> (raw)
In-Reply-To: <1395135665.12847.5.camel@kazak.uk.xensource.com>

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 <fu.wei@linaro.org>
>>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>>> Cc: Fu Wei <fu.wei@linaro.org>
>>> ---
>>> 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 

      parent reply	other threads:[~2014-03-18 12:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 15:31 [PATCH] xen: arm: setup sane EL1 state while building domain 0 Ian Campbell
2014-03-17 15:37 ` Julien Grall
2014-03-17 15:46   ` Ian Campbell
2014-03-17 15:50     ` Julien Grall
2014-03-18  3:22 ` Fu Wei
2014-03-18  9:41   ` Ian Campbell
2014-03-18 12:16     ` Julien Grall
2014-03-18 12:37     ` Fu Wei [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53283E15.4040709@linaro.org \
    --to=fu.wei@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.