diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2019-01-11 11:20:10 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2019-01-11 11:20:10 +0000 |
commit | 2559b2c8256f798e7e9fc9eef58257b13b9e8514 (patch) | |
tree | ab1e11bffe4bc1d0acaa536595f03f63e7f09e7b /include/arch/aarch64/arch.h | |
parent | 300afb387ea3ce588a9b4c6746316bf9bc55dd56 (diff) | |
download | platform_external_arm-trusted-firmware-2559b2c8256f798e7e9fc9eef58257b13b9e8514.tar.gz platform_external_arm-trusted-firmware-2559b2c8256f798e7e9fc9eef58257b13b9e8514.tar.bz2 platform_external_arm-trusted-firmware-2559b2c8256f798e7e9fc9eef58257b13b9e8514.zip |
xlat v2: Dynamically detect need for CnP bit
ARMv8.2-TTCNP is mandatory from ARMv8.2 onwards, but it can be implemented
in CPUs that don't implement all mandatory 8.2 features (and so have to
claim to be a lower version).
This patch removes usage of the ARM_ARCH_AT_LEAST() macro and uses system
ID registers to detect whether it is needed to set the bit or not.
Change-Id: I7bcbf0c7c937590dfc2ca668cfd9267c50f7d52c
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include/arch/aarch64/arch.h')
-rw-r--r-- | include/arch/aarch64/arch.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/arch/aarch64/arch.h b/include/arch/aarch64/arch.h index 8a44d83f0..9e2bfface 100644 --- a/include/arch/aarch64/arch.h +++ b/include/arch/aarch64/arch.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -156,10 +156,6 @@ #define ID_AA64PFR0_GIC_WIDTH U(4) #define ID_AA64PFR0_GIC_MASK ((ULL(1) << ID_AA64PFR0_GIC_WIDTH) - ULL(1)) -/* ID_AA64MMFR0_EL1 definitions */ -#define ID_AA64MMFR0_EL1_PARANGE_SHIFT U(0) -#define ID_AA64MMFR0_EL1_PARANGE_MASK ULL(0xf) - /* ID_AA64ISAR1_EL1 definitions */ #define ID_AA64ISAR1_GPI_SHIFT U(28) #define ID_AA64ISAR1_GPI_WIDTH U(4) @@ -179,6 +175,10 @@ #define ID_AA64ISAR1_APA_MASK \ (((ULL(1) << ID_AA64ISAR1_APA_WIDTH) - ULL(1)) << ID_AA64ISAR1_APA_SHIFT) +/* ID_AA64MMFR0_EL1 definitions */ +#define ID_AA64MMFR0_EL1_PARANGE_SHIFT U(0) +#define ID_AA64MMFR0_EL1_PARANGE_MASK ULL(0xf) + #define PARANGE_0000 U(32) #define PARANGE_0001 U(36) #define PARANGE_0010 U(40) @@ -202,6 +202,11 @@ #define ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED ULL(0x1) #define ID_AA64MMFR0_EL1_TGRAN16_NOT_SUPPORTED ULL(0x0) +/* ID_AA64MMFR2_EL1 definitions */ +#define ID_AA64MMFR2_EL1 S3_0_C0_C7_2 +#define ID_AA64MMFR2_EL1_CNP_SHIFT U(0) +#define ID_AA64MMFR2_EL1_CNP_MASK ULL(0xf) + /* ID_AA64PFR1_EL1 definitions */ #define ID_AA64PFR1_EL1_SSBS_SHIFT U(4) #define ID_AA64PFR1_EL1_SSBS_MASK ULL(0xf) |