feat(trf): add trace filter control registers access test

Added a test to read trace filter control 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: I9354d8592bd187206add717b9d3b0206382a06d3
diff --git a/include/lib/aarch32/arch_features.h b/include/lib/aarch32/arch_features.h
index e2c2f2c..7d0ec5f 100644
--- a/include/lib/aarch32/arch_features.h
+++ b/include/lib/aarch32/arch_features.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -35,4 +35,11 @@
 		DBGDIDR_VERSION_SHIFT);
 }
 
+static inline bool get_armv8_4_trf_support(void)
+{
+	return ((read_id_dfr0() >> ID_DFR0_TRACEFILT_SHIFT) &
+		ID_DFR0_TRACEFILT_MASK) ==
+		ID_DFR0_TRACEFILT_SUPPORTED;
+}
+
 #endif /* ARCH_FEATURES_H */