arm-trusted-firmware/lib
Madhukar Pappireddy c2d32a5f85 Fix exception handlers in BL31: Use DSB to synchronize pending EA
For SoCs which do not implement RAS, use DSB as a barrier to
synchronize pending external aborts at the entry and exit of
exception handlers. This is needed to isolate the SErrors to
appropriate context.

However, this introduces an unintended side effect as discussed
in the https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3440
A summary of the side effect and a quick workaround is provided as
part of this patch and summarized here:

The explicit DSB at the entry of various exception vectors in BL31
for handling exceptions from lower ELs can inadvertently trigger an
SError exception in EL3 due to pending asyncrhonouus aborts in lower
ELs. This will end up being handled by serror_sp_elx in EL3 which will
ultimately panic and die.

The way to workaround is to update a flag to indicate if the exception
truly came from EL3. This flag is allocated in the cpu_context
structure. This is not a bullet proof solution to the problem at hand
because we assume the instructions following "isb" that help to update
the flag (lines 100-102 & 139-141) execute without causing further
exceptions.

Change-Id: I4d345b07d746a727459435ddd6abb37fda24a9bf
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2021-01-29 10:30:18 -06:00
..
aarch32 TF-A Aarch32: optimise memcpy4() 2020-07-23 18:35:49 +01:00
aarch64 AArch64: Fix assertions in processing dynamic relocations 2021-01-06 10:59:22 +00:00
bl_aux_params Introduce lightweight BL platform parameter library 2019-07-18 16:42:40 -07:00
compiler-rt compiler_rt: Import popcountdi2.c and popcountsi2.c files 2020-01-20 11:32:59 +01:00
coreboot Update in coreboot_get_memory_type API to include size as well 2020-10-16 02:23:35 +05:30
cpus Workaround for Cortex N1 erratum 1946160 2021-01-13 19:56:07 +00:00
debugfs DebugFS: Check channel index before calling clone function 2021-01-21 15:25:23 +00:00
el3_runtime Fix exception handlers in BL31: Use DSB to synchronize pending EA 2021-01-29 10:30:18 -06:00
extensions Add support for FEAT_MTPMU for Armv8.6 2020-12-11 12:49:20 +00:00
fconf lib: fconf: Implement a parser to populate CoT 2020-09-15 16:13:26 +01:00
libc libc/snprintf: use macro to reduce duplicated code 2021-01-20 14:16:04 +08:00
libfdt libfdt: Upgrade libfdt source files 2020-10-02 12:15:48 +00:00
locks locks: bakery: use is_dcache_enabled() helper 2020-04-07 09:33:13 +02:00
optee Coverity: remove unnecessary header file includes 2020-02-04 10:23:51 -06:00
pmf Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
psci PSCI: fix limit of 256 CPUs caused by cast to unsigned char 2020-12-22 07:39:51 +00:00
romlib Use abspath to dereference $BUILD_BASE 2020-08-04 18:02:02 +01:00
semihosting MISRA cleanup in mem_region and semihosting files 2020-08-07 19:11:23 -05:00
stack_protector Disable stack protection explicitly 2019-10-20 14:59:09 -04:00
utils MISRA cleanup in mem_region and semihosting files 2020-08-07 19:11:23 -05:00
xlat_tables Aarch32 xlat_tables lib: Fix MISRA-2012 defects 2020-07-29 12:48:34 +00:00
xlat_tables_v2 Increase type widths to satisfy width requirements 2020-10-12 10:55:03 -05:00
zlib Sanitise includes across codebase 2019-01-04 10:43:17 +00:00