aboutsummaryrefslogtreecommitdiff
path: root/include/arch/aarch64/arch_features.h
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 06:56:42 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 06:56:42 +0000
commit9fd1e09b2de3798cc1a98af3bddd5c5436a85091 (patch)
tree48f7e7e1c9d2b0913361c2f1a922b3a36b97aa0b /include/arch/aarch64/arch_features.h
parent10d94e452c1fd658be6627310132335925495fd5 (diff)
parentd2ebd507612c6d0e62ab68cc89a76b29d47a4394 (diff)
downloadarm-trusted-firmware-9fd1e09b2de3798cc1a98af3bddd5c5436a85091.tar.gz
Change-Id: I4dcfaeae29f384d16c236bc70a5886295532bef6
Diffstat (limited to 'include/arch/aarch64/arch_features.h')
-rw-r--r--include/arch/aarch64/arch_features.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/arch/aarch64/arch_features.h b/include/arch/aarch64/arch_features.h
index 671b3dc60..dc0b7f306 100644
--- a/include/arch/aarch64/arch_features.h
+++ b/include/arch/aarch64/arch_features.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -17,6 +17,18 @@ static inline bool is_armv7_gentimer_present(void)
return true;
}
+static inline bool is_armv8_1_pan_present(void)
+{
+ return ((read_id_aa64mmfr1_el1() >> ID_AA64MMFR1_EL1_PAN_SHIFT) &
+ ID_AA64MMFR1_EL1_PAN_MASK) != 0U;
+}
+
+static inline bool is_armv8_1_vhe_present(void)
+{
+ return ((read_id_aa64mmfr1_el1() >> ID_AA64MMFR1_EL1_VHE_SHIFT) &
+ ID_AA64MMFR1_EL1_VHE_MASK) != 0U;
+}
+
static inline bool is_armv8_2_ttcnp_present(void)
{
return ((read_id_aa64mmfr2_el1() >> ID_AA64MMFR2_EL1_CNP_SHIFT) &
@@ -82,6 +94,12 @@ static inline bool is_armv8_5_rng_present(void)
ID_AA64ISAR0_RNDR_MASK);
}
+static inline bool is_armv8_6_feat_amuv1p1_present(void)
+{
+ return (((read_id_aa64pfr0_el1() >> ID_AA64PFR0_AMU_SHIFT) &
+ ID_AA64PFR0_AMU_MASK) >= ID_AA64PFR0_AMU_V1P1);
+}
+
/*
* Return MPAM version:
*