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
diff --git a/tftf/tests/misc_tests/inject_serror.S b/tftf/tests/misc_tests/inject_serror.S
index d42441d..fd51f85 100644
--- a/tftf/tests/misc_tests/inject_serror.S
+++ b/tftf/tests/misc_tests/inject_serror.S
@@ -27,6 +27,7 @@
 	/* 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 @@
 
 2:
 	wfe
+	dsb	st
 	ldr	x0, [x3, #0]
 	cbz	x0, 2b