diff options
author | Antonio Niño Díaz <antonio.ninodiaz@arm.com> | 2019-03-04 09:51:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 09:51:34 +0000 |
commit | fb70e56d6a2ac8be112e108f7c285365210d1301 (patch) | |
tree | 1cbd3c51ac8a14e94a1e94ec34c74ef4a39d4c38 /include | |
parent | 22cde67b1f13853cd0eec095bd96e26900424d7a (diff) | |
parent | b6fd41837f3ff233aeb0be908d5065a86219242b (diff) |
Merge pull request #1851 from antonio-nino-diaz-arm/an/pauth
Correctly check for support of Address Authentication
Diffstat (limited to 'include')
-rw-r--r-- | include/arch/aarch64/arch_features.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/arch/aarch64/arch_features.h b/include/arch/aarch64/arch_features.h index 495ecb3a..6af1d039 100644 --- a/include/arch/aarch64/arch_features.h +++ b/include/arch/aarch64/arch_features.h @@ -34,10 +34,12 @@ static inline bool is_armv8_3_pauth_present(void) return (read_id_aa64isar1_el1() & mask) != 0U; } -static inline bool is_armv8_3_pauth_api_present(void) +static inline bool is_armv8_3_pauth_apa_api_present(void) { - return ((read_id_aa64isar1_el1() >> ID_AA64ISAR1_API_SHIFT) & - ID_AA64ISAR1_API_MASK) != 0U; + uint64_t mask = (ID_AA64ISAR1_API_MASK << ID_AA64ISAR1_API_SHIFT) | + (ID_AA64ISAR1_APA_MASK << ID_AA64ISAR1_APA_SHIFT); + + return (read_id_aa64isar1_el1() & mask) != 0U; } static inline bool is_armv8_4_ttst_present(void) |