linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: recent ARM Erratas 742231 & 742230 broken.
Date: Fri, 5 Nov 2010 13:13:40 +0000	[thread overview]
Message-ID: <20101105131340.GA23828@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTik3ipJHcPtsy5cTuO1PhmAbKwGfSqAE_gUKjhiG@mail.gmail.com>

On Fri, Nov 05, 2010 at 01:12:48PM +0100, Linus Walleij wrote:
> 2010/10/20 Will Deacon <will.deacon@arm.com>:
> 
> > The diagnostic register is only writable from secure mode so you'll need to
> > look at what these patches do (they perform simple read-modify-writes) and
> > incorporate that code into your secure software.
> > (...)
> > I doubt that your secure monitor exposes the diagnostic register through an
> > SMC interface so you'll need to change the secure boot code to enable these
> > workarounds when the system comes out of reset.
> 
> These SMC:s (System Management Call?) are getting hairier now.
> 
> Can't you add an abstraction for the stuff we need to poke into
> diagnostics registers, enabling platform-specific overrides, like
> we do for l2x0 in mm/cache-l2x0.c?

That's a subject which came up when the first errata were merged.  The
fact of the matter is that there's no easy way to abstract the assembly
code - it certainly can't become C code because we don't have the MMU
up and running at this point.

Running the kernel in non-secure mode is going to be painful because of
(a) the need to issue SMC calls to access protected registers, and (b)
the lack of an API for the SMC call.

(a) isn't going to change, and (b) apparantly isn't something we can
influence.

The approach generally taken by proc-v7 is to check whether the work-
around is already enabled, and if it is, it skips trying to enable it
a second time, thereby avoiding aborts etc.

So the responsibility for enabling the protected work-arounds lies with
code which has access to the registers.

  reply	other threads:[~2010-11-05 13:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20  9:13 recent ARM Erratas 742231 & 742230 broken Srinidhi KASAGAR
2010-10-20 10:21 ` Will Deacon
     [not found] ` <-5088739724674874052@unknownmsgid>
2010-11-05 12:12   ` Linus Walleij
2010-11-05 13:13     ` Russell King - ARM Linux [this message]
2010-11-08 14:21     ` Will Deacon

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=20101105131340.GA23828@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).