aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Deprez <olivier.deprez@arm.com>2021-04-21 07:18:51 +0200
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2021-04-21 07:18:51 +0200
commit8b96e4cc79dd90712da07fe68c8821dd16acdf06 (patch)
tree3619601dba760b524582aa36107a5cf5675fad81
parentd89d11b4838d69d422b6ba19138af6bf50a90b80 (diff)
parentbc4cad961a84625bdbdf883dea961daa359fe666 (diff)
downloadtf-a-tests-8b96e4cc79dd90712da07fe68c8821dd16acdf06.tar.gz
Merge "spm: invalidate the data cache for the cactus image"
-rw-r--r--spm/cactus/aarch64/cactus_entrypoint.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/spm/cactus/aarch64/cactus_entrypoint.S b/spm/cactus/aarch64/cactus_entrypoint.S
index 7e638569..7775b469 100644
--- a/spm/cactus/aarch64/cactus_entrypoint.S
+++ b/spm/cactus/aarch64/cactus_entrypoint.S
@@ -32,6 +32,16 @@ secondary_cold_entry:
mul x2, x0, x2
sub sp, x1, x2
+ /*
+ * Invalidate the data cache for the whole partition.
+ * This prevents re-use of stale data cache entries from
+ * prior bootloader stages.
+ */
+ adrp x0, __TEXT_START__
+ adrp x1, __BSS_END__
+ sub x1, x1, x0
+ bl inv_dcache_range
+
/* Enable I-Cache */
mrs x1, sctlr_el1
orr x1, x1, #SCTLR_I_BIT