feat(brbe): test that EL3 has properly enabled access to BRBE

Access to FEAT_BRBE control registers must be explicitly enabled in EL3,
this simple test just ensures that the registers are accessible or traps
to EL3, similar to the TRBE test.

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I0a25c5ce6beb6aa96b9428264b75cb3569ac535a
diff --git a/include/common/test_helpers.h b/include/common/test_helpers.h
index a69eb72..e838270 100644
--- a/include/common/test_helpers.h
+++ b/include/common/test_helpers.h
@@ -309,6 +309,14 @@
 	} while (false)
 #endif
 
+#define SKIP_TEST_IF_BRBE_NOT_SUPPORTED()					\
+	do {									\
+		if (!get_feat_brbe_support()) {				\
+			tftf_testcase_printf("FEAT_BRBE not supported\n");	\
+			return TEST_RESULT_SKIPPED;				\
+		}								\
+	} while (false)
+
 /* Helper macro to verify if system suspend API is supported */
 #define is_psci_sys_susp_supported()	\
 		(tftf_get_psci_feature_info(SMC_PSCI_SYSTEM_SUSPEND)		\