diff options
author | Javier Almansa Sobrino <javier.almansasobrino@arm.com> | 2020-11-23 18:38:15 +0000 |
---|---|---|
committer | Javier Almansa Sobrino <javier.almansasobrino@arm.com> | 2020-12-11 12:49:20 +0000 |
commit | 0063dd1708e67e5d36168caaf2a0df383bbe1455 (patch) | |
tree | d6297557e50a6c6c4672f78b37efa649f4439c74 /include/arch/aarch64/arch.h | |
parent | 852e494075d92199e9bddfe92d364f2107a5a25d (diff) | |
download | platform_external_arm-trusted-firmware-0063dd1708e67e5d36168caaf2a0df383bbe1455.tar.gz platform_external_arm-trusted-firmware-0063dd1708e67e5d36168caaf2a0df383bbe1455.tar.bz2 platform_external_arm-trusted-firmware-0063dd1708e67e5d36168caaf2a0df383bbe1455.zip |
Add support for FEAT_MTPMU for Armv8.6
If FEAT_PMUv3 is implemented and PMEVTYPER<n>(_EL0).MT bit is implemented
as well, it is possible to control whether PMU counters take into account
events happening on other threads.
If FEAT_MTPMU is implemented, EL3 (or EL2) can override the MT bit
leaving it to effective state of 0 regardless of any write to it.
This patch introduces the DISABLE_MTPMU flag, which allows to diable
multithread event count from EL3 (or EL2). The flag is disabled
by default so the behavior is consistent with those architectures
that do not implement FEAT_MTPMU.
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: Iee3a8470ae8ba13316af1bd40c8d4aa86e0cb85e
Diffstat (limited to 'include/arch/aarch64/arch.h')
-rw-r--r-- | include/arch/aarch64/arch.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/arch/aarch64/arch.h b/include/arch/aarch64/arch.h index 6dcdacf98..09e598a2d 100644 --- a/include/arch/aarch64/arch.h +++ b/include/arch/aarch64/arch.h @@ -188,6 +188,11 @@ #define ID_AA64DFR0_PMS_SHIFT U(32) #define ID_AA64DFR0_PMS_MASK ULL(0xf) +/* ID_AA64DFR0_EL1.MTPMU definitions (for ARMv8.6+) */ +#define ID_AA64DFR0_MTPMU_SHIFT U(48) +#define ID_AA64DFR0_MTPMU_MASK ULL(0xf) +#define ID_AA64DFR0_MTPMU_SUPPORTED ULL(1) + /* ID_AA64ISAR1_EL1 definitions */ #define ID_AA64ISAR1_EL1 S3_0_C0_C6_1 #define ID_AA64ISAR1_GPI_SHIFT U(28) @@ -421,6 +426,7 @@ #define SCR_RESET_VAL SCR_RES1_BITS /* MDCR_EL3 definitions */ +#define MDCR_MTPME_BIT (ULL(1) << 28) #define MDCR_SCCD_BIT (ULL(1) << 23) #define MDCR_SPME_BIT (ULL(1) << 17) #define MDCR_SDD_BIT (ULL(1) << 16) @@ -436,6 +442,7 @@ #define MDCR_EL3_RESET_VAL ULL(0x0) /* MDCR_EL2 definitions */ +#define MDCR_EL2_MTPME (U(1) << 28) #define MDCR_EL2_HLP (U(1) << 26) #define MDCR_EL2_HCCD (U(1) << 23) #define MDCR_EL2_TTRF (U(1) << 19) |