feat(debugv8p9): test if EL3 has properly enabled FEAT_Debugv8p9
When FEAT_Debugv8p9 is not enabled, access to MDSELR_EL1
traps to EL3. Access to FEAT_DEBUGV8P9 control registers
must be explicitly enabled in EL3,
This testcase uses this behavior to test if
FEAT_Debugv8p9 is enabled or not.
Change-Id: I2f9a0158e9f38eaffac2e27c40d44d3c520d508d
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
diff --git a/include/common/test_helpers.h b/include/common/test_helpers.h
index 8cddc72..ced1745 100644
--- a/include/common/test_helpers.h
+++ b/include/common/test_helpers.h
@@ -115,6 +115,16 @@
} \
} while (0)
+#define SKIP_TEST_IF_DEBUGV8P9_NOT_SUPPORTED() \
+ do { \
+ if (arch_get_debug_version() != \
+ ID_AA64DFR0_V8_9_DEBUG_ARCH_SUPPORTED) { \
+ tftf_testcase_printf( \
+ "Debugv8p9 not supported\n"); \
+ return TEST_RESULT_SKIPPED; \
+ } \
+ } while (0)
+
#define SKIP_TEST_IF_SVE_NOT_SUPPORTED() \
do { \
if (!is_armv8_2_sve_present()) { \