arm-trusted-firmware/lib
Manish V Badarkhe 45aecff003 Implement workaround for AT speculative behaviour
During context switching from higher EL (EL2 or higher)
to lower EL can cause incorrect translation in TLB due to
speculative execution of AT instruction using out-of-context
translation regime.

Workaround is implemented as below during EL's (EL1 or EL2)
"context_restore" operation:
1. Disable page table walk using SCTLR.M and TCR.EPD0 & EPD1
   bits for EL1 or EL2 (stage1 and stage2 disabled)
2. Save all system registers except TCR and SCTLR (for EL1 and EL2)
3. Do memory barrier operation (isb) to ensure all
   system register writes are done.
4. Restore TCR and SCTLR registers (for EL1 and EL2)

Errata details are available for various CPUs as below:
Cortex-A76: 1165522
Cortex-A72: 1319367
Cortex-A57: 1319537
Cortex-A55: 1530923
Cortex-A53: 1530924

More details can be found in mail-chain:
https://lists.trustedfirmware.org/pipermail/tf-a/2020-April/000445.html

Currently, Workaround is implemented as build option which is default
disabled.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: If8545e61f782cb0c2dda7ffbaf50681c825bd2f0
2020-05-14 13:08:54 +00:00
..
aarch32 Fix Coverity #261967, Infinite loop 2019-08-06 13:06:03 +01:00
aarch64 Read-only xlat tables for BL31 memory 2020-02-24 16:52:56 +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 coreboot: Add memory range parsing 2020-04-07 07:35:26 +00:00
cpus cpus: denver: fixup register used to store return address 2020-03-09 15:25:15 -07:00
debugfs coverity: debugfs devfip remove comparisons to LONG_MAX 2020-02-04 13:40:30 +00:00
el3_runtime Implement workaround for AT speculative behaviour 2020-05-14 13:08:54 +00:00
extensions TF-A: Add support for ARMv8.3-PAuth in BL1 SMC calls and BL2U 2019-10-03 14:43:55 +01:00
fconf Merge changes I85eb75cf,Ic6d9f927 into integration 2020-05-05 12:01:48 +00:00
libc libc: add memrchr 2019-12-11 08:51:26 +01:00
libfdt libfdt: Downgrade to version 1.4.6-9 2018-10-30 13:42:13 +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 coverity: fix MISRA violations 2020-02-18 10:47:46 -06:00
romlib FDT wrappers: add functions for read/write bytes 2020-02-03 11:41:27 +00:00
semihosting qemu: Implement qemu_system_off via semihosting. 2020-01-23 10:53:45 +00:00
stack_protector Disable stack protection explicitly 2019-10-20 14:59:09 -04:00
utils coverity: Fix MISRA null pointer violations 2020-02-05 14:53:02 -06:00
xlat_tables Coding guideline suggest not to use unsigned long 2019-11-12 11:14:18 -06:00
xlat_tables_v2 locks: bakery: use is_dcache_enabled() helper 2020-04-07 09:33:13 +02:00
zlib Sanitise includes across codebase 2019-01-04 10:43:17 +00:00