Skip to content

Commit 5aa63ca

Browse files
committed
tools/power/x86/intel-speed-select: Support SST PP revision 2 fields
Display fields added by SST PP revision 2. They include: uncore P0 (max frequency), P1 (base frequency) and Pm (min frequency) for uncore fabric 1. Signed-off-by: Srinivas Pandruvada <[email protected]>
1 parent 8357967 commit 5aa63ca

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

tools/power/x86/intel-speed-select/isst-core-tpmi.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ static int tpmi_get_ctdp_control(struct isst_id *id, int config_index,
227227
static int tpmi_get_tdp_info(struct isst_id *id, int config_index,
228228
struct isst_pkg_ctdp_level_info *ctdp_level)
229229
{
230+
struct isst_perf_level_fabric_info fabric_info;
230231
struct isst_perf_level_data_info info;
231232
int ret;
232233

@@ -253,6 +254,17 @@ static int tpmi_get_tdp_info(struct isst_id *id, int config_index,
253254
ctdp_level->uncore_p1 = info.p1_fabric_freq_mhz;
254255
ctdp_level->uncore_pm = info.pm_fabric_freq_mhz;
255256

257+
fabric_info.socket_id = id->pkg;
258+
fabric_info.power_domain_id = id->punit;
259+
fabric_info.level = config_index;
260+
261+
ret = tpmi_process_ioctl(ISST_IF_GET_PERF_LEVEL_FABRIC_INFO, &fabric_info);
262+
if (ret != -1) {
263+
ctdp_level->uncore1_p0 = fabric_info.p0_fabric_freq_mhz[1];
264+
ctdp_level->uncore1_p1 = fabric_info.p1_fabric_freq_mhz[1];
265+
ctdp_level->uncore1_pm = fabric_info.pm_fabric_freq_mhz[1];
266+
}
267+
256268
debug_printf
257269
("cpu:%d ctdp:%d CONFIG_TDP_GET_TDP_INFO tdp_ratio:%d pkg_tdp:%d ctdp_level->t_proc_hot:%d\n",
258270
id->cpu, config_index, ctdp_level->tdp_ratio, ctdp_level->pkg_tdp,

tools/power/x86/intel-speed-select/isst-display.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,26 @@ void isst_ctdp_display_information(struct isst_id *id, FILE *outf, int tdp_level
460460
format_and_print(outf, level + 2, header, value);
461461
}
462462

463+
if (ctdp_level->uncore1_p1) {
464+
snprintf(header, sizeof(header), "uncore-1-frequency-base(MHz)");
465+
snprintf(value, sizeof(value), "%d",
466+
ctdp_level->uncore1_p1 * isst_get_disp_freq_multiplier());
467+
format_and_print(outf, level + 2, header, value);
468+
}
469+
if (ctdp_level->uncore1_pm) {
470+
snprintf(header, sizeof(header), "uncore-1-frequency-min(MHz)");
471+
snprintf(value, sizeof(value), "%d",
472+
ctdp_level->uncore1_pm * isst_get_disp_freq_multiplier());
473+
format_and_print(outf, level + 2, header, value);
474+
}
475+
476+
if (ctdp_level->uncore1_p0) {
477+
snprintf(header, sizeof(header), "uncore-1-frequency-max(MHz)");
478+
snprintf(value, sizeof(value), "%d",
479+
ctdp_level->uncore1_p0 * isst_get_disp_freq_multiplier());
480+
format_and_print(outf, level + 2, header, value);
481+
}
482+
463483
if (ctdp_level->mem_freq) {
464484
snprintf(header, sizeof(header), "max-mem-frequency(MHz)");
465485
snprintf(value, sizeof(value), "%d",

tools/power/x86/intel-speed-select/isst.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ struct isst_pkg_ctdp_level_info {
147147
int uncore_p0;
148148
int uncore_p1;
149149
int uncore_pm;
150+
int uncore1_p0;
151+
int uncore1_p1;
152+
int uncore1_pm;
150153
int sse_p1;
151154
int avx2_p1;
152155
int avx512_p1;

0 commit comments

Comments
 (0)