TFTF: Add ARMv8.5 BTI-related definitions
This patch adds BTI-related definitions in header files
which fully correspond to those in TF-A source tree.
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Change-Id: I1ae4c13dab41b0099517dd1bead221909511f2fc
diff --git a/include/lib/aarch64/arch_features.h b/include/lib/aarch64/arch_features.h
index fc9e8d4..15eb784 100644
--- a/include/lib/aarch64/arch_features.h
+++ b/include/lib/aarch64/arch_features.h
@@ -62,6 +62,12 @@
ID_AA64MMFR2_EL1_ST_MASK) == 1U;
}
+static inline bool is_armv8_5_bti_present(void)
+{
+ return ((read_id_aa64pfr1_el1() >> ID_AA64PFR1_EL1_BT_SHIFT) &
+ ID_AA64PFR1_EL1_BT_MASK) == BTI_IMPLEMENTED;
+}
+
static inline unsigned int get_armv8_5_mte_support(void)
{
return ((read_id_aa64pfr1_el1() >> ID_AA64PFR1_EL1_MTE_SHIFT) &