Add tests for MTE support
TF-A now has support for the new Memory Tagging Extension in ARMv8.5,
see commit 91624b7fed52 ("Merge changes from topic "jc/mte_enable"
into integration").
This patch creates and enables tests to ensure that the extension is
being properly enabled and that no undesired leakages occur.
Change-Id: I7708fb23a12e2f35a97533f296aaa53db776ddd2
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
diff --git a/include/lib/aarch64/arch_features.h b/include/lib/aarch64/arch_features.h
index 20240ec..86c0763 100644
--- a/include/lib/aarch64/arch_features.h
+++ b/include/lib/aarch64/arch_features.h
@@ -62,4 +62,10 @@
ID_AA64MMFR2_EL1_ST_MASK) == 1U;
}
+static inline unsigned int get_armv8_5_mte_support(void)
+{
+ return ((read_id_aa64pfr1_el1() >> ID_AA64PFR1_EL1_MTE_SHIFT) &
+ ID_AA64PFR1_EL1_MTE_MASK);
+}
+
#endif /* ARCH_FEATURES_H */