]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(mpam): feat_detect: support major/minor
authorAndre Przywara <andre.przywara@arm.com>
Tue, 21 Mar 2023 14:44:59 +0000 (14:44 +0000)
committerAndre Przywara <andre.przywara@arm.com>
Tue, 21 Mar 2023 14:53:02 +0000 (14:53 +0000)
The MPAM CPU ID version number is split between two CPU ID register
fields, with the second being a fractional field, allowing for instance
for a "MPAM v1.1" number. The read_feat_mpam_version() function merges
those two fields to form a "4.4" fixed point fractional number, but the
limit check in the check_feature() function was not taking this into
account.
To support MPAM major version 1, extend the limit from "1" to "17", to
cover the current maximum version of "MPAM v1.1".
This fixes FVP runs with "has_mpam=1" and FEATURE_DETECTION enabled.

Change-Id: Icb557741d597e4e43eaf658b78f18af6e9fb439e
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
common/feat_detect.c

index abb6d718ce1b9c229d355dfd014621594610ce08..7a6c9193e9ed539913516faf814c3a05aef34353 100644 (file)
@@ -274,7 +274,7 @@ void detect_arch_features(void)
        check_feature(ENABLE_FEAT_AMUv1, read_feat_amu_id_field(),
                      "AMUv1", 1, 2);
        check_feature(ENABLE_MPAM_FOR_LOWER_ELS, read_feat_mpam_version(),
-                     "MPAM", 1, 1);
+                     "MPAM", 1, 17);
        read_feat_nv2();
        read_feat_sel2();
        check_feature(ENABLE_TRF_FOR_NS, read_feat_trf_id_field(),