| 1 | What: /dev/amdpmf_interface |
| 2 | Date: June 2026 |
| 3 | KernelVersion: 7.2 |
| 4 | Contact: Shyam Sundar S K <[email protected]> |
| 5 | Description: |
| 6 | The AMD Platform Management Framework (PMF) util layer exposes a |
| 7 | minimal user-space interface via a character device for feature |
| 8 | discovery and metrics monitoring. |
| 9 | |
| 10 | When CONFIG_AMD_PMF_UTIL_SUPPORT is enabled, the driver creates |
| 11 | a character device: |
| 12 | |
| 13 | ====================== |
| 14 | /dev/amdpmf_interface |
| 15 | ====================== |
| 16 | |
| 17 | The interface supports a single ioctl: |
| 18 | |
| 19 | ============================ ======================================= |
| 20 | IOCTL Usage |
| 21 | IOCTL_AMD_PMF_POPULATE_DATA User passes a struct amd_pmf_info with |
| 22 | the size field set to sizeof(struct |
| 23 | amd_pmf_info). The driver returns all |
| 24 | available metrics and feature status |
| 25 | in the structure. |
| 26 | ============================ ======================================= |
| 27 | |
| 28 | struct amd_pmf_info layout: |
| 29 | |
| 30 | ======================= ========== ================================ |
| 31 | Field Type Description |
| 32 | size __u64 Structure size for versioning |
| 33 | features_supported __u32 Bitmask of supported features |
| 34 | platform_type __u32 Platform form factor orientation |
| 35 | power_source __u32 AC/DC power source |
| 36 | laptop_placement __u32 Device placement state |
| 37 | lid_state __u32 Lid open/closed status |
| 38 | user_presence __u32 User presence detection |
| 39 | slider_position __u32 Current power slider position |
| 40 | skin_temp __s32 Skin temperature (centidegrees) |
| 41 | gfx_busy __u32 Graphics workload percentage |
| 42 | ambient_light __s32 Ambient light sensor reading |
| 43 | avg_c0_residency __u32 Average C0 state residency |
| 44 | max_c0_residency __u32 Maximum C0 state residency |
| 45 | socket_power __u32 Socket power consumption |
| 46 | bios_input[10] __u32 Custom BIOS input parameters |
| 47 | bios_output[10] __u32 Custom BIOS output parameters |
| 48 | ======================= ========== ================================ |
| 49 | |
| 50 | Feature Support Flags (features_supported bitmask): |
| 51 | |
| 52 | ===================================== ==== ============================= |
| 53 | Flag Bit Description |
| 54 | AMD_PMF_FEAT_AUTO_MODE 0 Auto Mode feature support |
| 55 | AMD_PMF_FEAT_STATIC_POWER_SLIDER 1 Static Power Slider support |
| 56 | AMD_PMF_FEAT_POLICY_BUILDER 2 Policy Builder (Smart PC) |
| 57 | AMD_PMF_FEAT_DYNAMIC_POWER_SLIDER_AC 3 Dynamic slider on AC |
| 58 | AMD_PMF_FEAT_DYNAMIC_POWER_SLIDER_DC 4 Dynamic slider on DC |
| 59 | ===================================== ==== ============================= |
| 60 | |
| 61 | Return codes: |
| 62 | |
| 63 | ============= ============================================================ |
| 64 | Return code Description |
| 65 | 0 Success |
| 66 | EINVAL Invalid size or parameter |
| 67 | EFAULT copy_to_user/copy_from_user failures |
| 68 | ENODEV PMF device not available |
| 69 | ENOTTY Unknown ioctl command |
| 70 | ============= ============================================================ |
| 71 | |
| 72 | User-space tools integrating with AMD PMF to discover capabilities and |
| 73 | monitor real-time metrics for thermal and power management validation. |