fix(sme): synchronize context before using it
We need to wait for the write to cptr_el2 to take effect to consider SME
enabled. Otherwise, the write to smcr_el2 may fault. Add an isb() to
synchronize this.
Change-Id: Ib1fb1803bad2d4fb9e89bc4861e2e611b9882b2e
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
diff --git a/lib/power_management/suspend/aarch64/asm_tftf_suspend.S b/lib/power_management/suspend/aarch64/asm_tftf_suspend.S
index c643475..770a1bd 100644
--- a/lib/power_management/suspend/aarch64/asm_tftf_suspend.S
+++ b/lib/power_management/suspend/aarch64/asm_tftf_suspend.S
@@ -130,6 +130,9 @@
msr ttbr0_el2, x3
msr tcr_el2, x4
msr vbar_el2, x5
+
+ /* make sure whatever just got turned on is in effect */
+ isb
/*
* Check if the processor supports SME
*/