linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: Multi-platform, and secure-only ARM errata workarounds
Date: Tue, 26 Feb 2013 08:07:30 -0600	[thread overview]
Message-ID: <512CC1A2.3060704@gmail.com> (raw)
In-Reply-To: <20130226113538.GS17833@n2100.arm.linux.org.uk>

On 02/26/2013 05:35 AM, Russell King - ARM Linux wrote:
> On Tue, Feb 26, 2013 at 10:23:26AM +0000, Arnd Bergmann wrote:
>> On Monday 25 February 2013, Stephen Warren wrote:
>>> Is there any other alternative I'm not seeing? Having the kernel
>>> suddenly become incompatible with any currently extant bootloader when I
>>> enable CONFIG_MULTIPLATFORM doesn't seem like a great idea.
>>
>> Could we make those errata be run-time enabled only when not booting
>> in secure mode?
> 
> The long and the short answer to this is... no.
> 
> 1. It is impossible to tell whether we're running secure or non-secure.
> 
> 2. Errata need to be applied before the MMU is initialized.  We need the
>    MMU to be initialized to run any C code what so ever, so calling out
>    to platform specific code to set errata is not possible.  Moreover,
>    we no longer determine the platform in the assembly code since DT
>    came along: this was removed because detecting it in DT from assembly
>    is far from trivial (you'd need to write an assembly DT parser).
> 
> Now, as for having the secure mode errata enabled on a kernel running in
> non-secure mode... what happens today is that we check whether something
> before the kernel has enabled the workaround, and we omit to write to
> the register.
> 
> What that means is that we expect whatever came before the kernel to have
> appropriately enabled the bits in the secure registers.  If it hasn't,
> and you have one of these secure mode workarounds enabled, the kernel
> will fault at boot time.

Only when booting in non-secure mode...

> So, if Stephen has working configs with these secure mode workarounds
> enabled, this means that the bits in the secure registers must already
> be appropriately set.

...and Stephen is booting in secure mode.

> Could the problem be that someone has made all errata workarounds, even
> those which apply after the system is up and running, depend on
> !MULTIPLATFORM ?

I don't think so. All those work-arounds remain and can be enabled.
There was one (430973) which had both a boot time chicken bit setting
and runtime piece. Only the boot time part of it is disabled for multi-plat.

Rob

  reply	other threads:[~2013-02-26 14:07 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 [this message]
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
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=512CC1A2.3060704@gmail.com \
    --to=robherring2@gmail.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).