arm-trusted-firmware/bl31/aarch64
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
..
bl31_entrypoint.S Changes necessary to support SEPARATE_NOBITS_REGION feature 2020-01-27 15:33:24 -06:00
crash_reporting.S Fix crash dump for lower EL 2020-03-06 14:17:35 +00:00
ea_delegate.S Fix exception handlers in BL31: Use DSB to synchronize pending EA 2021-01-29 10:30:18 -06:00
runtime_exceptions.S Fix exception handlers in BL31: Use DSB to synchronize pending EA 2021-01-29 10:30:18 -06:00