public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] sunxi: Set the AUXCR L2EN bit for sun4i/sun5i in FEL boot mode
Date: Fri, 25 Jul 2014 07:55:28 +0100	[thread overview]
Message-ID: <1406271328.29480.41.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <20140725032103.089c88e8@i7>

On Fri, 2014-07-25 at 03:21 +0300, Siarhei Siamashka wrote:
> On Mon, 21 Jul 2014 21:59:51 +0100
> Ian Campbell <ijc@hellion.org.uk> wrote:
> 
> > On Mon, 2014-07-21 at 22:39 +0200, Jeroen Hofstee wrote:
> > > Hello Ian,
> > > 
> > > On 21-07-14 22:07, Ian Campbell wrote:
> > > > On Fri, 2014-07-18 at 20:47 +0200, Jeroen Hofstee wrote:
> > > >> Hello Siarhei,
> > > >>
> > > >> On 18-07-14 19:09, Siarhei Siamashka wrote:
> > > >>> This is needed to have feature parity with the normal boot mode,
> > > >>> where the L2EN bit in the CP15 Auxiliary Control Register is set
> > > >>> by the BROM code right from the start.
> > > >>>
> > > >>> If this is not done, the Linux system ends up booted with the L2 cache
> > > >>> disabled.
> > > >>>
> > > >> I don't know a single about the sunxi, but shouldn't linux
> > > >> be patched instead. The commit message seems to indicate
> > > >> it is not an u-boot issue.
> > > > The ACTLR may not be writeable from NS mode so it has to be setup in the
> > > > bootloader before dropping to NS mode.
> > > mmm, I guess there is something wrong with the boot sequence
> > > if the kernel itself can't access raw hw.
> > 
> > Do you know what ARM Secure and Non-Secure worlds are?
> > 
> > The kernel expects to be launched in NS mode and simply cannot access
> > this register. This is a feature not a bug.
> 
> Just curious. Is there a modern consensus about how this all is
> supposed to be done nowadays?

The kernel's Booting.txt strongly encourages you to enter in HYP mode if
it is available, which implies NS mode.

This a basic requirement to use virtualisation (Xen or KVM etc).

I believe that the general consensus is to run in NS mode on newer
platforms by default.

FWIW on v8 arm64 Linux documentation requires NS mode.

> The last time I read anything about this subject was the following
> longish and already old discussion thread (which has probably
> already lost relevance):
>     http://lists.linaro.org/pipermail/boot-architecture/2011-August/000060.html
> 
> Since the Allwinner BROM does not forcefully drop us to the non-secure
> mode, we have the absolute freedom of choice and may implement any
> policy.

We do, and we should implement PSCI and NS boot for kernels.

Ian.

  reply	other threads:[~2014-07-25  6:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-18 17:09 [U-Boot] [PATCH 0/2] sunxi: FEL boot mode improvements Siarhei Siamashka
2014-07-18 17:09 ` [U-Boot] [PATCH 1/2] sunxi: Use Thumb2 and move stack to gain more SRAM space in FEL mode Siarhei Siamashka
2014-07-19 11:19   ` Hans de Goede
2014-07-21 18:31   ` Ian Campbell
2014-07-25  1:01     ` Siarhei Siamashka
2014-07-25  1:03       ` [U-Boot] [linux-sunxi] " Julian Calaby
2014-07-25  4:11         ` Julian Calaby
2014-07-25  6:56       ` [U-Boot] " Ian Campbell
2014-07-25  1:14   ` Siarhei Siamashka
2014-07-18 17:09 ` [U-Boot] [PATCH 2/2] sunxi: Set the AUXCR L2EN bit for sun4i/sun5i in FEL boot mode Siarhei Siamashka
2014-07-18 18:47   ` Jeroen Hofstee
2014-07-21 20:07     ` Ian Campbell
2014-07-21 20:39       ` Jeroen Hofstee
2014-07-21 20:59         ` Ian Campbell
2014-07-25  0:21           ` Siarhei Siamashka
2014-07-25  6:55             ` Ian Campbell [this message]
2014-07-19 11:20   ` Hans de Goede
2014-07-21 18:39     ` Ian Campbell
2014-07-21 20:34       ` Ian Campbell

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=1406271328.29480.41.camel@dagon.hellion.org.uk \
    --to=ijc@hellion.org.uk \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox