diff options
author | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2018-04-04 16:07:11 +0100 |
---|---|---|
committer | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2018-05-04 08:33:17 +0100 |
commit | 14c6016ad5ff4ac22861dff03129a646ad02c6dd (patch) | |
tree | 9cd0cea7cc03edb08896b13428825186b2c9ff4d /lib | |
parent | 76454abf4a2a5df482a753fc435b2de0219659bf (diff) | |
download | platform_external_arm-trusted-firmware-14c6016ad5ff4ac22861dff03129a646ad02c6dd.tar.gz platform_external_arm-trusted-firmware-14c6016ad5ff4ac22861dff03129a646ad02c6dd.tar.bz2 platform_external_arm-trusted-firmware-14c6016ad5ff4ac22861dff03129a646ad02c6dd.zip |
AArch64: Introduce RAS handling
RAS extensions are mandatory for ARMv8.2 CPUs, but are also optional
extensions to base ARMv8.0 architecture.
This patch adds build system support to enable RAS features in ARM
Trusted Firmware. A boolean build option RAS_EXTENSION is introduced for
this.
With RAS_EXTENSION, an Exception Synchronization Barrier (ESB) is
inserted at all EL3 vector entry and exit. ESBs will synchronize pending
external aborts before entering EL3, and therefore will contain and
attribute errors to lower EL execution. Any errors thus synchronized are
detected via. DISR_EL1 register.
When RAS_EXTENSION is set to 1, HANDLE_EL3_EA_FIRST must also be set to 1.
Change-Id: I38a19d84014d4d8af688bd81d61ba582c039383a
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/el3_runtime/aarch64/context.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/el3_runtime/aarch64/context.S b/lib/el3_runtime/aarch64/context.S index 9a53b76c1..121ca4d30 100644 --- a/lib/el3_runtime/aarch64/context.S +++ b/lib/el3_runtime/aarch64/context.S @@ -364,6 +364,16 @@ endfunc restore_gp_registers func restore_gp_registers_eret bl restore_gp_registers ldr x30, [sp, #CTX_GPREGS_OFFSET + CTX_GPREG_LR] + +#if IMAGE_BL31 && RAS_EXTENSION + /* + * Issue Error Synchronization Barrier to synchronize SErrors before + * exiting EL3. We're running with EAs unmasked, so any synchronized + * errors would be taken immediately; therefore no need to inspect + * DISR_EL1 register. + */ + esb +#endif eret endfunc restore_gp_registers_eret |