drivers/platform/x86/amd/pmf/pmf.h
Source file repositories/reference/linux-study-clean/drivers/platform/x86/amd/pmf/pmf.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/amd/pmf/pmf.h- Extension
.h- Size
- 24684 bytes
- Lines
- 932
- Domain
- Driver Families
- Bucket
- drivers/platform
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/amd-pmf-io.hlinux/circ_buf.hlinux/input.hlinux/mutex_types.hlinux/platform_device.hlinux/platform_profile.h
Detected Declarations
struct cookie_headerstruct amd_pmf_apts_outputstruct amd_pmf_apts_granular_outputstruct amd_pmf_apts_granularstruct sbios_hb_event_v2struct apmf_verify_interfacestruct apmf_system_paramsstruct apmf_sbios_reqstruct apmf_sbios_req_v1struct apmf_sbios_req_v2struct apmf_fan_idxstruct smu_pmf_metrics_v2struct smu_pmf_metricsstruct pmf_bios_inputs_prevstruct pmf_bios_input_entrystruct pmf_cbi_ring_bufferstruct amd_pmf_devstruct apmf_sps_prop_granular_v2struct apmf_sps_prop_granularstruct apmf_static_slider_granular_outputstruct amd_pmf_static_slider_granularstruct apmf_static_slider_granular_output_v2struct amd_pmf_static_slider_granular_v2struct os_power_sliderstruct amd_pmf_notify_smart_pc_updatestruct fan_table_controlstruct power_table_controlstruct auto_mode_trans_paramsstruct auto_mode_mode_settingsstruct auto_mode_mode_configstruct apmf_auto_modestruct cnqf_mode_settingsstruct cnqf_tran_paramsstruct cnqf_configstruct apmf_cnqf_power_setstruct apmf_dyn_slider_outputstruct amd_pmf_pb_bitmapstruct pmf_action_tablestruct ta_pmf_condition_infostruct ta_pmf_load_policy_tablestruct ta_pmf_init_tablestruct ta_pmf_enact_tablestruct ta_pmf_actionstruct ta_pmf_enact_resultstruct ta_pmf_shared_memoryenum sbios_hb_v2enum amd_stt_skin_tempenum amd_slider_op
Annotated Snippet
struct cookie_header {
u32 sign;
u32 length;
} __packed;
/* APMF Functions */
#define APMF_FUNC_VERIFY_INTERFACE 0
#define APMF_FUNC_GET_SYS_PARAMS 1
#define APMF_FUNC_SBIOS_REQUESTS 2
#define APMF_FUNC_SBIOS_HEARTBEAT 4
#define APMF_FUNC_AUTO_MODE 5
#define APMF_FUNC_SET_FAN_IDX 7
#define APMF_FUNC_OS_POWER_SLIDER_UPDATE 8
#define APMF_FUNC_STATIC_SLIDER_GRANULAR 9
#define APMF_FUNC_DYN_SLIDER_AC 11
#define APMF_FUNC_DYN_SLIDER_DC 12
#define APMF_FUNC_NOTIFY_SMART_PC_UPDATES 14
#define APMF_FUNC_SBIOS_HEARTBEAT_V2 16
/* Message Definitions */
#define SET_SPL 0x03 /* SPL: Sustained Power Limit */
#define SET_SPPT 0x05 /* SPPT: Slow Package Power Tracking */
#define SET_FPPT 0x07 /* FPPT: Fast Package Power Tracking */
#define GET_SPL 0x0B
#define GET_SPPT 0x0D
#define GET_FPPT 0x0F
#define SET_DRAM_ADDR_HIGH 0x14
#define SET_DRAM_ADDR_LOW 0x15
#define SET_TRANSFER_TABLE 0x16
#define SET_STT_MIN_LIMIT 0x18 /* STT: Skin Temperature Tracking */
#define SET_STT_LIMIT_APU 0x19
#define SET_STT_LIMIT_HS2 0x1A
#define SET_SPPT_APU_ONLY 0x1D
#define GET_SPPT_APU_ONLY 0x1E
#define GET_STT_MIN_LIMIT 0x1F
#define GET_STT_LIMIT_APU 0x20
#define GET_STT_LIMIT_HS2 0x21
#define SET_P3T 0x23 /* P3T: Peak Package Power Limit */
#define SET_PMF_PPT 0x25
#define SET_PMF_PPT_APU_ONLY 0x26
/* OS slider update notification */
#define DC_BEST_PERF 0
#define DC_BETTER_PERF 1
#define DC_BATTERY_SAVER 3
#define AC_BEST_PERF 4
#define AC_BETTER_PERF 5
#define AC_BETTER_BATTERY 6
/* Fan Index for Auto Mode */
#define FAN_INDEX_AUTO 0xFFFFFFFF
#define ARG_NONE 0
#define AVG_SAMPLE_SIZE 3
/* Policy Actions */
#define PMF_POLICY_SPL 2
#define PMF_POLICY_SPPT 3
#define PMF_POLICY_FPPT 4
#define PMF_POLICY_SPPT_APU_ONLY 5
#define PMF_POLICY_STT_MIN 6
#define PMF_POLICY_STT_SKINTEMP_APU 7
#define PMF_POLICY_STT_SKINTEMP_HS2 8
#define PMF_POLICY_SYSTEM_STATE 9
#define PMF_POLICY_BIOS_OUTPUT_1 10
#define PMF_POLICY_BIOS_OUTPUT_2 11
#define PMF_POLICY_P3T 38
#define PMF_POLICY_PMF_PPT 54
#define PMF_POLICY_PMF_PPT_APU_ONLY 55
#define PMF_POLICY_BIOS_OUTPUT_3 57
#define PMF_POLICY_BIOS_OUTPUT_4 58
#define PMF_POLICY_BIOS_OUTPUT_5 59
#define PMF_POLICY_BIOS_OUTPUT_6 60
#define PMF_POLICY_BIOS_OUTPUT_7 61
#define PMF_POLICY_BIOS_OUTPUT_8 62
#define PMF_POLICY_BIOS_OUTPUT_9 63
#define PMF_POLICY_BIOS_OUTPUT_10 64
/* TA macros */
#define PMF_TA_IF_VERSION_MAJOR 1
#define TA_PMF_ACTION_MAX 32
#define TA_PMF_UNDO_MAX 8
#define TA_OUTPUT_RESERVED_MEM 922
#define MAX_OPERATION_PARAMS 4
#define TA_ERROR_CRYPTO_INVALID_PARAM 0x20002
#define TA_ERROR_CRYPTO_BIN_TOO_LARGE 0x2000d
#define PMF_IF_V1 1
#define PMF_IF_V2 2
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/amd-pmf-io.h`, `linux/circ_buf.h`, `linux/input.h`, `linux/mutex_types.h`, `linux/platform_device.h`, `linux/platform_profile.h`.
- Detected declarations: `struct cookie_header`, `struct amd_pmf_apts_output`, `struct amd_pmf_apts_granular_output`, `struct amd_pmf_apts_granular`, `struct sbios_hb_event_v2`, `struct apmf_verify_interface`, `struct apmf_system_params`, `struct apmf_sbios_req`, `struct apmf_sbios_req_v1`, `struct apmf_sbios_req_v2`.
- Atlas domain: Driver Families / drivers/platform.
- Implementation status: source implementation candidate.
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.