All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Simon Glass <sjg@chromium.org>,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
	Michael Walle <michael@walle.cc>, Nishanth Menon <nm@ti.com>,
	Alison Wang <alison.wang@nxp.com>,
	Peter Hoyes <Peter.Hoyes@arm.com>,
	Marek Vasut <marek.vasut+renesas@gmail.com>,
	Priyanka Jain <priyanka.jain@nxp.com>,
	Priyanka Singh <priyanka.singh@nxp.com>,
	Mark Kettenis <mark.kettenis@xs4all.nl>,
	u-boot@lists.denx.de
Subject: Re: [PATCH v2 2/6] armv8: Always unmask SErrors
Date: Wed, 2 Mar 2022 17:41:13 -0500	[thread overview]
Message-ID: <20220302224113.GV5020@bill-the-cat> (raw)
In-Reply-To: <20220211112939.1327953-3-andre.przywara@arm.com>

[-- Attachment #1: Type: text/plain, Size: 1884 bytes --]

On Fri, Feb 11, 2022 at 11:29:35AM +0000, Andre Przywara wrote:

> The ARMv8 architecture describes the "SError interrupt" as the fourth
> kind of exception, next to synchronous exceptions, IRQs, and FIQs.
> Those SErrors signal exceptional conditions from which the system might
> not easily recover, and are normally generated by the interconnect as a
> response to some bus error. A typical situation is access to a
> non-existing memory address or device, but it might be deliberately
> triggered by a device as well.
> The SError interrupt replaces the Armv7 asynchronous abort.
> 
> Trusted Firmware enters U-Boot (BL33) typically with SErrors masked,
> and we never enable them. However any SError condition still triggers
> the SError interrupt, and this condition stays pending, it just won't be
> handled. If now later on the Linux kernel unmasks the "A" bit in PState,
> it will immediately take the exception, leading to a kernel crash.
> This leaves many people scratching their head about the reason for
> this, and leads to long debug sessions, possibly looking at the wrong
> places (the kernel, but not U-Boot).
> 
> To avoid the situation, just unmask SErrors early in the ARMv8 boot
> process, so that the U-Boot exception handlers reports them in a timely
> manner. As SErrors are typically asynchronous, the register dump does
> not need to point at the actual culprit, but it should happen very
> shortly after the condition.
> 
> For those exceptions to be taken, we also need to route them to EL2,
> if U-Boot is running in this exception level.
> 
> This removes the respective code snippet from the Freescale lowlevel
> routine, as this is now handled in generic ARMv8 code.
> 
> Reported-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-03-02 22:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11 11:29 [PATCH v2 0/6] armv8: fixes and cleanups Andre Przywara
2022-02-11 11:29 ` [PATCH v2 1/6] cmd: exception: arm64: fix undefined, add faults Andre Przywara
2022-03-02 22:41   ` Tom Rini
2022-02-11 11:29 ` [PATCH v2 2/6] armv8: Always unmask SErrors Andre Przywara
2022-03-02 22:41   ` Tom Rini [this message]
2022-02-11 11:29 ` [PATCH v2 3/6] armv8: Force SP_ELx stack pointer usage Andre Przywara
2022-03-02 22:41   ` Tom Rini
2022-02-11 11:29 ` [PATCH v2 4/6] arm: Clean up asm/io.h Andre Przywara
2022-03-02 22:41   ` Tom Rini
2022-02-11 11:29 ` [PATCH v2 5/6] armv8: Simplify switch_el macro Andre Przywara
2022-03-02 22:41   ` Tom Rini
2022-02-11 11:29 ` [PATCH v2 6/6] armv8: Fix and simplify branch_if_master/branch_if_slave Andre Przywara
2022-03-02 22:41   ` Tom Rini

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=20220302224113.GV5020@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=Peter.Hoyes@arm.com \
    --cc=alison.wang@nxp.com \
    --cc=andre.przywara@arm.com \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=marek.vasut+renesas@gmail.com \
    --cc=mark.kettenis@xs4all.nl \
    --cc=michael@walle.cc \
    --cc=nm@ti.com \
    --cc=priyanka.jain@nxp.com \
    --cc=priyanka.singh@nxp.com \
    --cc=sjg@chromium.org \
    --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 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.