Test that TF-A supports ARMv8.6-ECV

Note: This test will cause an unhandled exception in the case that TF-A
is not doing its job and enabling ARMv8.6-ECV Self-Synch when the hardware
supports it.

Change-Id: Iee19963f31fa47b0010e77d7b56b05b71ec1b507
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
diff --git a/include/common/test_helpers.h b/include/common/test_helpers.h
index 278c01e..33fce53 100644
--- a/include/common/test_helpers.h
+++ b/include/common/test_helpers.h
@@ -106,6 +106,15 @@
 		}								\
 	} while (0)
 
+#define SKIP_TEST_IF_ECV_NOT_SELF_SYNC()					\
+	do {									\
+		if (get_armv8_6_ecv_support() !=				\
+			ID_AA64MMFR0_EL1_ECV_SELF_SYNCH) {			\
+			tftf_testcase_printf("ARMv8.6-ECV not supported\n");	\
+			return TEST_RESULT_SKIPPED;				\
+		}								\
+	} while (0)
+
 #define SKIP_TEST_IF_MM_NOT_PRESENT()						\
 	do {									\
 		smc_args version_smc = { MM_VERSION_AARCH32 };			\