Skip to content

Commit 5406b9d

Browse files
committed
_PepcTpmi: Print feature ID in hex
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
1 parent abd5d1d commit 5406b9d

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

docs/guide-tpmi.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -216,25 +216,25 @@ Here is how to list all available TPMI features on a Granite Rapids system.
216216
```bash
217217
$ pepc tpmi ls
218218
Supported TPMI features
219-
- rapl (0): Running Average Power Limit (RAPL) reporting and control
220-
- ufs (2): Processor uncore (fabric) monitoring and control
221-
- sst (5): Intel Speed Select Technology (SST) control
222-
- tpmi_info (129): TPMI Info Registers
219+
- rapl (0x00): Running Average Power Limit (RAPL) reporting and control
220+
- ufs (0x02): Processor uncore (fabric) monitoring and control
221+
- sst (0x05): Intel Speed Select Technology (SST) control
222+
- tpmi_info (0x81): TPMI Info Registers
223223
```
224224

225225
Check the topology of TPMI devices:
226226

227227
```bash
228228
$ pepc tpmi ls --topology
229229
Supported TPMI features
230-
- rapl (0): Running Average Power Limit (RAPL) reporting and control
230+
- rapl (0x00): Running Average Power Limit (RAPL) reporting and control
231231
- PCI address: 0000:00:03.1
232232
Package: 0
233233
Instances: 0
234234
- PCI address: 0000:80:03.1
235235
Package: 1
236236
Instances: 0
237-
- ufs (2): Processor uncore (fabric) monitoring and control
237+
- ufs (0x02): Processor uncore (fabric) monitoring and control
238238
- PCI address: 0000:00:03.1
239239
Package: 0
240240
- Instance: 0
@@ -257,13 +257,13 @@ TPMI spec directories information:
257257
Platform Name: Granite Rapids Xeon
258258
Spec Sub-directory Path: /home/dedekind/git/pepc/pepcdata/tpmi/gnr
259259
TPMI spec files:
260-
- rapl (0): Running Average Power Limit (RAPL) reporting and control
260+
- rapl (0x00): Running Average Power Limit (RAPL) reporting and control
261261
Spec file: /home/dedekind/git/pepc/pepcdata/tpmi/gnr/rapl.yml
262-
- ufs (2): Processor uncore (fabric) monitoring and control
262+
- ufs (0x02): Processor uncore (fabric) monitoring and control
263263
Spec file: /home/dedekind/git/pepc/pepcdata/tpmi/gnr/ufs.yml
264-
- sst (5): Intel Speed Select Technology (SST) control
264+
- sst (0x05): Intel Speed Select Technology (SST) control
265265
Spec file: /home/dedekind/git/pepc/pepcdata/tpmi/gnr/sst.yml
266-
- tpmi_info (129): TPMI Info Registers
266+
- tpmi_info (0x81): TPMI Info Registers
267267
Spec file: /home/dedekind/git/pepc/pepcdata/tpmi/gnr/tpmi_info.yml
268268
```
269269

@@ -491,13 +491,13 @@ TPMI spec directories information:
491491
Platform Name: Granite Rapids Xeon
492492
Spec Sub-directory Path: /home/dedekind/git/pepc/pepcdata/tpmi/gnr
493493
TPMI spec files:
494-
- rapl (0): Running Average Power Limit (RAPL) reporting and control
494+
- rapl (0x00): Running Average Power Limit (RAPL) reporting and control
495495
Spec file: /home/dedekind/git/pepc/pepcdata/tpmi/gnr/rapl.yml
496-
- ufs (2): Processor uncore (fabric) monitoring and control
496+
- ufs (0x02): Processor uncore (fabric) monitoring and control
497497
Spec file: /home/dedekind/git/pepc/pepcdata/tpmi/gnr/ufs.yml
498-
- sst (5): Intel Speed Select Technology (SST) control
498+
- sst (0x05): Intel Speed Select Technology (SST) control
499499
Spec file: /home/dedekind/git/pepc/pepcdata/tpmi/gnr/sst.yml
500-
- tpmi_info (129): TPMI Info Registers
500+
- tpmi_info (0x81): TPMI Info Registers
501501
Spec file: /home/dedekind/git/pepc/pepcdata/tpmi/gnr/tpmi_info.yml
502502
```
503503

@@ -539,8 +539,8 @@ pepc: notice: No VFM provided, assuming VFM 0x6ad (Granite Rapids Xeon) for deco
539539
pepc: warning: The 'tpmi_info' feature was not found in the debugfs dump
540540
pepc: notice: Using a dummy 'tpmi_info', assigning package number 0 to TPMI device 0000:00:00.1
541541
Supported TPMI features
542-
- ufs (2): Processor uncore (fabric) monitoring and control
543-
- tpmi_info (129): TPMI Info Registers
542+
- ufs (0x02): Processor uncore (fabric) monitoring and control
543+
- tpmi_info (0x81): TPMI Info Registers
544544
```
545545

546546
**Note:** Since the 'tpmi_info' feature is missing in this case, `pepc` creates a dummy 'tpmi_info'

pepctools/_PepcTpmi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def _list_specs(sdicts: dict[str, SDictTypedDict],
428428
_LOG.info("TPMI spec files:")
429429
for fname in sdicts:
430430
sdict = sdicts[fname]
431-
_LOG.info("- %s (%d): %s", sdict["name"], sdict["feature_id"], sdict["desc"])
431+
_LOG.info("- %s (%#04x): %s", sdict["name"], sdict["feature_id"], sdict["desc"])
432432
_LOG.info(" Spec file: %s", sdict["path"])
433433

434434
def _get_ls_supported(cmdl: _LsCmdlineArgsTypedDict,
@@ -490,7 +490,7 @@ def _tpmi_ls_flat(cmdl: _LsCmdlineArgsTypedDict, tpmi: TPMI.TPMI):
490490
_LOG.info("Supported TPMI features")
491491

492492
for fname, finfo in info["supported"].items():
493-
_LOG.info("- %s (%s): %s", fname, finfo["feature_id"], finfo["desc"])
493+
_LOG.info("- %s (%#04x): %s", fname, finfo["feature_id"], finfo["desc"])
494494

495495
if info.get("unknown"):
496496
_LOG.info("TPMI features supported by the target platform, but no spec files found")
@@ -546,7 +546,7 @@ def _tpmi_ls_topology(cmdl: _LsCmdlineArgsTypedDict, tpmi: TPMI.TPMI):
546546
_LOG.info("Supported TPMI features")
547547

548548
for fname, finfo in info["supported"].items():
549-
_LOG.info("- %s (%d): %s", fname, finfo["feature_id"], finfo["desc"].strip())
549+
_LOG.info("- %s (%#04x): %s", fname, finfo["feature_id"], finfo["desc"].strip())
550550

551551
for addr, addr_info in topology[fname].items():
552552
_LOG.info("%sPCI address: %s", _pfx_bullet(1), addr)

0 commit comments

Comments
 (0)