@@ -82,6 +82,8 @@ const (
82
82
UncoreMaxFromTPMIScriptName = "uncore max from tpmi"
83
83
UncoreMinFromTPMIScriptName = "uncore min from tpmi"
84
84
ElcScriptName = "efficiency latency control"
85
+ SstTfHighPriorityCoreFrequenciesScriptName = "sst tf high priority core frequencies"
86
+ SstTfLowPriorityCoreFrequenciesScriptName = "sst tf low priority core frequencies"
85
87
ChaCountScriptName = "cha count"
86
88
MeminfoScriptName = "meminfo"
87
89
TransparentHugePagesScriptName = "transparent huge pages"
@@ -274,21 +276,41 @@ else
274
276
fi` ,
275
277
},
276
278
{
277
- Name : SpecTurboCoresScriptName ,
278
- Script : "rdmsr 0x1ae" , // MSR_TURBO_GROUP_CORE_CNT: Group Size of Active Cores for Turbo Mode Operation
279
+ Name : SpecTurboCoresScriptName ,
280
+ Script : `#!/bin/bash
281
+ # if SST-TF is supported and enabled, then the MSR values are not valid
282
+ supported=$(pcm-tpmi 5 0xF8 -d -b 12:12 -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
283
+ if [ "$supported" -eq 1 ]; then
284
+ enabled=$(pcm-tpmi 5 0x78 -d -b 9:9 -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
285
+ if [ "$enabled" -eq 1 ]; then
286
+ exit 0
287
+ fi
288
+ fi
289
+ rdmsr 0x1ae # MSR_TURBO_GROUP_CORE_CNT: Group Size of Active Cores for Turbo Mode Operation
290
+ ` ,
279
291
Architectures : []string {x86_64 },
280
292
Families : []string {"6" }, // Intel
281
293
Lkms : []string {"msr" },
282
- Depends : []string {"rdmsr" },
294
+ Depends : []string {"rdmsr" , "pcm-tpmi" },
283
295
Superuser : true ,
284
296
},
285
297
{
286
- Name : SpecTurboFrequenciesScriptName ,
287
- Script : "rdmsr 0x1ad" , // MSR_TURBO_RATIO_LIMIT: Maximum Ratio Limit of Turbo Mode
298
+ Name : SpecTurboFrequenciesScriptName ,
299
+ Script : `#!/bin/bash
300
+ # if SST-TF is supported and enabled, then the MSR values are not valid
301
+ supported=$(pcm-tpmi 5 0xF8 -d -b 12:12 -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
302
+ if [ "$supported" -eq 1 ]; then
303
+ enabled=$(pcm-tpmi 5 0x78 -d -b 9:9 -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
304
+ if [ "$enabled" -eq 1 ]; then
305
+ exit 0
306
+ fi
307
+ fi
308
+ rdmsr 0x1ad # MSR_TURBO_RATIO_LIMIT: Maximum Ratio Limit of Turbo Mode
309
+ ` ,
288
310
Architectures : []string {x86_64 },
289
311
Families : []string {"6" }, // Intel
290
312
Lkms : []string {"msr" },
291
- Depends : []string {"rdmsr" },
313
+ Depends : []string {"rdmsr" , "pcm-tpmi" },
292
314
Superuser : true ,
293
315
},
294
316
{
@@ -488,6 +510,91 @@ done
488
510
Depends : []string {"pcm-tpmi" },
489
511
Superuser : true ,
490
512
},
513
+ {
514
+ Name : SstTfHighPriorityCoreFrequenciesScriptName ,
515
+ Script : `#!/bin/bash
516
+ # Is SST-TF supported?
517
+ supported=$(pcm-tpmi 5 0xF8 -d -b 12:12 -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
518
+ if [ "$supported" -eq 0 ]; then
519
+ echo "SST-TF is not supported"
520
+ exit 0
521
+ fi
522
+ # Is SST-TF enabled?
523
+ enabled=$(pcm-tpmi 5 0x78 -d -b 9:9 -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
524
+ if [ "$enabled" -eq 0 ]; then
525
+ echo "SST-TF is not enabled"
526
+ exit 0
527
+ fi
528
+ echo "bucket,cores,AVX,AVX2,AVX-512,AVX-512 heavy,AMX"
529
+ # up to 5 buckets
530
+ for ((i=0; i<5; i++))
531
+ do
532
+ # Get the # of cores in this bucket
533
+ bithigh=$((i*8+7))
534
+ bitlow=$((i*8))
535
+ numcores=$(pcm-tpmi 5 0x100 -d -b $bithigh:$bitlow -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
536
+ # if the number of cores is 0, skip this bucket
537
+ if [ "$numcores" -eq 0 ]; then
538
+ continue
539
+ fi
540
+ echo -n "$i,$numcores,"
541
+ # Get the frequencies for this bucket
542
+ bithigh=$((i*8+7)) # 8 bits per frequency
543
+ bitlow=$((i*8))
544
+ # 5 isa frequencies per bucket (AVX, AVX2, AVX-512, AVX-512 heavy, AMX)
545
+ for((j=0; j<5; j++))
546
+ do
547
+ offset=$((j*8 + 264)) # 264 is 0x108 (SST_TF_INFO_2) AVX
548
+ freq=$(pcm-tpmi 5 $offset -d -b $bithigh:$bitlow -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
549
+ echo -n "$freq"
550
+ if [ $j -lt 4 ]; then
551
+ echo -n ","
552
+ fi
553
+ done
554
+ echo "" # finish the line
555
+ done
556
+ ` ,
557
+ Architectures : []string {x86_64 },
558
+ Families : []string {"6" }, // Intel
559
+ Models : []string {"173" }, // GNR
560
+ Depends : []string {"pcm-tpmi" },
561
+ Superuser : true ,
562
+ },
563
+ {
564
+ Name : SstTfLowPriorityCoreFrequenciesScriptName ,
565
+ Script : `#!/bin/bash
566
+ # Is SST-TF supported?
567
+ supported=$(pcm-tpmi 5 0xF8 -d -b 12:12 -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
568
+ if [ "$supported" -eq 0 ]; then
569
+ echo "SST-TF is not supported"
570
+ exit 0
571
+ fi
572
+ # Is SST-TF enabled?
573
+ enabled=$(pcm-tpmi 5 0x78 -d -b 9:9 -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
574
+ if [ "$enabled" -eq 0 ]; then
575
+ echo "SST-TF is not enabled"
576
+ exit 0
577
+ fi
578
+ echo "AVX,AVX2,AVX-512,AVX-512 heavy,AMX"
579
+ # Get the low priority core clip ratios (frequencies)
580
+ for((j=0; j<5; j++))
581
+ do
582
+ bithigh=$((j*8+23))
583
+ bitlow=$((j*8+16))
584
+ freq=$(pcm-tpmi 5 0xF8 -d -b $bithigh:$bitlow -i 0 -e 0 | tail -n 2 | head -n 1 | awk '{print $5}')
585
+ echo -n "$freq"
586
+ if [ $j -ne 4 ]; then
587
+ echo -n ","
588
+ fi
589
+ done
590
+ echo "" # finish the line
591
+ ` ,
592
+ Architectures : []string {x86_64 },
593
+ Families : []string {"6" }, // Intel
594
+ Models : []string {"173" }, // GNR
595
+ Depends : []string {"pcm-tpmi" },
596
+ Superuser : true ,
597
+ },
491
598
{
492
599
Name : ChaCountScriptName ,
493
600
Script : `rdmsr 0x396
0 commit comments