1.. SPDX-License-Identifier: GPL-2.0-or-later 2 3=========================================================== 4Lenovo WMI Interface Other Mode Driver (lenovo-wmi-other) 5=========================================================== 6 7Introduction 8============ 9Lenovo WMI Other Mode interface is broken up into multiple GUIDs, 10The primary Other Mode interface provides advanced power tuning features 11such as Package Power Tracking (PPT). It is paired with multiple data block 12GUIDs that provide context for the various methods. 13 14 15Other Mode 16---------- 17 18WMI GUID ``DC2A8805-3A8C-41BA-A6F7-092E0089CD3B`` 19 20The Other Mode WMI interface uses the firmware_attributes class to expose 21various WMI attributes provided by the interface in the sysfs. This enables 22CPU and GPU power limit tuning as well as various other attributes for 23devices that fall under the "Gaming Series" of Lenovo devices. Each 24attribute exposed by the Other Mode interface has corresponding 25capability data blocks which allow the driver to probe details about the 26attribute. Each attribute has multiple pages, one for each of the platform 27profiles managed by the Gamezone interface. Attributes are exposed in sysfs 28under the following path: 29 30:: 31 32 /sys/class/firmware-attributes/lenovo-wmi-other/attributes/<attribute>/ 33 34LENOVO_CAPABILITY_DATA_01 35------------------------- 36 37WMI GUID ``7A8F5407-CB67-4D6E-B547-39B3BE018154`` 38 39The LENOVO_CAPABILITY_DATA_01 interface provides information on various 40power limits of integrated CPU and GPU components. 41 42Each attribute has the following properties: 43 - current_value 44 - default_value 45 - display_name 46 - max_value 47 - min_value 48 - scalar_increment 49 - type 50 51The following attributes are implemented: 52 - ppt_pl1_spl: Platform Profile Tracking Sustained Power Limit 53 - ppt_pl2_sppt: Platform Profile Tracking Slow Package Power Tracking 54 - ppt_pl3_fppt: Platform Profile Tracking Fast Package Power Tracking 55 56 57WMI interface description 58========================= 59 60The WMI interface description can be decoded from the embedded binary MOF (bmof) 61data using the `bmfdec <https://github.com/pali/bmfdec>`_ utility: 62 63:: 64 65 [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("LENOVO_OTHER_METHOD class"), guid("{dc2a8805-3a8c-41ba-a6f7-092e0089cd3b}")] 66 class LENOVO_OTHER_METHOD { 67 [key, read] string InstanceName; 68 [read] boolean Active; 69 70 [WmiMethodId(17), Implemented, Description("Get Feature Value ")] void GetFeatureValue([in] uint32 IDs, [out] uint32 value); 71 [WmiMethodId(18), Implemented, Description("Set Feature Value ")] void SetFeatureValue([in] uint32 IDs, [in] uint32 value); 72 [WmiMethodId(19), Implemented, Description("Get Data By Command ")] void GetDataByCommand([in] uint32 IDs, [in] uint32 Command, [out] uint32 DataSize, [out, WmiSizeIs("DataSize")] uint32 Data[]); 73 [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[]); 74 }; 75 76 [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("LENOVO CAPABILITY DATA 00"), guid("{362a3afe-3d96-4665-8530-96dad5bb300e}")] 77 class LENOVO_CAPABILITY_DATA_00 { 78 [key, read] string InstanceName; 79 [read] boolean Active; 80 81 [WmiDataId(1), read, Description(" IDs.")] uint32 IDs; 82 [WmiDataId(2), read, Description("Capability.")] uint32 Capability; 83 [WmiDataId(3), read, Description("Capability Default Value.")] uint32 DefaultValue; 84 }; 85 86 [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("LENOVO CAPABILITY DATA 01"), guid("{7a8f5407-cb67-4d6e-b547-39b3be018154}")] 87 class LENOVO_CAPABILITY_DATA_01 { 88 [key, read] string InstanceName; 89 [read] boolean Active; 90 91 [WmiDataId(1), read, Description(" IDs.")] uint32 IDs; 92 [WmiDataId(2), read, Description("Capability.")] uint32 Capability; 93 [WmiDataId(3), read, Description("Default Value.")] uint32 DefaultValue; 94 [WmiDataId(4), read, Description("Step.")] uint32 Step; 95 [WmiDataId(5), read, Description("Minimum Value.")] uint32 MinValue; 96 [WmiDataId(6), read, Description("Maximum Value.")] uint32 MaxValue; 97 }; 98 99 [WMI, Dynamic, Provider("WmiProv"), Locale("MS\\0x409"), Description("LENOVO CAPABILITY DATA 02"), guid("{bbf1f790-6c2f-422b-bc8c-4e7369c7f6ab}")] 100 class LENOVO_CAPABILITY_DATA_02 { 101 [key, read] string InstanceName; 102 [read] boolean Active; 103 104 [WmiDataId(1), read, Description(" IDs.")] uint32 IDs; 105 [WmiDataId(2), read, Description("Capability.")] uint32 Capability; 106 [WmiDataId(3), read, Description("Data Size.")] uint32 DataSize; 107 [WmiDataId(4), read, Description("Default Value"), WmiSizeIs("DataSize")] uint8 DefaultValue[]; 108 }; 109