tftf(rme): intermittently switch to Realm while doing NS SVE ops

Interleave NS SVE operations with Realm SVE operations and check whether
SVE vectors are not affected.

This test also configures SVE op array and SVE vector length with random
value in NS and Realm for test each iteration.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I7a9ba4bd0d298f187baa3048ec622eb97ec3d99f
diff --git a/include/lib/extensions/sve.h b/include/lib/extensions/sve.h
index 2fdaa55..5907ef9 100644
--- a/include/lib/extensions/sve.h
+++ b/include/lib/extensions/sve.h
@@ -8,6 +8,7 @@
 #define SVE_H
 
 #include <arch.h>
+#include <stdlib.h> /* for rand() */
 
 #define fill_sve_helper(num) "ldr z"#num", [%0, #"#num", MUL VL];"
 #define read_sve_helper(num) "str z"#num", [%0, #"#num", MUL VL];"
@@ -27,6 +28,9 @@
 /* convert SVE VQ to bits */
 #define SVE_VQ_TO_BITS(vq)		(((vq) + 1U) << 7U)
 
+/* get a random SVE VQ b/w 0 to SVE_VQ_ARCH_MAX */
+#define SVE_GET_RANDOM_VQ		(rand() % (SVE_VQ_ARCH_MAX + 1))
+
 #ifndef __ASSEMBLY__
 
 typedef uint8_t sve_vector_t[SVE_VECTOR_LEN_BYTES];