feat(sys_reg_trace): add trace system registers access test
Added a test to read trace system registers to ensure that EL3
is giving permission to non-secure EL2 to access these registers.
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I0bdbb5aff81a78fc3a3766278c48b25bb6e1779f
diff --git a/include/lib/aarch64/arch_features.h b/include/lib/aarch64/arch_features.h
index a71ca9b..edc40f0 100644
--- a/include/lib/aarch64/arch_features.h
+++ b/include/lib/aarch64/arch_features.h
@@ -118,4 +118,11 @@
ID_AA64DFR0_TRACEFILT_SUPPORTED;
}
+static inline bool get_armv8_0_sys_reg_trace_support(void)
+{
+ return ((read_id_aa64dfr0_el1() >> ID_AA64DFR0_TRACEVER_SHIFT) &
+ ID_AA64DFR0_TRACEVER_MASK) ==
+ ID_AA64DFR0_TRACEVER_SUPPORTED;
+}
+
#endif /* ARCH_FEATURES_H */