linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: pdeschrijver@nvidia.com (Peter De Schrijver)
To: linux-arm-kernel@lists.infradead.org
Subject: Multi-platform, and secure-only ARM errata workarounds
Date: Tue, 5 Mar 2013 09:40:47 +0200	[thread overview]
Message-ID: <20130305074047.GH27241@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <5134D50B.8060001@wwwdotorg.org>

On Mon, Mar 04, 2013 at 06:08:27PM +0100, Stephen Warren wrote:
> On 03/04/2013 02:16 AM, Peter De Schrijver wrote:
> > On Mon, Mar 04, 2013 at 07:34:36AM +0100, Peter De Schrijver wrote:
> >> On Fri, Mar 01, 2013 at 06:37:27PM +0100, Stephen Warren wrote:
> >>

...

> > 1) Handle CPU0 errata WARs in the bootloader
> 
> OK - there's not much choice here, and I've posted a patch for this for
> Tegra U-Boot already.
> 
> > 2) Indicate in device tree if linux is booting in secude mode or non-secure
> >    mode.
> > 3) Use this information in the kernel to decide how to apply the WARs for
> >    secondary core bringup and after powerungating.
> 
> Hmmm. That seems like a lot of overhead to avoid duplicating roughly 8
> assembly instructions per Tegra version. Also, some/all of the WARs in

Unfortunately we can't write to the diag register if we are in non-secure
mode. So unless we never want to support running in non-secure mode, we will
need to make the distinction somehow and use a different method for non-secure
mode. Or assume the secure OS has applied the WARs. I'm afraid existing secure
OS implementations for Tegra don't work that way though. They just offer an
SMC which allows the kernel to read and write the diag register.

> question probably need to be applied very early by assembly code, e.g.
> before MMU is re-enabled, so I think you'd end up parsing DT from
> assembly again, which would be painful. I tend to think just including
> the code in the kernel's SoC-specific reset handler is simplest, and
> even with the slight duplication, probably most maintainable. I've
> written a patch for this for Tegra already, which I hope to post later
> today, depending on testing and what other stuff I get side-tracked on.

No. We could just set a flag in __tegra_cpu_reset_handler_data based on the
info in DT or use a different reset handler. DT is parsed before bringing up
secondary CPUs, so this approach should work I think.

Cheers,

Peter.

  reply	other threads:[~2013-03-05  7:40 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25 23:47 Multi-platform, and secure-only ARM errata workarounds Stephen Warren
2013-02-26  9:36 ` Marc Dietrich
2013-02-26 16:39   ` Stephen Warren
2013-02-26 22:31     ` Nicolas Pitre
2013-02-27  9:03     ` Marc Dietrich
2013-02-27 14:00       ` Rob Herring
2013-02-27 17:42       ` Stephen Warren
2013-02-28 13:58         ` Marc Dietrich
2013-02-26 10:23 ` Arnd Bergmann
2013-02-26 10:31   ` Catalin Marinas
2013-02-26 10:35     ` Catalin Marinas
2013-02-26 10:48       ` Arnd Bergmann
2013-02-26 11:11         ` Catalin Marinas
2013-02-26 11:35   ` Russell King - ARM Linux
2013-02-26 14:07     ` Rob Herring
2013-02-26 18:01     ` Stephen Warren
2013-02-26 18:11       ` Russell King - ARM Linux
2013-02-26 18:30         ` Stephen Warren
2013-02-26 18:49           ` Russell King - ARM Linux
2013-02-27  6:07             ` Santosh Shilimkar
2013-03-01 17:37         ` Stephen Warren
2013-03-01 18:05           ` Russell King - ARM Linux
2013-03-04  6:34           ` Peter De Schrijver
2013-03-04  9:16             ` Peter De Schrijver
2013-03-04 17:08               ` Stephen Warren
2013-03-05  7:40                 ` Peter De Schrijver [this message]
2013-03-05 17:00                   ` Stephen Warren
2013-03-06  8:14                     ` Peter De Schrijver
2013-03-06 16:18                       ` Stephen Warren
2013-03-10 17:25                     ` Santosh Shilimkar
2013-03-10 18:47                       ` Olof Johansson
2013-03-11 16:59                         ` Stephen Warren
2013-03-11 18:54                         ` Jason Gunthorpe

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=20130305074047.GH27241@tbergstrom-lnx.Nvidia.com \
    --to=pdeschrijver@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).