aboutsummaryrefslogtreecommitdiff
path: root/tftf
diff options
context:
space:
mode:
authorDavid Horstmann <david.horstmann@arm.com>2021-04-23 15:24:46 +0100
committerDavid Horstmann <david.horstmann@arm.com>2021-05-04 14:26:27 +0100
commitaeda12b8e5c07e35e866f25bfafb1279acb00459 (patch)
tree3fc07e4f3e27b0b9e961c00545e87f7162ee0c67 /tftf
parent476ffb30f7e99b030bc4d257a41cb54cb6713087 (diff)
downloadtf-a-tests-aeda12b8e5c07e35e866f25bfafb1279acb00459.tar.gz
fix(TFTF): ensure robustness of SError inject test
A previous patch [1] fixed a race condition by moving a store instruction earlier in the SError inject test. However, this was not made robust by introducing the correct data barrier instructions. This patch introduces dsb instructions to ensure the race condition does not return. [1] https://review.trustedfirmware.org/c/TF-A/tf-a-tests/+/6892 Signed-off-by: David Horstmann <david.horstmann@arm.com> Change-Id: I7ec6b0acba7c8661284c572fe373ead902727b10
Diffstat (limited to 'tftf')
-rw-r--r--tftf/tests/misc_tests/inject_serror.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/tftf/tests/misc_tests/inject_serror.S b/tftf/tests/misc_tests/inject_serror.S
index d42441dd3..fd51f8556 100644
--- a/tftf/tests/misc_tests/inject_serror.S
+++ b/tftf/tests/misc_tests/inject_serror.S
@@ -27,6 +27,7 @@ func inject_serror_record
/* Clear SError received flag if necessary */
cbz x3, 1f
str xzr, [x3, #0]
+ dsb st
1:
/* Choose Error record 0 on the PE */
msr ERRSELR_EL1, x0
@@ -52,6 +53,7 @@ func inject_serror_record
2:
wfe
+ dsb st
ldr x0, [x3, #0]
cbz x0, 2b