1e8a60aa7SDivya BharathiWhat: /sys/class/firmware-attributes/*/attributes/*/ 2e8a60aa7SDivya BharathiDate: February 2021 3e8a60aa7SDivya BharathiKernelVersion: 5.11 4e8a60aa7SDivya BharathiContact: Divya Bharathi <Divya.Bharathi@Dell.com>, 5e8a60aa7SDivya Bharathi Prasanth KSR <prasanth.ksr@dell.com> 68599a12bSHans de Goede Dell.Client.Kernel@dell.com 7e8a60aa7SDivya BharathiDescription: 8e8a60aa7SDivya Bharathi A sysfs interface for systems management software to enable 9e8a60aa7SDivya Bharathi configuration capability on supported systems. This directory 10e8a60aa7SDivya Bharathi exposes interfaces for interacting with configuration options. 11e8a60aa7SDivya Bharathi 12e8a60aa7SDivya Bharathi Unless otherwise specified in an attribute description all attributes are optional 13e8a60aa7SDivya Bharathi and will accept UTF-8 input. 14e8a60aa7SDivya Bharathi 155b09081fSMauro Carvalho Chehab type: 165b09081fSMauro Carvalho Chehab A file that can be read to obtain the type of attribute. 175b09081fSMauro Carvalho Chehab This attribute is mandatory. 18e8a60aa7SDivya Bharathi 19e8a60aa7SDivya Bharathi The following are known types: 205b09081fSMauro Carvalho Chehab 21e8a60aa7SDivya Bharathi - enumeration: a set of pre-defined valid values 22e8a60aa7SDivya Bharathi - integer: a range of numerical values 23e8a60aa7SDivya Bharathi - string 24e8a60aa7SDivya Bharathi 25e8a60aa7SDivya Bharathi All attribute types support the following values: 26e8a60aa7SDivya Bharathi 275b09081fSMauro Carvalho Chehab current_value: 285b09081fSMauro Carvalho Chehab A file that can be read to obtain the current 29e8a60aa7SDivya Bharathi value of the <attr>. 30e8a60aa7SDivya Bharathi 31e8a60aa7SDivya Bharathi This file can also be written to in order to update the value of a 32e8a60aa7SDivya Bharathi <attr> 33e8a60aa7SDivya Bharathi 34e8a60aa7SDivya Bharathi This attribute is mandatory. 35e8a60aa7SDivya Bharathi 365b09081fSMauro Carvalho Chehab default_value: 375b09081fSMauro Carvalho Chehab A file that can be read to obtain the default 38e8a60aa7SDivya Bharathi value of the <attr> 39e8a60aa7SDivya Bharathi 405b09081fSMauro Carvalho Chehab display_name: 415b09081fSMauro Carvalho Chehab A file that can be read to obtain a user friendly 42e8a60aa7SDivya Bharathi description of the at <attr> 43e8a60aa7SDivya Bharathi 445b09081fSMauro Carvalho Chehab display_name_language_code: 455b09081fSMauro Carvalho Chehab A file that can be read to obtain 46e8a60aa7SDivya Bharathi the IETF language tag corresponding to the 47e8a60aa7SDivya Bharathi "display_name" of the <attr> 48e8a60aa7SDivya Bharathi 49e8a60aa7SDivya Bharathi "enumeration"-type specific properties: 50e8a60aa7SDivya Bharathi 515b09081fSMauro Carvalho Chehab possible_values: 525b09081fSMauro Carvalho Chehab A file that can be read to obtain the possible 53e8a60aa7SDivya Bharathi values of the <attr>. Values are separated using 54e8a60aa7SDivya Bharathi semi-colon (``;``). 55e8a60aa7SDivya Bharathi 56e8a60aa7SDivya Bharathi "integer"-type specific properties: 57e8a60aa7SDivya Bharathi 585b09081fSMauro Carvalho Chehab min_value: 595b09081fSMauro Carvalho Chehab A file that can be read to obtain the lower 60e8a60aa7SDivya Bharathi bound value of the <attr> 61e8a60aa7SDivya Bharathi 625b09081fSMauro Carvalho Chehab max_value: 635b09081fSMauro Carvalho Chehab A file that can be read to obtain the upper 64e8a60aa7SDivya Bharathi bound value of the <attr> 65e8a60aa7SDivya Bharathi 665b09081fSMauro Carvalho Chehab scalar_increment: 675b09081fSMauro Carvalho Chehab A file that can be read to obtain the scalar value used for 68e8a60aa7SDivya Bharathi increments of current_value this attribute accepts. 69e8a60aa7SDivya Bharathi 70e8a60aa7SDivya Bharathi "string"-type specific properties: 71e8a60aa7SDivya Bharathi 725b09081fSMauro Carvalho Chehab max_length: 735b09081fSMauro Carvalho Chehab A file that can be read to obtain the maximum 74e8a60aa7SDivya Bharathi length value of the <attr> 75e8a60aa7SDivya Bharathi 765b09081fSMauro Carvalho Chehab min_length: 775b09081fSMauro Carvalho Chehab A file that can be read to obtain the minimum 78e8a60aa7SDivya Bharathi length value of the <attr> 79e8a60aa7SDivya Bharathi 80e8a60aa7SDivya Bharathi Dell specific class extensions 815b09081fSMauro Carvalho Chehab ------------------------------ 82e8a60aa7SDivya Bharathi 83e8a60aa7SDivya Bharathi On Dell systems the following additional attributes are available: 84e8a60aa7SDivya Bharathi 855b09081fSMauro Carvalho Chehab dell_modifier: 865b09081fSMauro Carvalho Chehab A file that can be read to obtain attribute-level 87e8a60aa7SDivya Bharathi dependency rule. It says an attribute X will become read-only or 88e8a60aa7SDivya Bharathi suppressed, if/if-not attribute Y is configured. 89e8a60aa7SDivya Bharathi 905b09081fSMauro Carvalho Chehab modifier rules can be in following format:: 915b09081fSMauro Carvalho Chehab 92e8a60aa7SDivya Bharathi [ReadOnlyIf:<attribute>=<value>] 93e8a60aa7SDivya Bharathi [ReadOnlyIfNot:<attribute>=<value>] 94e8a60aa7SDivya Bharathi [SuppressIf:<attribute>=<value>] 95e8a60aa7SDivya Bharathi [SuppressIfNot:<attribute>=<value>] 96e8a60aa7SDivya Bharathi 975b09081fSMauro Carvalho Chehab For example:: 985b09081fSMauro Carvalho Chehab 99e8a60aa7SDivya Bharathi AutoOnFri/dell_modifier has value, 100e8a60aa7SDivya Bharathi [SuppressIfNot:AutoOn=SelectDays] 101e8a60aa7SDivya Bharathi 102e8a60aa7SDivya Bharathi This means AutoOnFri will be suppressed in BIOS setup if AutoOn 103e8a60aa7SDivya Bharathi attribute is not "SelectDays" and its value will not be effective 104e8a60aa7SDivya Bharathi through sysfs until this rule is met. 105e8a60aa7SDivya Bharathi 106e8a60aa7SDivya Bharathi Enumeration attributes also support the following: 107e8a60aa7SDivya Bharathi 1085b09081fSMauro Carvalho Chehab dell_value_modifier: 1095b09081fSMauro Carvalho Chehab A file that can be read to obtain value-level dependency. 110e8a60aa7SDivya Bharathi This file is similar to dell_modifier but here, an 111e8a60aa7SDivya Bharathi attribute's current value will be forcefully changed based 112e8a60aa7SDivya Bharathi dependent attributes value. 113e8a60aa7SDivya Bharathi 1145b09081fSMauro Carvalho Chehab dell_value_modifier rules can be in following format:: 1155b09081fSMauro Carvalho Chehab 116e8a60aa7SDivya Bharathi <value>[ForceIf:<attribute>=<value>] 117e8a60aa7SDivya Bharathi <value>[ForceIfNot:<attribute>=<value>] 118e8a60aa7SDivya Bharathi 1195b09081fSMauro Carvalho Chehab For example: 1205b09081fSMauro Carvalho Chehab 121e8a60aa7SDivya Bharathi LegacyOrom/dell_value_modifier has value: 122e8a60aa7SDivya Bharathi Disabled[ForceIf:SecureBoot=Enabled] 1235b09081fSMauro Carvalho Chehab 124e8a60aa7SDivya Bharathi This means LegacyOrom's current value will be forced to 125e8a60aa7SDivya Bharathi "Disabled" in BIOS setup if SecureBoot is Enabled and its 126e8a60aa7SDivya Bharathi value will not be effective through sysfs until this rule is 127e8a60aa7SDivya Bharathi met. 128e8a60aa7SDivya Bharathi 129e8a60aa7SDivya BharathiWhat: /sys/class/firmware-attributes/*/authentication/ 130e8a60aa7SDivya BharathiDate: February 2021 131e8a60aa7SDivya BharathiKernelVersion: 5.11 132e8a60aa7SDivya BharathiContact: Divya Bharathi <Divya.Bharathi@Dell.com>, 133e8a60aa7SDivya Bharathi Prasanth KSR <prasanth.ksr@dell.com> 1348599a12bSHans de Goede Dell.Client.Kernel@dell.com 1355b09081fSMauro Carvalho ChehabDescription: 136e8a60aa7SDivya Bharathi Devices support various authentication mechanisms which can be exposed 137e8a60aa7SDivya Bharathi as a separate configuration object. 138e8a60aa7SDivya Bharathi 139e8a60aa7SDivya Bharathi For example a "BIOS Admin" password and "System" Password can be set, 140e8a60aa7SDivya Bharathi reset or cleared using these attributes. 1415b09081fSMauro Carvalho Chehab 142e8a60aa7SDivya Bharathi - An "Admin" password is used for preventing modification to the BIOS 143e8a60aa7SDivya Bharathi settings. 144e8a60aa7SDivya Bharathi - A "System" password is required to boot a machine. 145e8a60aa7SDivya Bharathi 146e8a60aa7SDivya Bharathi Change in any of these two authentication methods will also generate an 147e8a60aa7SDivya Bharathi uevent KOBJ_CHANGE. 148e8a60aa7SDivya Bharathi 1495b09081fSMauro Carvalho Chehab is_enabled: 1505b09081fSMauro Carvalho Chehab A file that can be read to obtain a 0/1 flag to see if 151e8a60aa7SDivya Bharathi <attr> authentication is enabled. 152e8a60aa7SDivya Bharathi This attribute is mandatory. 153e8a60aa7SDivya Bharathi 1545b09081fSMauro Carvalho Chehab role: 1555b09081fSMauro Carvalho Chehab The type of authentication used. 156e8a60aa7SDivya Bharathi This attribute is mandatory. 1575b09081fSMauro Carvalho Chehab 158e8a60aa7SDivya Bharathi Known types: 1595b09081fSMauro Carvalho Chehab bios-admin: 1605b09081fSMauro Carvalho Chehab Representing BIOS administrator password 1615b09081fSMauro Carvalho Chehab power-on: 1625b09081fSMauro Carvalho Chehab Representing a password required to use 163e8a60aa7SDivya Bharathi the system 164*adca4b68SMark Pearson system-mgmt: 165*adca4b68SMark Pearson Representing System Management password. 166*adca4b68SMark Pearson See Lenovo extensions section for details 167*adca4b68SMark Pearson HDD: 168*adca4b68SMark Pearson Representing HDD password 169*adca4b68SMark Pearson See Lenovo extensions section for details 170*adca4b68SMark Pearson NVMe: 171*adca4b68SMark Pearson Representing NVMe password 172*adca4b68SMark Pearson See Lenovo extensions section for details 173e8a60aa7SDivya Bharathi 1745b09081fSMauro Carvalho Chehab mechanism: 1755b09081fSMauro Carvalho Chehab The means of authentication. This attribute is mandatory. 176e8a60aa7SDivya Bharathi Only supported type currently is "password". 177e8a60aa7SDivya Bharathi 1785b09081fSMauro Carvalho Chehab max_password_length: 1795b09081fSMauro Carvalho Chehab A file that can be read to obtain the 180e8a60aa7SDivya Bharathi maximum length of the Password 181e8a60aa7SDivya Bharathi 1825b09081fSMauro Carvalho Chehab min_password_length: 1835b09081fSMauro Carvalho Chehab A file that can be read to obtain the 184e8a60aa7SDivya Bharathi minimum length of the Password 185e8a60aa7SDivya Bharathi 1865b09081fSMauro Carvalho Chehab current_password: 1875b09081fSMauro Carvalho Chehab A write only value used for privileged access such as 188e8a60aa7SDivya Bharathi setting attributes when a system or admin password is set 189e8a60aa7SDivya Bharathi or resetting to a new password 190e8a60aa7SDivya Bharathi 191e8a60aa7SDivya Bharathi This attribute is mandatory when mechanism == "password". 192e8a60aa7SDivya Bharathi 1935b09081fSMauro Carvalho Chehab new_password: 1945b09081fSMauro Carvalho Chehab A write only value that when used in tandem with 195e8a60aa7SDivya Bharathi current_password will reset a system or admin password. 196e8a60aa7SDivya Bharathi 197e8a60aa7SDivya Bharathi Note, password management is session specific. If Admin password is set, 198e8a60aa7SDivya Bharathi same password must be written into current_password file (required for 199e8a60aa7SDivya Bharathi password-validation) and must be cleared once the session is over. 2005b09081fSMauro Carvalho Chehab For example:: 2015b09081fSMauro Carvalho Chehab 202e8a60aa7SDivya Bharathi echo "password" > current_password 203e8a60aa7SDivya Bharathi echo "disabled" > TouchScreen/current_value 204e8a60aa7SDivya Bharathi echo "" > current_password 205e8a60aa7SDivya Bharathi 206e8a60aa7SDivya Bharathi Drivers may emit a CHANGE uevent when a password is set or unset 207e8a60aa7SDivya Bharathi userspace may check it again. 208e8a60aa7SDivya Bharathi 209a40cd7efSMark Pearson On Dell and Lenovo systems, if Admin password is set, then all BIOS attributes 210e8a60aa7SDivya Bharathi require password validation. 211a40cd7efSMark Pearson On Lenovo systems if you change the Admin password the new password is not active until 212a40cd7efSMark Pearson the next boot. 213a40cd7efSMark Pearson 214a40cd7efSMark Pearson Lenovo specific class extensions 215a40cd7efSMark Pearson ------------------------------ 216a40cd7efSMark Pearson 217a40cd7efSMark Pearson On Lenovo systems the following additional settings are available: 218a40cd7efSMark Pearson 219*adca4b68SMark Pearson role: system-mgmt This gives the same authority as the bios-admin password to control 220*adca4b68SMark Pearson security related features. The authorities allocated can be set via 221*adca4b68SMark Pearson the BIOS menu SMP Access Control Policy 222*adca4b68SMark Pearson 223*adca4b68SMark Pearson role: HDD & NVMe This password is used to unlock access to the drive at boot. Note see 224*adca4b68SMark Pearson 'level' and 'index' extensions below. 225*adca4b68SMark Pearson 226a40cd7efSMark Pearson lenovo_encoding: 227a40cd7efSMark Pearson The encoding method that is used. This can be either "ascii" 228a40cd7efSMark Pearson or "scancode". Default is set to "ascii" 229a40cd7efSMark Pearson 230a40cd7efSMark Pearson lenovo_kbdlang: 231a40cd7efSMark Pearson The keyboard language method that is used. This is generally a 232a40cd7efSMark Pearson two char code (e.g. "us", "fr", "gr") and may vary per platform. 233a40cd7efSMark Pearson Default is set to "us" 234e8a60aa7SDivya Bharathi 235*adca4b68SMark Pearson level: 236*adca4b68SMark Pearson Available for HDD and NVMe authentication to set 'user' or 'master' 237*adca4b68SMark Pearson privilege level. 238*adca4b68SMark Pearson If only the user password is configured then this should be used to 239*adca4b68SMark Pearson unlock the drive at boot. If both master and user passwords are set 240*adca4b68SMark Pearson then either can be used. If a master password is set a user password 241*adca4b68SMark Pearson is required. 242*adca4b68SMark Pearson This attribute defaults to 'user' level 243*adca4b68SMark Pearson 244*adca4b68SMark Pearson index: 245*adca4b68SMark Pearson Used with HDD and NVME authentication to set the drive index 246*adca4b68SMark Pearson that is being referenced (e.g hdd0, hdd1 etc) 247*adca4b68SMark Pearson This attribute defaults to device 0. 248*adca4b68SMark Pearson 249*adca4b68SMark Pearson 250*adca4b68SMark Pearson 251e8a60aa7SDivya BharathiWhat: /sys/class/firmware-attributes/*/attributes/pending_reboot 252e8a60aa7SDivya BharathiDate: February 2021 253e8a60aa7SDivya BharathiKernelVersion: 5.11 254e8a60aa7SDivya BharathiContact: Divya Bharathi <Divya.Bharathi@Dell.com>, 255e8a60aa7SDivya Bharathi Prasanth KSR <prasanth.ksr@dell.com> 2568599a12bSHans de Goede Dell.Client.Kernel@dell.com 257e8a60aa7SDivya BharathiDescription: 258e8a60aa7SDivya Bharathi A read-only attribute reads 1 if a reboot is necessary to apply 259e8a60aa7SDivya Bharathi pending BIOS attribute changes. Also, an uevent_KOBJ_CHANGE is 260e8a60aa7SDivya Bharathi generated when it changes to 1. 261e8a60aa7SDivya Bharathi 2625b09081fSMauro Carvalho Chehab == ========================================= 2635b09081fSMauro Carvalho Chehab 0 All BIOS attributes setting are current 2645b09081fSMauro Carvalho Chehab 1 A reboot is necessary to get pending BIOS 2655b09081fSMauro Carvalho Chehab attribute changes applied 2665b09081fSMauro Carvalho Chehab == ========================================= 267e8a60aa7SDivya Bharathi 268e8a60aa7SDivya Bharathi Note, userspace applications need to follow below steps for efficient 269e8a60aa7SDivya Bharathi BIOS management, 2705b09081fSMauro Carvalho Chehab 271e8a60aa7SDivya Bharathi 1. Check if admin password is set. If yes, follow session method for 272e8a60aa7SDivya Bharathi password management as briefed under authentication section above. 273e8a60aa7SDivya Bharathi 2. Before setting any attribute, check if it has any modifiers 274e8a60aa7SDivya Bharathi or value_modifiers. If yes, incorporate them and then modify 275e8a60aa7SDivya Bharathi attribute. 276e8a60aa7SDivya Bharathi 277e8a60aa7SDivya Bharathi Drivers may emit a CHANGE uevent when this value changes and userspace 278e8a60aa7SDivya Bharathi may check it again. 279e8a60aa7SDivya Bharathi 280e8a60aa7SDivya BharathiWhat: /sys/class/firmware-attributes/*/attributes/reset_bios 281e8a60aa7SDivya BharathiDate: February 2021 282e8a60aa7SDivya BharathiKernelVersion: 5.11 283e8a60aa7SDivya BharathiContact: Divya Bharathi <Divya.Bharathi@Dell.com>, 284e8a60aa7SDivya Bharathi Prasanth KSR <prasanth.ksr@dell.com> 2858599a12bSHans de Goede Dell.Client.Kernel@dell.com 286e8a60aa7SDivya BharathiDescription: 287e8a60aa7SDivya Bharathi This attribute can be used to reset the BIOS Configuration. 288e8a60aa7SDivya Bharathi Specifically, it tells which type of reset BIOS configuration is being 289e8a60aa7SDivya Bharathi requested on the host. 290e8a60aa7SDivya Bharathi 291e8a60aa7SDivya Bharathi Reading from it returns a list of supported options encoded as: 292e8a60aa7SDivya Bharathi 2935b09081fSMauro Carvalho Chehab - 'builtinsafe' (Built in safe configuration profile) 2945b09081fSMauro Carvalho Chehab - 'lastknowngood' (Last known good saved configuration profile) 2955b09081fSMauro Carvalho Chehab - 'factory' (Default factory settings configuration profile) 2965b09081fSMauro Carvalho Chehab - 'custom' (Custom saved configuration profile) 297e8a60aa7SDivya Bharathi 298e8a60aa7SDivya Bharathi The currently selected option is printed in square brackets as 2995b09081fSMauro Carvalho Chehab shown below:: 300e8a60aa7SDivya Bharathi 301e8a60aa7SDivya Bharathi # echo "factory" > /sys/class/firmware-attributes/*/device/attributes/reset_bios 302e8a60aa7SDivya Bharathi # cat /sys/class/firmware-attributes/*/device/attributes/reset_bios 303e8a60aa7SDivya Bharathi # builtinsafe lastknowngood [factory] custom 304e8a60aa7SDivya Bharathi 305e8a60aa7SDivya Bharathi Note that any changes to this attribute requires a reboot 306e8a60aa7SDivya Bharathi for changes to take effect. 307f5bc0157SMark Pearson 308f5bc0157SMark PearsonWhat: /sys/class/firmware-attributes/*/attributes/debug_cmd 309f5bc0157SMark PearsonDate: July 2021 310f5bc0157SMark PearsonKernelVersion: 5.14 311f5bc0157SMark PearsonContact: Mark Pearson <markpearson@lenovo.com> 312f5bc0157SMark PearsonDescription: 313f5bc0157SMark Pearson This write only attribute can be used to send debug commands to the BIOS. 314f5bc0157SMark Pearson This should only be used when recommended by the BIOS vendor. Vendors may 315f5bc0157SMark Pearson use it to enable extra debug attributes or BIOS features for testing purposes. 316f5bc0157SMark Pearson 317f5bc0157SMark Pearson Note that any changes to this attribute requires a reboot for changes to take effect. 318