PEPC-TPMI(1)
π PEPC-TPMI(1)
okay so bestie, welcome to the General Commands Manual page for the tpmi command π
β this is pepc's whole lil corner of the world for talking to TPMI, and it is genuinely giving main character energy, no cap. let's get into it π¦
πΈ Background
TPMI β aka Topology Aware Register and PM Capsule Interface β is a memory-mapped interface for accessing processor registers related to power management on Intel CPUs β¨
Those registers are exposed via PCIe VSEC (Vendor-Specific Extended Capabilities) and they're grouped into TPMI features. for example:
- the
ufsfeature includes registers for uncore frequency scaling π - the
raplfeature covers Running Average Power Limit (RAPL) registers π₯ - the
sstfeature includes registers for Intel Speed Select Technology (SST) π
To decode TPMI features, the pepc tool requires a spec file describing register names, bits, and offsets in the PCIe memory-mapped address space. Features without a spec file cannot be decoded. periodt.
The pepc project includes spec files for some, but not all TPMI features. Spec files for other features can be requested from Intel Corporation via customer support channels π¨
The spec files are searched in the following locations and order:
./tpmi, in the directory of the running program$PEPC_TPMI_DATA_PATH/tpmi$HOME/.local/share/pepc/tpmi$VIRTUAL_ENV/share/pepc/tpmi/usr/local/share/pepc/tpmi/usr/share/pepc/tpmi
The PEPC_TPMI_DATA_PATH provides a mechanism for replacing or extending the standard spec files π«Ά Just set it to a directory with spec files to have pepc use them.
Spec files are YAML files, but they are generated from Intel proprietary XML files using the tpmi-spec-files-generator tool available in the pepc source code repository. iykyk π
π General options
-hβ show a short help message and exit. bye π-qβ be quiet (print only important messages like warnings). lowkey mode π€«-dβ print debugging information. the girlies love a trace π--debug-modules MODNAME[,MODNAME1,...]β the-doption enables all debug messages. this option limits them to the specified modules. for example,-d --debug-modules MSRwill only show debug messages from theMSRmodule.--versionβ print the version number and exit β-H HOSTNAME,--host HOSTNAMEβ host name or IP address of the target system. thepepccommand will be executed on this system using SSH, instead of running it locally. if not specified, the command will be run locally π-U USERNAME,--username USERNAMEβ name of the user to use for logging into the remote host over SSH. by default, look up the user name in SSH configuration files. if not found, use the current user name π§-K PRIVKEY,--priv-key PRIVKEYβ path to the private SSH key for logging into the remote host. if not specified, keys configured for the host in SSH configuration files (e.g.~/.ssh/config) are used. if no keys are configured there, standard key files (e.g.~/.ssh/id_rsa) and the SSH agent are tried π-D DATASET,--dataset DATASETβ this option is for debugging and testing. it specifies the dataset to use for emulating the host for running the command on. the datasets are available inpepcsource code repository.
The argument can be a dataset path or name. If specified by name, the following locations are searched for the dataset.
./tests/emul-datain the program's directory$PEPC_DATA_PATH/tests/emul-data$VIRTUAL_ENV/share/pepc/tests/emul-data$HOME/.local/share/pepc/tests/emul-data/usr/local/share/pepc/tests/emul-data/usr/share/pepc/tests/emul-data
--force-colorβ force colorized output even if the output stream is not a terminal (adds ANSI escape codes). serving looks on purpose π π--print-man-pathβ print thepepcmanual pages directory path and exit. add this path to theMANPATHenvironment variable to make the manual pages available to themantool π
π Subcommand 'ls'
Display supported TPMI features. it discovers features by listing /sys/kernel/debug/tpmi-<PCI-addr>/tpmi-id-<ID> directories in debugfs. when --topology is used, it also reads /sys/kernel/debug/tpmi-<PCI-addr>/tpmi-id-<ID>/mem_dump to enumerate instances π
-B BASE,--base BASEβ path to a copy of the TPMI debugfs contents (a debugfs dump directory). by default,pepcreads from the live system's debugfs at/sys/kernel/debug, searching fortpmi-<PCI-addr>subdirectories within it. this option overrides the default with a custom path, intended for decoding TPMI debugfs dumps captured from a different system ποΈ--vfm VFMβ VFM (Vendor, Family, Model) identifier of the target CPU as an integer or in[Vendor:]Family:Modelformat. use this option with--basewhen decoding a TPMI debugfs dump to identify the CPU model of the system the dump was captured from π§¬--list-specsβ display information about TPMI spec files for the target system and exit. show the detected CPU model and available spec files for that model. spec directories may contain files for different CPU models. select files matching the target system. note that the target system may not support all TPMI features described in the spec files π-t,--topologyβ display TPMI topology (PCI addresses, instance numbers, etc.) πΊοΈ--unimplementedβ include unimplemented TPMI instances. unimplemented instances have version number0xFFand represent "empty slots" in the instances table of a TPMI feature. for example, instance 0 may be implemented, instance 1 may be unimplemented (version0xFF), and instance 2 may be implemented. by default, unimplemented instances are not shown in the output π-F FEATURES,--features FEATURESβ comma-separated list of TPMI feature names to include in the output. defaults to all supported features β¨
π Subcommand 'read'
Read one or more TPMI registers. it reads TPMI data from /sys/kernel/debug/tpmi-<PCI-addr>/tpmi-id-<ID>/mem_dump π₯
-B BASE,--base BASEβ path to a copy of the TPMI debugfs contents (a debugfs dump directory). by default,pepcreads from the live system's debugfs at/sys/kernel/debug, searching fortpmi-<PCI-addr>subdirectories within it. this option overrides the default with a custom path, intended for decoding TPMI debugfs dumps captured from a different system ποΈ--vfm VFMβ VFM (Vendor, Family, Model) identifier of the target CPU as an integer or in[Vendor:]Family:Modelformat. use this option with--basewhen decoding a TPMI debugfs dump to identify the CPU model of the system the dump was captured from π§¬-F FEATURES,--features FEATURESβ comma-separated list of TPMI feature names to read the registers for. defaults to all supported features β¨-a ADDRS,--addresses ADDRSβ comma-separated list of TPMI device PCI addresses to read the registers from. defaults to all devices π--packages PACKAGESβ comma-separated list of package numbers to read TPMI registers for (defaults to all packages) π¦-i INSTANCES,--instances INSTANCESβ comma-separated list of TPMI instance numbers to read registers from (defaults to all instances) π’-c CLUSTERS,--clusters CLUSTERSβ comma-separated list of cluster numbers to read registers from (defaults to all clusters). this option is only relevant for theufsTPMI feature, because there may be multiple copies of UFS control registers within a TPMI instance, and the copies are referred to as clusters. all other TPMI features have only one cluster β cluster 0 π-R REGISTERS,--registers REGISTERSβ comma-separated list of TPMI register names to read. defaults to all registers π-b BITFIELDS,--bitfields BITFIELDSβ comma-separated list of TPMI register bit field names to decode. defaults to decoding all bit fields π§©-n,--no-bitfieldsβ do not decode and display TPMI register bit field values. when this option is specified, only register values will be displayed without decoding the individual bit fields within them π«--yamlβ display information in YAML format π
βοΈ Subcommand 'write'
Write a value to a TPMI register or its bit field. it reads and writes TPMI data via /sys/kernel/debug/tpmi-<PCI-addr>/tpmi-id-<ID>/mem_dump (reads) and /sys/kernel/debug/tpmi-<PCI-addr>/tpmi-id-<ID>/mem_write (writes) π€
bestie be careful here β this one actually writes to your hardware. know what you're doing, fr fr π
-B BASE,--base BASEβ path to a copy of the TPMI debugfs contents (a debugfs dump directory). by default,pepcreads from the live system's debugfs at/sys/kernel/debug, searching fortpmi-<PCI-addr>subdirectories within it. this option overrides the default with a custom path, intended for decoding TPMI debugfs dumps captured from a different system ποΈ--vfm VFMβ VFM (Vendor, Family, Model) identifier of the target CPU as an integer or in[Vendor:]Family:Modelformat. use this option with--basewhen decoding a TPMI debugfs dump to identify the CPU model of the system the dump was captured from π§¬-F FEATURE,--feature FEATUREβ name of the TPMI feature the register belongs to β¨-a ADDRS,--addresses ADDRSβ comma-separated list of PCI addresses of TPMI devices to write to π--packages PACKAGESβ comma-separated list of package numbers to write to (defaults to all packages) π¦-i INSTANCES,--instances INSTANCESβ comma-separated list of TPMI instance numbers to write to. defaults to all instances π’-c CLUSTERS,--clusters CLUSTERSβ comma-separated list of cluster numbers to write to (defaults to all clusters). this option is only relevant for theufsTPMI feature, because there may be multiple copies of UFS control registers within a TPMI instance, and the copies are referred to as clusters. all other TPMI features have only one cluster β cluster 0 π-R REGNAME,--register REGNAMEβ name of the TPMI register to write βοΈ-b BITFIELD,--bitfield BITFIELDβ name of the TPMI register bit field to write to. if this option is not specified, the value will be written to the entire register. when specified, only the specified bit field within the register will be modified π§©-V VALUE,--value VALUEβ value to write to the TPMI register or bit field πΎ
and that's the whole page bestie π this was PEPC-TPMI(1), straight out of the General Commands Manual β go forth and decode some registers, you absolute icon ππ¦β¨
π¦ where this page comes from
- epel 10: python3-pepc 2.0.7-2.el10_3 Β· BSD-3-Clause
- epel 9: python3-pepc 2.0.7-3.el9 Β· BSD-3-Clause
- fedora 44: python3-pepc 2.0.7-2.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms