sysfs-class-firmware-attributes 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. What: /sys/class/firmware-attributes/*/attributes/*/
  2. Date: February 2021
  3. KernelVersion: 5.11
  4. Contact: Divya Bharathi <[email protected]>,
  5. Prasanth KSR <[email protected]>
  6. [email protected]
  7. Description:
  8. A sysfs interface for systems management software to enable
  9. configuration capability on supported systems. This directory
  10. exposes interfaces for interacting with configuration options.
  11. Unless otherwise specified in an attribute description all attributes are optional
  12. and will accept UTF-8 input.
  13. type:
  14. A file that can be read to obtain the type of attribute.
  15. This attribute is mandatory.
  16. The following are known types:
  17. - enumeration: a set of pre-defined valid values
  18. - integer: a range of numerical values
  19. - string
  20. All attribute types support the following values:
  21. current_value:
  22. A file that can be read to obtain the current
  23. value of the <attr>.
  24. This file can also be written to in order to update the value of a
  25. <attr>
  26. This attribute is mandatory.
  27. default_value:
  28. A file that can be read to obtain the default
  29. value of the <attr>
  30. display_name:
  31. A file that can be read to obtain a user friendly
  32. description of the at <attr>
  33. display_name_language_code:
  34. A file that can be read to obtain
  35. the IETF language tag corresponding to the
  36. "display_name" of the <attr>
  37. "enumeration"-type specific properties:
  38. possible_values:
  39. A file that can be read to obtain the possible
  40. values of the <attr>. Values are separated using
  41. semi-colon (``;``).
  42. "integer"-type specific properties:
  43. min_value:
  44. A file that can be read to obtain the lower
  45. bound value of the <attr>
  46. max_value:
  47. A file that can be read to obtain the upper
  48. bound value of the <attr>
  49. scalar_increment:
  50. A file that can be read to obtain the scalar value used for
  51. increments of current_value this attribute accepts.
  52. "string"-type specific properties:
  53. max_length:
  54. A file that can be read to obtain the maximum
  55. length value of the <attr>
  56. min_length:
  57. A file that can be read to obtain the minimum
  58. length value of the <attr>
  59. Dell specific class extensions
  60. ------------------------------
  61. On Dell systems the following additional attributes are available:
  62. dell_modifier:
  63. A file that can be read to obtain attribute-level
  64. dependency rule. It says an attribute X will become read-only or
  65. suppressed, if/if-not attribute Y is configured.
  66. modifier rules can be in following format::
  67. [ReadOnlyIf:<attribute>=<value>]
  68. [ReadOnlyIfNot:<attribute>=<value>]
  69. [SuppressIf:<attribute>=<value>]
  70. [SuppressIfNot:<attribute>=<value>]
  71. For example::
  72. AutoOnFri/dell_modifier has value,
  73. [SuppressIfNot:AutoOn=SelectDays]
  74. This means AutoOnFri will be suppressed in BIOS setup if AutoOn
  75. attribute is not "SelectDays" and its value will not be effective
  76. through sysfs until this rule is met.
  77. Enumeration attributes also support the following:
  78. dell_value_modifier:
  79. A file that can be read to obtain value-level dependency.
  80. This file is similar to dell_modifier but here, an
  81. attribute's current value will be forcefully changed based
  82. dependent attributes value.
  83. dell_value_modifier rules can be in following format::
  84. <value>[ForceIf:<attribute>=<value>]
  85. <value>[ForceIfNot:<attribute>=<value>]
  86. For example::
  87. LegacyOrom/dell_value_modifier has value:
  88. Disabled[ForceIf:SecureBoot=Enabled]
  89. This means LegacyOrom's current value will be forced to
  90. "Disabled" in BIOS setup if SecureBoot is Enabled and its
  91. value will not be effective through sysfs until this rule is
  92. met.
  93. What: /sys/class/firmware-attributes/*/authentication/
  94. Date: February 2021
  95. KernelVersion: 5.11
  96. Contact: Divya Bharathi <[email protected]>,
  97. Prasanth KSR <[email protected]>
  98. [email protected]
  99. Description:
  100. Devices support various authentication mechanisms which can be exposed
  101. as a separate configuration object.
  102. For example a "BIOS Admin" password and "System" Password can be set,
  103. reset or cleared using these attributes.
  104. - An "Admin" password is used for preventing modification to the BIOS
  105. settings.
  106. - A "System" password is required to boot a machine.
  107. Change in any of these two authentication methods will also generate an
  108. uevent KOBJ_CHANGE.
  109. is_enabled:
  110. A file that can be read to obtain a 0/1 flag to see if
  111. <attr> authentication is enabled.
  112. This attribute is mandatory.
  113. role:
  114. The type of authentication used.
  115. This attribute is mandatory.
  116. Known types:
  117. bios-admin:
  118. Representing BIOS administrator password
  119. power-on:
  120. Representing a password required to use
  121. the system
  122. system-mgmt:
  123. Representing System Management password.
  124. See Lenovo extensions section for details
  125. HDD:
  126. Representing HDD password
  127. See Lenovo extensions section for details
  128. NVMe:
  129. Representing NVMe password
  130. See Lenovo extensions section for details
  131. mechanism:
  132. The means of authentication. This attribute is mandatory.
  133. Only supported type currently is "password".
  134. max_password_length:
  135. A file that can be read to obtain the
  136. maximum length of the Password
  137. min_password_length:
  138. A file that can be read to obtain the
  139. minimum length of the Password
  140. current_password:
  141. A write only value used for privileged access such as
  142. setting attributes when a system or admin password is set
  143. or resetting to a new password
  144. This attribute is mandatory when mechanism == "password".
  145. new_password:
  146. A write only value that when used in tandem with
  147. current_password will reset a system or admin password.
  148. Note, password management is session specific. If Admin password is set,
  149. same password must be written into current_password file (required for
  150. password-validation) and must be cleared once the session is over.
  151. For example::
  152. echo "password" > current_password
  153. echo "disabled" > TouchScreen/current_value
  154. echo "" > current_password
  155. Drivers may emit a CHANGE uevent when a password is set or unset
  156. userspace may check it again.
  157. On Dell and Lenovo systems, if Admin password is set, then all BIOS attributes
  158. require password validation.
  159. On Lenovo systems if you change the Admin password the new password is not active until
  160. the next boot.
  161. Lenovo specific class extensions
  162. --------------------------------
  163. On Lenovo systems the following additional settings are available:
  164. role: system-mgmt This gives the same authority as the bios-admin password to control
  165. security related features. The authorities allocated can be set via
  166. the BIOS menu SMP Access Control Policy
  167. role: HDD & NVMe This password is used to unlock access to the drive at boot. Note see
  168. 'level' and 'index' extensions below.
  169. lenovo_encoding:
  170. The encoding method that is used. This can be either "ascii"
  171. or "scancode". Default is set to "ascii"
  172. lenovo_kbdlang:
  173. The keyboard language method that is used. This is generally a
  174. two char code (e.g. "us", "fr", "gr") and may vary per platform.
  175. Default is set to "us"
  176. level:
  177. Available for HDD and NVMe authentication to set 'user' or 'master'
  178. privilege level.
  179. If only the user password is configured then this should be used to
  180. unlock the drive at boot. If both master and user passwords are set
  181. then either can be used. If a master password is set a user password
  182. is required.
  183. This attribute defaults to 'user' level
  184. index:
  185. Used with HDD and NVME authentication to set the drive index
  186. that is being referenced (e.g hdd0, hdd1 etc)
  187. This attribute defaults to device 0.
  188. certificate, signature, save_signature:
  189. These attributes are used for certificate based authentication. This is
  190. used in conjunction with a signing server as an alternative to password
  191. based authentication.
  192. The user writes to the attribute(s) with a BASE64 encoded string obtained
  193. from the signing server.
  194. The attributes can be displayed to check the stored value.
  195. Some usage examples:
  196. Installing a certificate to enable feature::
  197. echo "supervisor password" > authentication/Admin/current_password
  198. echo "signed certificate" > authentication/Admin/certificate
  199. Updating the installed certificate::
  200. echo "signature" > authentication/Admin/signature
  201. echo "signed certificate" > authentication/Admin/certificate
  202. Removing the installed certificate::
  203. echo "signature" > authentication/Admin/signature
  204. echo "" > authentication/Admin/certificate
  205. Changing a BIOS setting::
  206. echo "signature" > authentication/Admin/signature
  207. echo "save signature" > authentication/Admin/save_signature
  208. echo Enable > attribute/PasswordBeep/current_value
  209. You cannot enable certificate authentication if a supervisor password
  210. has not been set.
  211. Clearing the certificate results in no bios-admin authentication method
  212. being configured allowing anyone to make changes.
  213. After any of these operations the system must reboot for the changes to
  214. take effect.
  215. certificate_thumbprint:
  216. Read only attribute used to display the MD5, SHA1 and SHA256 thumbprints
  217. for the certificate installed in the BIOS.
  218. certificate_to_password:
  219. Write only attribute used to switch from certificate based authentication
  220. back to password based.
  221. Usage::
  222. echo "signature" > authentication/Admin/signature
  223. echo "password" > authentication/Admin/certificate_to_password
  224. What: /sys/class/firmware-attributes/*/attributes/pending_reboot
  225. Date: February 2021
  226. KernelVersion: 5.11
  227. Contact: Divya Bharathi <[email protected]>,
  228. Prasanth KSR <[email protected]>
  229. [email protected]
  230. Description:
  231. A read-only attribute reads 1 if a reboot is necessary to apply
  232. pending BIOS attribute changes. Also, an uevent_KOBJ_CHANGE is
  233. generated when it changes to 1.
  234. == =========================================
  235. 0 All BIOS attributes setting are current
  236. 1 A reboot is necessary to get pending BIOS
  237. attribute changes applied
  238. == =========================================
  239. Note, userspace applications need to follow below steps for efficient
  240. BIOS management,
  241. 1. Check if admin password is set. If yes, follow session method for
  242. password management as briefed under authentication section above.
  243. 2. Before setting any attribute, check if it has any modifiers
  244. or value_modifiers. If yes, incorporate them and then modify
  245. attribute.
  246. Drivers may emit a CHANGE uevent when this value changes and userspace
  247. may check it again.
  248. What: /sys/class/firmware-attributes/*/attributes/reset_bios
  249. Date: February 2021
  250. KernelVersion: 5.11
  251. Contact: Divya Bharathi <[email protected]>,
  252. Prasanth KSR <[email protected]>
  253. [email protected]
  254. Description:
  255. This attribute can be used to reset the BIOS Configuration.
  256. Specifically, it tells which type of reset BIOS configuration is being
  257. requested on the host.
  258. Reading from it returns a list of supported options encoded as:
  259. - 'builtinsafe' (Built in safe configuration profile)
  260. - 'lastknowngood' (Last known good saved configuration profile)
  261. - 'factory' (Default factory settings configuration profile)
  262. - 'custom' (Custom saved configuration profile)
  263. The currently selected option is printed in square brackets as
  264. shown below::
  265. # echo "factory" > /sys/class/firmware-attributes/*/device/attributes/reset_bios
  266. # cat /sys/class/firmware-attributes/*/device/attributes/reset_bios
  267. builtinsafe lastknowngood [factory] custom
  268. Note that any changes to this attribute requires a reboot
  269. for changes to take effect.
  270. What: /sys/class/firmware-attributes/*/attributes/debug_cmd
  271. Date: July 2021
  272. KernelVersion: 5.14
  273. Contact: Mark Pearson <[email protected]>
  274. Description:
  275. This write only attribute can be used to send debug commands to the BIOS.
  276. This should only be used when recommended by the BIOS vendor. Vendors may
  277. use it to enable extra debug attributes or BIOS features for testing purposes.
  278. Note that any changes to this attribute requires a reboot for changes to take effect.