aboutsummaryrefslogtreecommitdiff
path: root/tftf/framework/aarch64/entrypoint.S
diff options
context:
space:
mode:
Diffstat (limited to 'tftf/framework/aarch64/entrypoint.S')
-rw-r--r--tftf/framework/aarch64/entrypoint.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/tftf/framework/aarch64/entrypoint.S b/tftf/framework/aarch64/entrypoint.S
index 0a4afe0e0..81fd207b4 100644
--- a/tftf/framework/aarch64/entrypoint.S
+++ b/tftf/framework/aarch64/entrypoint.S
@@ -20,6 +20,18 @@ func tftf_entrypoint
bl arch_init
/* --------------------------------------------------------------------
+ * Invalidate the RW memory used by TFTF image.
+ * This is done to safeguard against possible corruption of this
+ * memory by dirty cache lines in a system cache as a result of use
+ * by an earlier boot loader stage.
+ * --------------------------------------------------------------------
+ */
+ adr x0, __DATA_START__
+ adr x1, __DATA_END__
+ sub x1, x1, x0
+ bl inv_dcache_range
+
+ /* --------------------------------------------------------------------
* This code is expected to be executed only by the primary CPU.
* Save the mpid for the first core that executes and if a secondary
* CPU has lost its way make it spin forever.