map_partiti...er_domain_id(9)
π
map_partiti...er_domain_id(9) π
okay bestie, this is the map_partiti...er_domain_id(9) page from the Kernel API Manual, and itβs here to explain how user domain IDs get mapped to partition domain IDs. no cap, itβs giving very specific kernel energy π«Ά
πΈ NAME πΈ
map_partition_power_domain_id β Map user domain ID to partition domain ID β¨
π SYNOPSIS π
int map_partition_power_domain_id (struct tpmi_sst_struct *sst_inst , u8 id , u8 *partition );
π ARGUMENTS π
sst_instβ TPMI Instance. your main-character struct pointer πidβ User domain ID. the ID from user space that needs mapping.partitionβ Resolved partition. the resolved partition π
π¦ DESCRIPTION π¦
okay so picture a partitioned system. a CPU package has two separate MMIO ranges (Under two PCI devices). but the CPU package compute die/power domain IDs are unique in a package. user space can get compute die/power domain ID from CPUID and MSR 0x54 for a CPU. so those IDs need to be preserved even if they are present in two different partitions with its own order. periodt.
for example, for command ISST_IF_COUNT_TPMI_INSTANCES, the valid_mask is 111111b for a 4 compute and 2 IO dies system. this is presented as provided by the hardware in a non-partitioned system with the following order:
I1-I0-C3-C2-C1-C0
here: "C" is for compute and "I" is for IO die. compute dies are always present first in TPMI instances, as they have to map to the real power domain/die ID of a system. in a non-partitioned system there is no way to identify compute and IO die boundaries from this driver without reading each CPU's mapping. yeah, itβs a whole thing π
the same order needs to be preserved, even if those compute dies are distributed among multiple partitions. for example: Partition 1 can contain: I1-C1-C0, and Partition 2 can contain: I2-C3-C2.
this will require a conversion of user space IDs to the actual index into array of stored power domains for each partition. for the above example this function will return partition and index as follows:
User space ID Partition Index Die type
0 0 0 Compute
1 0 1 Compute
2 1 0 Compute
3 1 1 Compute
4 0 2 IO
5 1 2 IO
π₯ RETURN π₯
-EINVAL on error, otherwise mapped domain ID >= 0. slay π
π SEE ALSO π
- Kernel file:
./drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c struct sst_header(9)struct cp_header(9)struct pp_header(9)struct feature_offset(9)struct levels_offset(9)struct pp_control_offset(9)struct pp_status_offset(9)struct perf_level(9)struct tpmi_per_power_domain_info(9)struct tpmi_sst_struct(9)struct tpmi_sst_common_struct(9)map_cdies(9)
mwah π β source/version: ./drivers/platform/x86/intel/s..., dated October 2026. map_partiti...er_domain_id(9) out π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms