drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
Source file repositories/reference/linux-study-clean/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c- Extension
.c- Size
- 58340 bytes
- Lines
- 1871
- Domain
- Driver Families
- Bucket
- drivers/platform
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/auxiliary_bus.hlinux/delay.hlinux/intel_tpmi.hlinux/intel_vsec.hlinux/fs.hlinux/io.hlinux/kernel.hlinux/minmax.hlinux/module.hasm/msr.huapi/linux/isst_if.hisst_tpmi_core.hisst_if_common.h
Detected Declarations
struct sst_headerstruct cp_headerstruct pp_headerstruct feature_offsetstruct levels_offsetstruct pp_control_offsetstruct pp_status_offsetstruct perf_levelstruct tpmi_per_power_domain_infostruct tpmi_sst_structstruct tpmi_sst_common_structfunction sst_add_perf_profilesfunction sst_mainfunction isst_instance_countfunction map_cdiesfunction map_partition_power_domain_idfunction disable_dynamic_sst_featuresfunction isst_if_core_power_statefunction isst_if_clos_paramfunction isst_if_clos_assocfunction isst_if_get_perf_levelfunction isst_if_set_perf_levelfunction isst_if_set_perf_featurefunction isst_if_get_perf_level_infofunction isst_if_get_perf_level_fabric_infofunction isst_if_get_perf_level_maskfunction isst_if_get_base_freq_infofunction isst_if_get_base_freq_maskfunction isst_if_get_tpmi_instance_countfunction isst_if_get_turbo_freq_infofunction isst_if_def_ioctlfunction tpmi_sst_dev_addfunction tpmi_sst_dev_removefunction tpmi_sst_dev_suspendfunction tpmi_sst_dev_resumefunction tpmi_sst_initfunction tpmi_sst_exit
Annotated Snippet
struct sst_header {
u8 interface_version;
u8 cap_mask;
u8 cp_offset;
u8 pp_offset;
u32 reserved;
} __packed;
/**
* struct cp_header - SST-CP (core-power) header
* @feature_id: 0=SST-CP, 1=SST-PP, 2=SST-BF, 3=SST-TF
* @feature_rev: Interface Version number for this SST feature
* @ratio_unit: Frequency ratio unit. 00: 100MHz. All others are reserved
* @reserved: Reserved for future use
*
* This structure is used store SST-CP header. This is packed to the same
* format as defined in the specifications.
*/
struct cp_header {
u64 feature_id :4;
u64 feature_rev :8;
u64 ratio_unit :2;
u64 reserved :50;
} __packed;
/**
* struct pp_header - SST-PP (Perf profile) header
* @feature_id: 0=SST-CP, 1=SST-PP, 2=SST-BF, 3=SST-TF
* @feature_rev: Interface Version number for this SST feature
* @level_en_mask: SST-PP level enable/disable fuse mask
* @allowed_level_mask: Allowed level mask used for dynamic config level switching
* @reserved0: Reserved for future use
* @ratio_unit: Frequency ratio unit. 00: 100MHz. All others are reserved
* @block_size: Size of PP block in Qword unit (8 bytes)
* @dynamic_switch: If set (1), dynamic switching of SST PP is supported
* @memory_ratio_unit: Memory Controller frequency ratio unit. 00: 100MHz, others reserved
* @reserved1: Reserved for future use
*
* This structure is used store SST-PP header. This is packed to the same
* format as defined in the specifications.
*/
struct pp_header {
u64 feature_id :4;
u64 feature_rev :8;
u64 level_en_mask :8;
u64 allowed_level_mask :8;
u64 reserved0 :4;
u64 ratio_unit :2;
u64 block_size :8;
u64 dynamic_switch :1;
u64 memory_ratio_unit :2;
u64 reserved1 :19;
} __packed;
/**
* struct feature_offset - Offsets to SST-PP features
* @pp_offset: Qword offset within PP level for the SST_PP register bank
* @bf_offset: Qword offset within PP level for the SST_BF register bank
* @tf_offset: Qword offset within PP level for the SST_TF register bank
* @reserved: Reserved for future use
*
* This structure is used store offsets for SST features in the register bank.
* This is packed to the same format as defined in the specifications.
*/
struct feature_offset {
u64 pp_offset :8;
u64 bf_offset :8;
u64 tf_offset :8;
u64 reserved :40;
} __packed;
/**
* struct levels_offset - Offsets to each SST PP level
* @sst_pp_level0_offset: Qword offset to the register block of PP level 0
* @sst_pp_level1_offset: Qword offset to the register block of PP level 1
* @sst_pp_level2_offset: Qword offset to the register block of PP level 2
* @sst_pp_level3_offset: Qword offset to the register block of PP level 3
* @sst_pp_level4_offset: Qword offset to the register block of PP level 4
* @reserved: Reserved for future use
*
* This structure is used store offsets of SST PP levels in the register bank.
* This is packed to the same format as defined in the specifications.
*/
struct levels_offset {
u64 sst_pp_level0_offset :8;
u64 sst_pp_level1_offset :8;
u64 sst_pp_level2_offset :8;
u64 sst_pp_level3_offset :8;
u64 sst_pp_level4_offset :8;
u64 reserved :24;
Annotation
- Immediate include surface: `linux/auxiliary_bus.h`, `linux/delay.h`, `linux/intel_tpmi.h`, `linux/intel_vsec.h`, `linux/fs.h`, `linux/io.h`, `linux/kernel.h`, `linux/minmax.h`.
- Detected declarations: `struct sst_header`, `struct cp_header`, `struct pp_header`, `struct feature_offset`, `struct levels_offset`, `struct pp_control_offset`, `struct pp_status_offset`, `struct perf_level`, `struct tpmi_per_power_domain_info`, `struct tpmi_sst_struct`.
- Atlas domain: Driver Families / drivers/platform.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.