| 1 |
.. SPDX-License-Identifier: GPL-2.0-or-later |
| 2 |
|
| 3 |
=========================================================== |
| 4 |
Lenovo WMI Interface Other Mode Driver (lenovo-wmi-other) |
| 5 |
=========================================================== |
| 6 |
|
| 7 |
Introduction |
| 8 |
============ |
| 9 |
Lenovo WMI Other Mode interface is broken up into multiple GUIDs, |
| 10 |
The primary Other Mode interface provides advanced power tuning features |
| 11 |
such as Package Power Tracking (PPT). It is paired with multiple data block |
| 12 |
GUIDs that provide context for the various methods. |
| 13 |
|
| 14 |
|
| 15 |
Other Mode |
| 16 |
---------- |
| 17 |
|
| 18 |
WMI GUID ``DC2A8805-3A8C-41BA-A6F7-092E0089CD3B`` |
| 19 |
|
| 20 |
The Other Mode WMI interface uses the firmware_attributes class to expose |
| 21 |
various WMI attributes provided by the interface in the sysfs. This enables |
| 22 |
CPU and GPU power limit tuning as well as various other attributes for |
| 23 |
devices that fall under the "Gaming Series" of Lenovo devices. Each |
| 24 |
attribute exposed by the Other Mode interface has corresponding |
| 25 |
capability data blocks which allow the driver to probe details about the |
| 26 |
attribute. Each attribute has multiple pages, one for each of the platform |
| 27 |
profiles managed by the Gamezone interface. Attributes are exposed in sysfs |
| 28 |
under the following path: |
| 29 |
|
| 30 |
:: |
| 31 |
|
| 32 |
/sys/class/firmware-attributes/lenovo-wmi-other/attributes/<attribute>/ |
| 33 |
|
| 34 |
Additionally, this driver also exports attributes to HWMON. |
| 35 |
|
| 36 |
LENOVO_CAPABILITY_DATA_00 |
| 37 |
------------------------- |
| 38 |
|
| 39 |
WMI GUID ``362A3AFE-3D96-4665-8530-96DAD5BB300E`` |
| 40 |
|
| 41 |
The LENOVO_CAPABILITY_DATA_00 interface provides various information that |
| 42 |
does not rely on the gamezone thermal mode. |
| 43 |
|
| 44 |
The following HWMON attributes are implemented: |
| 45 |
- fanX_div: internal RPM divisor |
| 46 |
- fanX_input: current RPM |
| 47 |
- fanX_target: target RPM (tunable, 0=auto) |
| 48 |
|
| 49 |
Due to the internal RPM divisor, the current/target RPMs are rounded down to |
| 50 |
its nearest multiple. The divisor itself is not necessary to be a power of two. |
| 51 |
|
| 52 |
LENOVO_CAPABILITY_DATA_01 |
| 53 |
------------------------- |
| 54 |
|
| 55 |
WMI GUID ``7A8F5407-CB67-4D6E-B547-39B3BE018154`` |
| 56 |
|
| 57 |
The LENOVO_CAPABILITY_DATA_01 interface provides various information that |
| 58 |
relies on the gamezone thermal mode, including power limits of integrated |
| 59 |
CPU and GPU components. |
| 60 |
|
| 61 |
Each attribute has the following properties: |
| 62 |
- current_value |
| 63 |
- default_value |
| 64 |
- display_name |
| 65 |
- max_value |
| 66 |
- min_value |
| 67 |
- scalar_increment |
| 68 |
- type |
| 69 |
|
| 70 |
The following firmware-attributes are implemented: |
| 71 |
- ppt_pl1_spl: Platform Profile Tracking Sustained Power Limit |
| 72 |
- ppt_pl2_sppt: Platform Profile Tracking Slow Package Power Tracking |
| 73 |
- ppt_pl3_fppt: Platform Profile Tracking Fast Package Power Tracking |
| 74 |
|
| 75 |
LENOVO_FAN_TEST_DATA |
| 76 |
------------------------- |
| 77 |
|
| 78 |
WMI GUID ``B642801B-3D21-45DE-90AE-6E86F164FB21`` |
| 79 |
|
| 80 |
The LENOVO_FAN_TEST_DATA interface provides reference data for self-test of |
| 81 |
cooling fans. |
| 82 |
|
| 83 |
The following HWMON attributes are implemented: |
| 84 |
- fanX_max: maximum RPM |
| 85 |
- fanX_min: minimum RPM |
| 86 |
|
| 87 |
WMI interface description |
| 88 |
========================= |
| 89 |
|
| 90 |
The WMI interface description can be decoded from the embedded binary MOF (bmof) |
| 91 |
data using the `bmfdec <https://github.com/pali/bmfdec>`_ utility: |
| 92 |
|
| 93 |
:: |
| 94 |
|
| 95 |
[WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("LENOVO_OTHER_METHOD class"), guid("{dc2a8805-3a8c-41ba-a6f7-092e0089cd3b}")] |
| 96 |
class LENOVO_OTHER_METHOD { |
| 97 |
[key, read] string InstanceName; |
| 98 |
[read] boolean Active; |
| 99 |
|
| 100 |
[WmiMethodId(17), Implemented, Description("Get Feature Value ")] void GetFeatureValue([in] uint32 IDs, [out] uint32 value); |
| 101 |
[WmiMethodId(18), Implemented, Description("Set Feature Value ")] void SetFeatureValue([in] uint32 IDs, [in] uint32 value); |
| 102 |
[WmiMethodId(19), Implemented, Description("Get Data By Command ")] void GetDataByCommand([in] uint32 IDs, [in] uint32 Command, [out] uint32 DataSize, [out, WmiSizeIs("DataSize")] uint32 Data[]); |
| 103 |
[WmiMethodId(99), Implemented, Description("Get Data By Package for TAC")] void GetDataByPackage([in, Max(40)] uint8 Input[], [out] uint32 DataSize, [out, WmiSizeIs("DataSize")] uint8 Data[]); |
| 104 |
}; |
| 105 |
|
| 106 |
[WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("LENOVO CAPABILITY DATA 00"), guid("{362a3afe-3d96-4665-8530-96dad5bb300e}")] |
| 107 |
class LENOVO_CAPABILITY_DATA_00 { |
| 108 |
[key, read] string InstanceName; |
| 109 |
[read] boolean Active; |
| 110 |
|
| 111 |
[WmiDataId(1), read, Description(" IDs.")] uint32 IDs; |
| 112 |
[WmiDataId(2), read, Description("Capability.")] uint32 Capability; |
| 113 |
[WmiDataId(3), read, Description("Capability Default Value.")] uint32 DefaultValue; |
| 114 |
}; |
| 115 |
|
| 116 |
[WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("LENOVO CAPABILITY DATA 01"), guid("{7a8f5407-cb67-4d6e-b547-39b3be018154}")] |
| 117 |
class LENOVO_CAPABILITY_DATA_01 { |
| 118 |
[key, read] string InstanceName; |
| 119 |
[read] boolean Active; |
| 120 |
|
| 121 |
[WmiDataId(1), read, Description(" IDs.")] uint32 IDs; |
| 122 |
[WmiDataId(2), read, Description("Capability.")] uint32 Capability; |
| 123 |
[WmiDataId(3), read, Description("Default Value.")] uint32 DefaultValue; |
| 124 |
[WmiDataId(4), read, Description("Step.")] uint32 Step; |
| 125 |
[WmiDataId(5), read, Description("Minimum Value.")] uint32 MinValue; |
| 126 |
[WmiDataId(6), read, Description("Maximum Value.")] uint32 MaxValue; |
| 127 |
}; |
| 128 |
|
| 129 |
[WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("LENOVO CAPABILITY DATA 02"), guid("{bbf1f790-6c2f-422b-bc8c-4e7369c7f6ab}")] |
| 130 |
class LENOVO_CAPABILITY_DATA_02 { |
| 131 |
[key, read] string InstanceName; |
| 132 |
[read] boolean Active; |
| 133 |
|
| 134 |
[WmiDataId(1), read, Description(" IDs.")] uint32 IDs; |
| 135 |
[WmiDataId(2), read, Description("Capability.")] uint32 Capability; |
| 136 |
[WmiDataId(3), read, Description("Data Size.")] uint32 DataSize; |
| 137 |
[WmiDataId(4), read, Description("Default Value"), WmiSizeIs("DataSize")] uint8 DefaultValue[]; |
| 138 |
}; |
| 139 |
|
| 140 |
[WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("Definition of Fan Test Data"), guid("{B642801B-3D21-45DE-90AE-6E86F164FB21}")] |
| 141 |
class LENOVO_FAN_TEST_DATA { |
| 142 |
[key, read] string InstanceName; |
| 143 |
[read] boolean Active; |
| 144 |
[WmiDataId(1), read, Description("Mode.")] uint32 NumOfFans; |
| 145 |
[WmiDataId(2), read, Description("Fan ID."), WmiSizeIs("NumOfFans")] uint32 FanId[]; |
| 146 |
[WmiDataId(3), read, Description("Maximum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMaxSpeed[]; |
| 147 |
[WmiDataId(4), read, Description("Minumum Fan Speed."), WmiSizeIs("NumOfFans")] uint32 FanMinSpeed[]; |
| 148 |
}; |