diff options
author | David Horstmann <david.horstmann@arm.com> | 2021-04-23 15:24:46 +0100 |
---|---|---|
committer | David Horstmann <david.horstmann@arm.com> | 2021-05-04 14:26:27 +0100 |
commit | aeda12b8e5c07e35e866f25bfafb1279acb00459 (patch) | |
tree | 3fc07e4f3e27b0b9e961c00545e87f7162ee0c67 /tftf/tests | |
parent | 476ffb30f7e99b030bc4d257a41cb54cb6713087 (diff) | |
download | tf-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/tests')
-rw-r--r-- | tftf/tests/misc_tests/inject_serror.S | 2 |
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 |