From 515d2d46a318fa3c4c172491c6408c032e6a6b15 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 7 Mar 2024 17:40:55 +0000 Subject: [PATCH] feat(cpufeat): upgrade PMU to v8 (FEATURE_DETECTION) The ARMv8 ARM J.a describes the ID_AA64DFR0_EL1.PMUver field as allowing a maximum version number of 8 now. The added features extend the Common event number space and clarify on some UNPREDICTABLE behaviour. None of this affects TF-A or any system registers, so just increase the maximum known version number to let the FEATURE_DETECTION test pass on ARMv8.8 implementations. Change-Id: Icab48630c1635bcd78a710b443f0db01b8ff7c9b Signed-off-by: Andre Przywara --- common/feat_detect.c | 2 +- include/arch/aarch64/arch.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/feat_detect.c b/common/feat_detect.c index 09088c93d..8e3e3ddba 100644 --- a/common/feat_detect.c +++ b/common/feat_detect.c @@ -289,7 +289,7 @@ void detect_arch_features(void) * revisions so that we catch them as they come along */ check_feature(FEAT_STATE_ALWAYS, read_feat_pmuv3_id_field(), - "PMUv3", 1, ID_AA64DFR0_PMUVER_PMUV3P7); + "PMUv3", 1, ID_AA64DFR0_PMUVER_PMUV3P8); /* v8.1 features */ check_feature(ENABLE_FEAT_PAN, read_feat_pan_id_field(), "PAN", 1, 3); diff --git a/include/arch/aarch64/arch.h b/include/arch/aarch64/arch.h index 4eb54ed84..df0dcc30f 100644 --- a/include/arch/aarch64/arch.h +++ b/include/arch/aarch64/arch.h @@ -238,7 +238,7 @@ #define ID_AA64DFR0_PMUVER_SHIFT U(8) #define ID_AA64DFR0_PMUVER_MASK U(0xf) #define ID_AA64DFR0_PMUVER_PMUV3 U(1) -#define ID_AA64DFR0_PMUVER_PMUV3P7 U(7) +#define ID_AA64DFR0_PMUVER_PMUV3P8 U(8) #define ID_AA64DFR0_PMUVER_IMP_DEF U(0xf) /* ID_AA64DFR0_EL1.SEBEP definitions */