xref: /linux/Documentation/ABI/testing/sysfs-class-firmware-attributes (revision c771600c6af14749609b49565ffb4cac2959710d)
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
2500d4b352SJorge Lopez		HP specific types
2600d4b352SJorge Lopez		-----------------
2700d4b352SJorge Lopez			- ordered-list - a set of ordered list valid values
2800d4b352SJorge Lopez
2900d4b352SJorge Lopez
30e8a60aa7SDivya Bharathi		All attribute types support the following values:
31e8a60aa7SDivya Bharathi
325b09081fSMauro Carvalho Chehab		current_value:
335b09081fSMauro Carvalho Chehab				A file that can be read to obtain the current
34e8a60aa7SDivya Bharathi				value of the <attr>.
35e8a60aa7SDivya Bharathi
36e8a60aa7SDivya Bharathi				This file can also be written to in order to update the value of a
37e8a60aa7SDivya Bharathi				<attr>
38e8a60aa7SDivya Bharathi
39e8a60aa7SDivya Bharathi				This attribute is mandatory.
40e8a60aa7SDivya Bharathi
415b09081fSMauro Carvalho Chehab		default_value:
425b09081fSMauro Carvalho Chehab				A file that can be read to obtain the default
43e8a60aa7SDivya Bharathi				value of the <attr>
44e8a60aa7SDivya Bharathi
455b09081fSMauro Carvalho Chehab		display_name:
465b09081fSMauro Carvalho Chehab				A file that can be read to obtain a user friendly
47e8a60aa7SDivya Bharathi				description of the at <attr>
48e8a60aa7SDivya Bharathi
495b09081fSMauro Carvalho Chehab		display_name_language_code:
505b09081fSMauro Carvalho Chehab						A file that can be read to obtain
51e8a60aa7SDivya Bharathi						the IETF language tag corresponding to the
52e8a60aa7SDivya Bharathi						"display_name" of the <attr>
53e8a60aa7SDivya Bharathi
54e8a60aa7SDivya Bharathi		"enumeration"-type specific properties:
55e8a60aa7SDivya Bharathi
565b09081fSMauro Carvalho Chehab		possible_values:
575b09081fSMauro Carvalho Chehab					A file that can be read to obtain the possible
58e8a60aa7SDivya Bharathi					values of the <attr>. Values are separated using
59e8a60aa7SDivya Bharathi					semi-colon (``;``).
60e8a60aa7SDivya Bharathi
61e8a60aa7SDivya Bharathi		"integer"-type specific properties:
62e8a60aa7SDivya Bharathi
635b09081fSMauro Carvalho Chehab		min_value:
645b09081fSMauro Carvalho Chehab				A file that can be read to obtain the lower
65e8a60aa7SDivya Bharathi				bound value of the <attr>
66e8a60aa7SDivya Bharathi
675b09081fSMauro Carvalho Chehab		max_value:
685b09081fSMauro Carvalho Chehab				A file that can be read to obtain the upper
69e8a60aa7SDivya Bharathi				bound value of the <attr>
70e8a60aa7SDivya Bharathi
715b09081fSMauro Carvalho Chehab		scalar_increment:
725b09081fSMauro Carvalho Chehab					A file that can be read to obtain the scalar value used for
73e8a60aa7SDivya Bharathi					increments of current_value this attribute accepts.
74e8a60aa7SDivya Bharathi
75e8a60aa7SDivya Bharathi		"string"-type specific properties:
76e8a60aa7SDivya Bharathi
775b09081fSMauro Carvalho Chehab		max_length:
785b09081fSMauro Carvalho Chehab				A file that can be read to obtain the maximum
79e8a60aa7SDivya Bharathi				length value of the <attr>
80e8a60aa7SDivya Bharathi
815b09081fSMauro Carvalho Chehab		min_length:
825b09081fSMauro Carvalho Chehab				A file that can be read to obtain the minimum
83e8a60aa7SDivya Bharathi				length value of the <attr>
84e8a60aa7SDivya Bharathi
85e8a60aa7SDivya Bharathi		Dell specific class extensions
865b09081fSMauro Carvalho Chehab		------------------------------
87e8a60aa7SDivya Bharathi
88e8a60aa7SDivya Bharathi		On Dell systems the following additional attributes are available:
89e8a60aa7SDivya Bharathi
905b09081fSMauro Carvalho Chehab		dell_modifier:
915b09081fSMauro Carvalho Chehab				A file that can be read to obtain attribute-level
92e8a60aa7SDivya Bharathi				dependency rule. It says an attribute X will become read-only or
93e8a60aa7SDivya Bharathi				suppressed, if/if-not attribute Y is configured.
94e8a60aa7SDivya Bharathi
955b09081fSMauro Carvalho Chehab				modifier rules can be in following format::
965b09081fSMauro Carvalho Chehab
97e8a60aa7SDivya Bharathi				    [ReadOnlyIf:<attribute>=<value>]
98e8a60aa7SDivya Bharathi				    [ReadOnlyIfNot:<attribute>=<value>]
99e8a60aa7SDivya Bharathi				    [SuppressIf:<attribute>=<value>]
100e8a60aa7SDivya Bharathi				    [SuppressIfNot:<attribute>=<value>]
101e8a60aa7SDivya Bharathi
1025b09081fSMauro Carvalho Chehab				For example::
1035b09081fSMauro Carvalho Chehab
104e8a60aa7SDivya Bharathi				    AutoOnFri/dell_modifier has value,
105e8a60aa7SDivya Bharathi					    [SuppressIfNot:AutoOn=SelectDays]
106e8a60aa7SDivya Bharathi
107e8a60aa7SDivya Bharathi				This means AutoOnFri will be suppressed in BIOS setup if AutoOn
108e8a60aa7SDivya Bharathi				attribute is not "SelectDays" and its value will not be effective
109e8a60aa7SDivya Bharathi				through sysfs until this rule is met.
110e8a60aa7SDivya Bharathi
111e8a60aa7SDivya Bharathi		Enumeration attributes also support the following:
112e8a60aa7SDivya Bharathi
1135b09081fSMauro Carvalho Chehab		dell_value_modifier:
1145b09081fSMauro Carvalho Chehab					A file that can be read to obtain value-level dependency.
115e8a60aa7SDivya Bharathi					This file is similar to dell_modifier but here,	an
116e8a60aa7SDivya Bharathi					attribute's current value will be forcefully changed based
117e8a60aa7SDivya Bharathi					dependent attributes value.
118e8a60aa7SDivya Bharathi
1195b09081fSMauro Carvalho Chehab					dell_value_modifier rules can be in following format::
1205b09081fSMauro Carvalho Chehab
121e8a60aa7SDivya Bharathi					    <value>[ForceIf:<attribute>=<value>]
122e8a60aa7SDivya Bharathi					    <value>[ForceIfNot:<attribute>=<value>]
123e8a60aa7SDivya Bharathi
1249aa64714SHans de Goede					For example::
1255b09081fSMauro Carvalho Chehab
126e8a60aa7SDivya Bharathi					    LegacyOrom/dell_value_modifier has value:
127e8a60aa7SDivya Bharathi						    Disabled[ForceIf:SecureBoot=Enabled]
1285b09081fSMauro Carvalho Chehab
129e8a60aa7SDivya Bharathi					This means LegacyOrom's current value will be forced to
130e8a60aa7SDivya Bharathi					"Disabled" in BIOS setup if SecureBoot is Enabled and its
131e8a60aa7SDivya Bharathi					value will not be effective through sysfs until this rule is
132e8a60aa7SDivya Bharathi					met.
133e8a60aa7SDivya Bharathi
13400d4b352SJorge Lopez		HP specific class extensions
13500d4b352SJorge Lopez		------------------------------
13600d4b352SJorge Lopez
13700d4b352SJorge Lopez		On HP systems the following additional attributes are available:
13800d4b352SJorge Lopez
13900d4b352SJorge Lopez		"ordered-list"-type specific properties:
14000d4b352SJorge Lopez
14100d4b352SJorge Lopez		elements:
14200d4b352SJorge Lopez					A file that can be read to obtain the possible
14300d4b352SJorge Lopez					list of values of the <attr>. Values are separated using
14400d4b352SJorge Lopez					semi-colon (``;``) and listed according to their priority.
14500d4b352SJorge Lopez					An element listed first has the highest priority. Writing
14600d4b352SJorge Lopez					the list in a different order to current_value alters
14700d4b352SJorge Lopez					the priority order for the particular attribute.
14800d4b352SJorge Lopez
149e8a60aa7SDivya BharathiWhat:		/sys/class/firmware-attributes/*/authentication/
150e8a60aa7SDivya BharathiDate:		February 2021
151e8a60aa7SDivya BharathiKernelVersion:	5.11
152e8a60aa7SDivya BharathiContact:	Divya Bharathi <Divya.Bharathi@Dell.com>,
153e8a60aa7SDivya Bharathi		Prasanth KSR <prasanth.ksr@dell.com>
1548599a12bSHans de Goede		Dell.Client.Kernel@dell.com
1555b09081fSMauro Carvalho ChehabDescription:
156e8a60aa7SDivya Bharathi		Devices support various authentication mechanisms which can be exposed
157e8a60aa7SDivya Bharathi		as a separate configuration object.
158e8a60aa7SDivya Bharathi
159e8a60aa7SDivya Bharathi		For example a "BIOS Admin" password and "System" Password can be set,
160e8a60aa7SDivya Bharathi		reset or cleared using these attributes.
1615b09081fSMauro Carvalho Chehab
162e8a60aa7SDivya Bharathi		- An "Admin" password is used for preventing modification to the BIOS
163e8a60aa7SDivya Bharathi		  settings.
164e8a60aa7SDivya Bharathi		- A "System" password is required to boot a machine.
165e8a60aa7SDivya Bharathi
166e8a60aa7SDivya Bharathi		Change in any of these two authentication methods will also generate an
167e8a60aa7SDivya Bharathi		uevent KOBJ_CHANGE.
168e8a60aa7SDivya Bharathi
1695b09081fSMauro Carvalho Chehab		is_enabled:
1705b09081fSMauro Carvalho Chehab					A file that can be read to obtain a 0/1 flag to see if
171e8a60aa7SDivya Bharathi					<attr> authentication is enabled.
172e8a60aa7SDivya Bharathi					This attribute is mandatory.
173e8a60aa7SDivya Bharathi
1745b09081fSMauro Carvalho Chehab		role:
1755b09081fSMauro Carvalho Chehab					The type of authentication used.
176e8a60aa7SDivya Bharathi					This attribute is mandatory.
1775b09081fSMauro Carvalho Chehab
178e8a60aa7SDivya Bharathi					Known types:
1795b09081fSMauro Carvalho Chehab						bios-admin:
1805b09081fSMauro Carvalho Chehab							Representing BIOS administrator password
1815b09081fSMauro Carvalho Chehab						power-on:
1825b09081fSMauro Carvalho Chehab							Representing a password required to use
183e8a60aa7SDivya Bharathi							the system
184adca4b68SMark Pearson						system-mgmt:
185adca4b68SMark Pearson							Representing System Management password.
186adca4b68SMark Pearson							See Lenovo extensions section for details
187adca4b68SMark Pearson						HDD:
188adca4b68SMark Pearson							Representing HDD password
189adca4b68SMark Pearson							See Lenovo extensions section for details
190adca4b68SMark Pearson						NVMe:
191adca4b68SMark Pearson							Representing NVMe password
192adca4b68SMark Pearson							See Lenovo extensions section for details
193e8a60aa7SDivya Bharathi
1945b09081fSMauro Carvalho Chehab		mechanism:
1955b09081fSMauro Carvalho Chehab					The means of authentication.  This attribute is mandatory.
196c7842e69SMark Pearson					Supported types are "password" or "certificate".
197e8a60aa7SDivya Bharathi
1985b09081fSMauro Carvalho Chehab		max_password_length:
1995b09081fSMauro Carvalho Chehab					A file that can be read to obtain the
200e8a60aa7SDivya Bharathi					maximum length of the Password
201e8a60aa7SDivya Bharathi
2025b09081fSMauro Carvalho Chehab		min_password_length:
2035b09081fSMauro Carvalho Chehab					A file that can be read to obtain the
204e8a60aa7SDivya Bharathi					minimum length of the Password
205e8a60aa7SDivya Bharathi
2065b09081fSMauro Carvalho Chehab		current_password:
2075b09081fSMauro Carvalho Chehab					A write only value used for privileged access such as
208e8a60aa7SDivya Bharathi					setting	attributes when a system or admin password is set
209e8a60aa7SDivya Bharathi					or resetting to a new password
210e8a60aa7SDivya Bharathi
211e8a60aa7SDivya Bharathi					This attribute is mandatory when mechanism == "password".
212e8a60aa7SDivya Bharathi
2135b09081fSMauro Carvalho Chehab		new_password:
2145b09081fSMauro Carvalho Chehab					A write only value that when used in tandem with
215e8a60aa7SDivya Bharathi					current_password will reset a system or admin password.
216e8a60aa7SDivya Bharathi
217e8a60aa7SDivya Bharathi		Note, password management is session specific. If Admin password is set,
218e8a60aa7SDivya Bharathi		same password must be written into current_password file (required for
219e8a60aa7SDivya Bharathi		password-validation) and must be cleared once the session is over.
2205b09081fSMauro Carvalho Chehab		For example::
2215b09081fSMauro Carvalho Chehab
222e8a60aa7SDivya Bharathi			echo "password" > current_password
223e8a60aa7SDivya Bharathi			echo "disabled" > TouchScreen/current_value
224e8a60aa7SDivya Bharathi			echo "" > current_password
225e8a60aa7SDivya Bharathi
226e8a60aa7SDivya Bharathi		Drivers may emit a CHANGE uevent when a password is set or unset
227e8a60aa7SDivya Bharathi		userspace may check it again.
228e8a60aa7SDivya Bharathi
22900d4b352SJorge Lopez		On Dell, Lenovo and HP systems, if Admin password is set, then all BIOS attributes
230e8a60aa7SDivya Bharathi		require password validation.
231a40cd7efSMark Pearson		On Lenovo systems if you change the Admin password the new password is not active until
232a40cd7efSMark Pearson		the next boot.
233a40cd7efSMark Pearson
234a40cd7efSMark Pearson		Lenovo specific class extensions
2359aa64714SHans de Goede		--------------------------------
236a40cd7efSMark Pearson
237a40cd7efSMark Pearson		On Lenovo systems the following additional settings are available:
238a40cd7efSMark Pearson
239adca4b68SMark Pearson		role: system-mgmt	This gives the same authority as the bios-admin password to control
240adca4b68SMark Pearson					security related features. The authorities allocated can be set via
241adca4b68SMark Pearson					the BIOS menu SMP Access Control Policy
242adca4b68SMark Pearson
243adca4b68SMark Pearson		role: HDD & NVMe	This password is used to unlock access to the drive at boot. Note see
244adca4b68SMark Pearson					'level' and 'index' extensions below.
245adca4b68SMark Pearson
246a40cd7efSMark Pearson		lenovo_encoding:
247a40cd7efSMark Pearson					The encoding method that is used. This can be either "ascii"
248a40cd7efSMark Pearson					or "scancode". Default is set to "ascii"
249a40cd7efSMark Pearson
250a40cd7efSMark Pearson		lenovo_kbdlang:
251a40cd7efSMark Pearson					The keyboard language method that is used. This is generally a
252a40cd7efSMark Pearson					two char code (e.g. "us", "fr", "gr") and may vary per platform.
253a40cd7efSMark Pearson					Default is set to "us"
254e8a60aa7SDivya Bharathi
255adca4b68SMark Pearson		level:
256adca4b68SMark Pearson					Available for HDD and NVMe authentication to set 'user' or 'master'
257adca4b68SMark Pearson					privilege level.
258adca4b68SMark Pearson					If only the user password is configured then this should be used to
259adca4b68SMark Pearson					unlock the drive at boot. If both master and user passwords are set
260adca4b68SMark Pearson					then either can be used. If a master password is set a user password
261adca4b68SMark Pearson					is required.
262adca4b68SMark Pearson					This attribute defaults to 'user' level
263adca4b68SMark Pearson
264adca4b68SMark Pearson		index:
265adca4b68SMark Pearson					Used with HDD and NVME authentication to set the drive index
2663206001fSMark Pearson					that is being referenced (e.g hdd1, hdd2 etc)
2673206001fSMark Pearson					This attribute defaults to device 1.
268adca4b68SMark Pearson
26945440a1dSHans de Goede		certificate, signature, save_signature:
27006384573SMark Pearson					These attributes are used for certificate based authentication. This is
27106384573SMark Pearson					used in conjunction with a signing server as an alternative to password
27206384573SMark Pearson					based authentication.
27306384573SMark Pearson					The user writes to the attribute(s) with a BASE64 encoded string obtained
27406384573SMark Pearson					from the signing server.
27506384573SMark Pearson					The attributes can be displayed to check the stored value.
27606384573SMark Pearson
27706384573SMark Pearson					Some usage examples:
27806384573SMark Pearson
27945440a1dSHans de Goede						Installing a certificate to enable feature::
28006384573SMark Pearson
28145440a1dSHans de Goede							echo "supervisor password" > authentication/Admin/current_password
28245440a1dSHans de Goede							echo "signed certificate" > authentication/Admin/certificate
28306384573SMark Pearson
28445440a1dSHans de Goede						Updating the installed certificate::
28545440a1dSHans de Goede
28645440a1dSHans de Goede							echo "signature" > authentication/Admin/signature
28745440a1dSHans de Goede							echo "signed certificate" > authentication/Admin/certificate
28845440a1dSHans de Goede
28945440a1dSHans de Goede						Removing the installed certificate::
29045440a1dSHans de Goede
29145440a1dSHans de Goede							echo "signature" > authentication/Admin/signature
29245440a1dSHans de Goede							echo "" > authentication/Admin/certificate
29345440a1dSHans de Goede
29445440a1dSHans de Goede						Changing a BIOS setting::
29545440a1dSHans de Goede
29645440a1dSHans de Goede							echo "signature" > authentication/Admin/signature
29745440a1dSHans de Goede							echo "save signature" > authentication/Admin/save_signature
29806384573SMark Pearson							echo Enable > attribute/PasswordBeep/current_value
29906384573SMark Pearson
30006384573SMark Pearson					You cannot enable certificate authentication if a supervisor password
30106384573SMark Pearson					has not been set.
30206384573SMark Pearson					Clearing the certificate results in no bios-admin authentication method
30306384573SMark Pearson					being configured allowing anyone to make changes.
30406384573SMark Pearson					After any of these operations the system must reboot for the changes to
30506384573SMark Pearson					take effect.
306*5dcb5ef1SMark Pearson					Admin and System certificates are supported from 2025 systems onward.
30706384573SMark Pearson
30806384573SMark Pearson		certificate_thumbprint:
30906384573SMark Pearson					Read only attribute used to display the MD5, SHA1 and SHA256 thumbprints
31006384573SMark Pearson					for the certificate installed in the BIOS.
31106384573SMark Pearson
31206384573SMark Pearson		certificate_to_password:
31306384573SMark Pearson					Write only attribute used to switch from certificate based authentication
31406384573SMark Pearson					back to password based.
31545440a1dSHans de Goede					Usage::
31645440a1dSHans de Goede
31745440a1dSHans de Goede						echo "signature" > authentication/Admin/signature
31845440a1dSHans de Goede						echo "password" > authentication/Admin/certificate_to_password
319adca4b68SMark Pearson
32000d4b352SJorge Lopez		HP specific class extensions
32100d4b352SJorge Lopez		--------------------------------
32200d4b352SJorge Lopez
32300d4b352SJorge Lopez		On HP systems the following additional settings are available:
32400d4b352SJorge Lopez
32500d4b352SJorge Lopez		role: enhanced-bios-auth:
32600d4b352SJorge Lopez					This role is specific to Secure Platform Management (SPM) attribute.
32700d4b352SJorge Lopez					It requires configuring an endorsement (kek) and signing certificate (sk).
32800d4b352SJorge Lopez
329adca4b68SMark Pearson
330e8a60aa7SDivya BharathiWhat:		/sys/class/firmware-attributes/*/attributes/pending_reboot
331e8a60aa7SDivya BharathiDate:		February 2021
332e8a60aa7SDivya BharathiKernelVersion:	5.11
333e8a60aa7SDivya BharathiContact:	Divya Bharathi <Divya.Bharathi@Dell.com>,
334e8a60aa7SDivya Bharathi		Prasanth KSR <prasanth.ksr@dell.com>
3358599a12bSHans de Goede		Dell.Client.Kernel@dell.com
336e8a60aa7SDivya BharathiDescription:
337e8a60aa7SDivya Bharathi		A read-only attribute reads 1 if a reboot is necessary to apply
338e8a60aa7SDivya Bharathi		pending BIOS attribute changes. Also, an uevent_KOBJ_CHANGE is
339e8a60aa7SDivya Bharathi		generated when it changes to 1.
340e8a60aa7SDivya Bharathi
3415b09081fSMauro Carvalho Chehab			==	=========================================
3425b09081fSMauro Carvalho Chehab			0	All BIOS attributes setting are current
3435b09081fSMauro Carvalho Chehab			1	A reboot is necessary to get pending BIOS
3445b09081fSMauro Carvalho Chehab				attribute changes applied
3455b09081fSMauro Carvalho Chehab			==	=========================================
346e8a60aa7SDivya Bharathi
347e8a60aa7SDivya Bharathi		Note, userspace applications need to follow below steps for efficient
348e8a60aa7SDivya Bharathi		BIOS management,
3495b09081fSMauro Carvalho Chehab
350e8a60aa7SDivya Bharathi		1.	Check if admin password is set. If yes, follow session method for
351e8a60aa7SDivya Bharathi			password management as briefed under authentication section above.
352e8a60aa7SDivya Bharathi		2.	Before setting any attribute, check if it has any modifiers
353e8a60aa7SDivya Bharathi			or value_modifiers. If yes, incorporate them and then modify
354e8a60aa7SDivya Bharathi			attribute.
355e8a60aa7SDivya Bharathi
356e8a60aa7SDivya Bharathi		Drivers may emit a CHANGE uevent when this value changes and userspace
357e8a60aa7SDivya Bharathi		may check it again.
358e8a60aa7SDivya Bharathi
359e8a60aa7SDivya BharathiWhat:		/sys/class/firmware-attributes/*/attributes/reset_bios
360e8a60aa7SDivya BharathiDate:		February 2021
361e8a60aa7SDivya BharathiKernelVersion:	5.11
362e8a60aa7SDivya BharathiContact:	Divya Bharathi <Divya.Bharathi@Dell.com>,
363e8a60aa7SDivya Bharathi		Prasanth KSR <prasanth.ksr@dell.com>
3648599a12bSHans de Goede		Dell.Client.Kernel@dell.com
365e8a60aa7SDivya BharathiDescription:
366e8a60aa7SDivya Bharathi		This attribute can be used to reset the BIOS Configuration.
367e8a60aa7SDivya Bharathi		Specifically, it tells which type of reset BIOS configuration is being
368e8a60aa7SDivya Bharathi		requested on the host.
369e8a60aa7SDivya Bharathi
370e8a60aa7SDivya Bharathi		Reading from it returns a list of supported options encoded as:
371e8a60aa7SDivya Bharathi
3725b09081fSMauro Carvalho Chehab			- 'builtinsafe' (Built in safe configuration profile)
3735b09081fSMauro Carvalho Chehab			- 'lastknowngood' (Last known good saved configuration profile)
3745b09081fSMauro Carvalho Chehab			- 'factory' (Default factory settings configuration profile)
3755b09081fSMauro Carvalho Chehab			- 'custom' (Custom saved configuration profile)
376e8a60aa7SDivya Bharathi
377e8a60aa7SDivya Bharathi		The currently selected option is printed in square brackets as
3785b09081fSMauro Carvalho Chehab		shown below::
379e8a60aa7SDivya Bharathi
380e8a60aa7SDivya Bharathi		    # echo "factory" > /sys/class/firmware-attributes/*/device/attributes/reset_bios
381e8a60aa7SDivya Bharathi		    # cat /sys/class/firmware-attributes/*/device/attributes/reset_bios
3829aa64714SHans de Goede		    builtinsafe lastknowngood [factory] custom
383e8a60aa7SDivya Bharathi
384e8a60aa7SDivya Bharathi		Note that any changes to this attribute requires a reboot
385e8a60aa7SDivya Bharathi		for changes to take effect.
386f5bc0157SMark Pearson
387318d9784SMark PearsonWhat:		/sys/class/firmware-attributes/*/attributes/save_settings
388318d9784SMark PearsonDate:		August 2023
389318d9784SMark PearsonKernelVersion:	6.6
390318d9784SMark PearsonContact:	Mark Pearson <mpearson-lenovo@squebb.ca>
391318d9784SMark PearsonDescription:
392318d9784SMark Pearson		On Lenovo platforms there is a limitation in the number of times an attribute can be
393318d9784SMark Pearson		saved. This is an architectural limitation and it limits the number of attributes
394318d9784SMark Pearson		that can be modified to 48.
395318d9784SMark Pearson		A solution for this is instead of the attribute being saved after every modification,
396318d9784SMark Pearson		to allow a user to bulk set the attributes, and then trigger a final save. This allows
397318d9784SMark Pearson		unlimited attributes.
398318d9784SMark Pearson
399318d9784SMark Pearson		Read the attribute to check what save mode is enabled (single or bulk).
400318d9784SMark Pearson		E.g:
401318d9784SMark Pearson		# cat /sys/class/firmware-attributes/thinklmi/attributes/save_settings
402318d9784SMark Pearson		single
403318d9784SMark Pearson
404318d9784SMark Pearson		Write the attribute with 'bulk' to enable bulk save mode.
405318d9784SMark Pearson		Write the attribute with 'single' to enable saving, after every attribute set.
406318d9784SMark Pearson		The default setting is single mode.
407318d9784SMark Pearson		E.g:
408318d9784SMark Pearson		# echo bulk > /sys/class/firmware-attributes/thinklmi/attributes/save_settings
409318d9784SMark Pearson
410318d9784SMark Pearson		When in bulk mode write 'save' to trigger a save of all currently modified attributes.
411318d9784SMark Pearson		Note, once a save has been triggered, in bulk mode, attributes can no longer be set and
412318d9784SMark Pearson		will return a permissions error. This is to prevent users hitting the 48+ save limitation
413318d9784SMark Pearson		(which requires entering the BIOS to clear the error condition)
414318d9784SMark Pearson		E.g:
415318d9784SMark Pearson		# echo save > /sys/class/firmware-attributes/thinklmi/attributes/save_settings
416318d9784SMark Pearson
417f5bc0157SMark PearsonWhat:		/sys/class/firmware-attributes/*/attributes/debug_cmd
418f5bc0157SMark PearsonDate:		July 2021
419f5bc0157SMark PearsonKernelVersion:	5.14
420f5bc0157SMark PearsonContact:	Mark Pearson <markpearson@lenovo.com>
421f5bc0157SMark PearsonDescription:
422f5bc0157SMark Pearson		This write only attribute can be used to send debug commands to the BIOS.
423f5bc0157SMark Pearson		This should only be used when recommended by the BIOS vendor. Vendors may
424f5bc0157SMark Pearson		use it to enable extra debug attributes or BIOS features for testing purposes.
425f5bc0157SMark Pearson
426f5bc0157SMark Pearson		Note that any changes to this attribute requires a reboot for changes to take effect.
42700d4b352SJorge Lopez
42800d4b352SJorge Lopez
42900d4b352SJorge Lopez		HP specific class extensions - Secure Platform Manager (SPM)
43000d4b352SJorge Lopez		--------------------------------
43100d4b352SJorge Lopez
43200d4b352SJorge LopezWhat:		/sys/class/firmware-attributes/*/authentication/SPM/kek
43300d4b352SJorge LopezDate:		March 2023
43400d4b352SJorge LopezKernelVersion:	5.18
43500d4b352SJorge LopezContact:	"Jorge Lopez" <jorge.lopez2@hp.com>
43600d4b352SJorge LopezDescription:
43700d4b352SJorge Lopez		'kek' Key-Encryption-Key is a write-only file that can be used to configure the
43800d4b352SJorge Lopez		RSA public key that will be used by the BIOS to verify
43900d4b352SJorge Lopez		signatures when setting the signing key.  When written,
44000d4b352SJorge Lopez		the bytes should correspond to the KEK certificate
44100d4b352SJorge Lopez		(x509 .DER format containing an OU).  The size of the
44200d4b352SJorge Lopez		certificate must be less than or equal to 4095 bytes.
44300d4b352SJorge Lopez
44400d4b352SJorge LopezWhat:		/sys/class/firmware-attributes/*/authentication/SPM/sk
44500d4b352SJorge LopezDate:		March 2023
44600d4b352SJorge LopezKernelVersion:	5.18
44700d4b352SJorge LopezContact:	"Jorge Lopez" <jorge.lopez2@hp.com>
44800d4b352SJorge LopezDescription:
44900d4b352SJorge Lopez		'sk' Signature Key is a write-only file that can be used to configure the RSA
45000d4b352SJorge Lopez		public key that will be used by the BIOS to verify signatures
45100d4b352SJorge Lopez		when configuring BIOS settings and security features.  When
45200d4b352SJorge Lopez		written, the bytes should correspond to the modulus of the
45300d4b352SJorge Lopez		public key.  The exponent is assumed to be 0x10001.
45400d4b352SJorge Lopez
45500d4b352SJorge LopezWhat:		/sys/class/firmware-attributes/*/authentication/SPM/status
45600d4b352SJorge LopezDate:		March 2023
45700d4b352SJorge LopezKernelVersion:	5.18
45800d4b352SJorge LopezContact:	"Jorge Lopez" <jorge.lopez2@hp.com>
45900d4b352SJorge LopezDescription:
46000d4b352SJorge Lopez		'status' is a read-only file that returns ASCII text in JSON format reporting
46100d4b352SJorge Lopez		the status information.
46200d4b352SJorge Lopez
46300d4b352SJorge Lopez		  "State": "not provisioned | provisioned | provisioning in progress",
46400d4b352SJorge Lopez		  "Version": "Major.Minor",
46500d4b352SJorge Lopez		  "Nonce": <16-bit unsigned number display in base 10>,
46600d4b352SJorge Lopez		  "FeaturesInUse": <16-bit unsigned number display in base 10>,
46700d4b352SJorge Lopez		  "EndorsementKeyMod": "<256 bytes in base64>",
46800d4b352SJorge Lopez		  "SigningKeyMod": "<256 bytes in base64>"
46900d4b352SJorge Lopez
47000d4b352SJorge LopezWhat:		/sys/class/firmware-attributes/*/attributes/Sure_Start/audit_log_entries
47100d4b352SJorge LopezDate:		March 2023
47200d4b352SJorge LopezKernelVersion:	5.18
47300d4b352SJorge LopezContact:	"Jorge Lopez" <jorge.lopez2@hp.com>
47400d4b352SJorge LopezDescription:
47500d4b352SJorge Lopez		'audit_log_entries' is a read-only file that returns the events in the log.
47600d4b352SJorge Lopez
47700d4b352SJorge Lopez			Audit log entry format
47800d4b352SJorge Lopez
47900d4b352SJorge Lopez			Byte 0-15:   Requested Audit Log entry  (Each Audit log is 16 bytes)
48000d4b352SJorge Lopez			Byte 16-127: Unused
48100d4b352SJorge Lopez
48200d4b352SJorge LopezWhat:		/sys/class/firmware-attributes/*/attributes/Sure_Start/audit_log_entry_count
48300d4b352SJorge LopezDate:		March 2023
48400d4b352SJorge LopezKernelVersion:	5.18
48500d4b352SJorge LopezContact:	"Jorge Lopez" <jorge.lopez2@hp.com>
48600d4b352SJorge LopezDescription:
48700d4b352SJorge Lopez		'audit_log_entry_count' is a read-only file that returns the number of existing
48800d4b352SJorge Lopez		audit log events available to be read. Values are separated using comma. (``,``)
48900d4b352SJorge Lopez
49000d4b352SJorge Lopez			[No of entries],[log entry size],[Max number of entries supported]
49100d4b352SJorge Lopez
49200d4b352SJorge Lopez		log entry size identifies audit log size for the current BIOS version.
49300d4b352SJorge Lopez		The current size is 16 bytes but it can be up to 128 bytes long in future BIOS
49400d4b352SJorge Lopez		versions.
495