u-boot/arch/arm/cpu/armv8
Andre Przywara 6c7691edd5 armv8: Always unmask SErrors
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>
2022-03-02 13:59:29 -05:00
..
bcmns3 board: ns3: add api to save boot parameters passed from BL31 2020-07-29 10:13:41 -04:00
fsl-layerscape armv8: Always unmask SErrors 2022-03-02 13:59:29 -05:00
hisilicon WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
xen WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
cache.S armv8/cache.S: Triple with single instruction 2021-09-23 08:55:06 -04:00
cache_v8.c Revert most of the series for adding vexpress_aemv8r support 2021-09-03 10:42:15 -04:00
config.mk SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
cpu-dt.c treewide: use CONFIG_IS_ENABLED() for ARMV8_SEC_FIRMWARE_SUPPORT 2020-12-04 16:09:05 -05:00
cpu.c common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
exception_level.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
exceptions.S armv8: Reduce exception handling code 2018-08-03 19:53:54 -04:00
fel_utils.S WS cleanup: remove SPACE(s) followed by TAB 2021-09-30 09:08:16 -04:00
fwcall.c arm: Remove #include <version.h> from armv8/fwcall.c 2021-02-01 16:32:06 -05:00
generic_timer.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
Kconfig armv8: apple: Disable PSCI reset 2022-01-14 13:16:11 -05:00
linux-kernel-image-header-vars.h arm64: add an option to switch visibility of CONFIG_SYS_INIT_SP_BSS_OFFSET 2019-07-10 22:37:23 +09:00
Makefile armv8: remove no longer needed lowlevel_init.S 2022-02-04 00:09:57 +00:00
psci.S ARMv8: PSCI: Fix PSCI_TABLE relocation issue 2019-04-23 17:57:28 -04:00
sec_firmware.c image: Adjust the workings of fit_check_format() 2021-02-15 22:31:52 -05:00
sec_firmware_asm.S armv8: sec_firmware: change el2_to_aarch32 SMC ID 2018-12-06 14:37:19 -08:00
smccc-call.S arm: Leave smccc calls in .text when efi_loader=n 2019-02-13 09:40:06 +01:00
spin_table.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spin_table_v8.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl_data.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00
start.S armv8: Always unmask SErrors 2022-03-02 13:59:29 -05:00
tlb.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
transition.S armv8: Disable pointer authentication traps for EL1 2021-09-02 10:17:45 -04:00
u-boot-spl.lds armv8: spl: Fix build with LINUX_KERNEL_IMAGE_HEADER 2022-02-03 12:15:33 -05:00
u-boot.lds ARMv8: Allow SiP service extensions on top of PSCI code 2019-04-22 18:13:21 -04:00