tools/power/turbostat: Add initial support for SierraForest
authorZhang Rui <rui.zhang@intel.com>
Thu, 28 Sep 2023 05:09:02 +0000 (13:09 +0800)
committerZhang Rui <rui.zhang@intel.com>
Tue, 24 Oct 2023 05:38:09 +0000 (13:38 +0800)
Add initial support for SierraForest.

It shares the same features with SapphireRapids, except that it has
MSR_MODULE_C6_RES_MS support.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
tools/power/x86/turbostat/turbostat.c

index 981d39454b49384b2d00ce89657fa3069d033017..a50b6d071f6ab96ef88ada6f8fd767df111964b5 100644 (file)
@@ -674,6 +674,22 @@ static const struct platform_features spr_features = {
        .rapl_msrs = RAPL_PKG_ALL | RAPL_DRAM_ALL,
 };
 
+static const struct platform_features srf_features = {
+       .has_msr_misc_feature_control = 1,
+       .has_msr_misc_pwr_mgmt = 1,
+       .has_nhm_msrs = 1,
+       .has_config_tdp = 1,
+       .bclk_freq = BCLK_100MHZ,
+       .supported_cstates = CC1 | CC6 | PC2 | PC6,
+       .cst_limit = CST_LIMIT_SKX,
+       .has_msr_core_c1_res = 1,
+       .has_msr_module_c6_res_ms = 1,
+       .has_irtl_msrs = 1,
+       .has_cst_prewake_bit = 1,
+       .trl_msrs = TRL_BASE | TRL_CORECOUNT,
+       .rapl_msrs = RAPL_PKG_ALL | RAPL_DRAM_ALL,
+};
+
 static const struct platform_features slv_features = {
        .has_nhm_msrs = 1,
        .bclk_freq = BCLK_SLV,
@@ -848,6 +864,7 @@ static const struct platform_data turbostat_pdata[] = {
        { INTEL_FAM6_ATOM_TREMONT, &tmt_features },
        { INTEL_FAM6_ATOM_TREMONT_L, &tmt_features },
        { INTEL_FAM6_ATOM_GRACEMONT, &adl_features },
+       { INTEL_FAM6_ATOM_CRESTMONT_X, &srf_features },
        { INTEL_FAM6_XEON_PHI_KNL, &knl_features },
        { INTEL_FAM6_XEON_PHI_KNM, &knl_features },
        /*