summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorOkash Khawaja <okash@google.com>2022-11-04 12:38:01 +0000
committerOkash Khawaja <okash@google.com>2022-11-10 12:14:05 +0000
commit04c7303b9c3d2215eebc3d59431519990abe03d0 (patch)
tree8376be2fd42f449fe563f1c7503d55507dfff674 /Makefile
parent00bf236e32d55604bda14c2d0f9ce757e5d9292d (diff)
downloadarm-trusted-firmware-04c7303b9c3d2215eebc3d59431519990abe03d0.tar.gz
feat(cpus): make cache ops conditional
When a core is in debug recovery mode its caches are not invalidated upon reset, so the L1 and L2 cache contents from before reset are observable after reset. Similarly, debug recovery mode of DynamIQ cluster ensures that contents of the shared L3 cache are also not invalidated upon transition to On mode. Booting cores in debug recovery mode means booting with caches disabled and preserving the caches until a point where software can dump the caches and retrieve their contents. TF-A however unconditionally cleans and invalidates caches at multiple points during boot. This can lead to memory corruption as well as loss of cache contents to be used for debugging. This patch fixes this by calling a platform hook before performing CMOs in helper routines in cache_helpers.S. The platform hook plat_can_cmo is an assembly routine which must not clobber x2 and x3, and avoid using stack. The whole checking is conditional upon `CONDITIONAL_CMO` which can be set at compile time. Signed-off-by: Okash Khawaja <okash@google.com> Change-Id: I172e999e4acd0f872c24056e647cc947ee54b193
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 70d5338eb..b664ac0af 100644
--- a/Makefile
+++ b/Makefile
@@ -1080,6 +1080,7 @@ $(eval $(call assert_booleans,\
SIMICS_BUILD \
FEATURE_DETECTION \
TRNG_SUPPORT \
+ CONDITIONAL_CMO \
)))
$(eval $(call assert_numerics,\
@@ -1241,6 +1242,7 @@ $(eval $(call add_defines,\
FEATURE_DETECTION \
TWED_DELAY \
ENABLE_FEAT_TWED \
+ CONDITIONAL_CMO \
)))
ifeq (${SANITIZE_UB},trap)