arm-trusted-firmware/lib
Antonio Nino Diaz 3388b38dc3 Set TCR_EL1.EPD1 bit to 1
In the S-EL1&0 translation regime we aren't using the higher VA range,
whose translation table base address is held in TTBR1_EL1. The bit
TCR_EL1.EPD1 can be used to disable translations using TTBR1_EL1, but
the code wasn't setting it to 1. Additionally, other fields in TCR1_EL1
associated with the higher VA range (TBI1, TG1, SH1, ORGN1, IRGN1 and
A1) weren't set correctly as they were left as 0. In particular, 0 is a
reserved value for TG1. Also, TBBR1_EL1 was not explicitly set and its
reset value is UNKNOWN.

Therefore memory accesses to the higher VA range would result in
unpredictable behaviour as a translation table walk would be attempted
using an UNKNOWN value in TTBR1_EL1.

On the FVP and Juno platforms accessing the higher VA range resulted in
a translation fault, but this may not always be the case on all
platforms.

This patch sets the bit TCR_EL1.EPD1 to 1 so that any kind of
unpredictable behaviour is prevented.

This bug only affects the AArch64 version of the code, the AArch32
version sets this bit to 1 as expected.

Change-Id: I481c000deda5bc33a475631301767b9e0474a303
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2017-09-21 11:57:11 +01:00
..
aarch32 Exit early if size zero for cache helpers 2017-06-21 17:46:28 +01:00
aarch64 Exit early if size zero for cache helpers 2017-06-21 17:46:28 +01:00
compiler-rt Import ctzdi2.c from LLVM compiler-rt 2017-07-26 09:28:23 +01:00
cpus Cortex-A72: Implement workaround for erratum 859971 2017-09-07 14:22:02 +01:00
el3_runtime Merge pull request #1019 from etienne-lms/log-size 2017-09-07 00:40:59 +01:00
libfdt Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
locks Add macro to test for minimum architecture version 2017-08-24 17:23:43 +01:00
optee Add Trusted OS extra image parsing support for ARM standard platforms 2017-08-09 18:06:05 +08:00
pmf Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
psci Reduce time lock in psci_do_cpu_off 2017-09-06 14:48:15 +01:00
semihosting Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
stack_protector Use SPDX license identifiers 2017-05-03 09:39:28 +01:00
stdlib Use standard UNIX file:line format in assert 2017-07-19 05:57:40 +01:00
xlat_tables Set TCR_EL1.EPD1 bit to 1 2017-09-21 11:57:11 +01:00
xlat_tables_v2 Set TCR_EL1.EPD1 bit to 1 2017-09-21 11:57:11 +01:00