xref: /linux/Documentation/ABI/testing/sysfs-class-firmware-attributes (revision 5b09081f4c5c7159cb3789f35bb82bd9d32061c9)
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		Mario Limonciello <mario.limonciello@dell.com>,
6e8a60aa7SDivya Bharathi		Prasanth KSR <prasanth.ksr@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
15*5b09081fSMauro Carvalho Chehab		type:
16*5b09081fSMauro Carvalho Chehab		    A file that can be read to obtain the type of attribute.
17*5b09081fSMauro Carvalho Chehab		    This attribute is mandatory.
18e8a60aa7SDivya Bharathi
19e8a60aa7SDivya Bharathi		The following are known types:
20*5b09081fSMauro 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
27*5b09081fSMauro Carvalho Chehab		current_value:
28*5b09081fSMauro 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
36*5b09081fSMauro Carvalho Chehab		default_value:
37*5b09081fSMauro Carvalho Chehab				A file that can be read to obtain the default
38e8a60aa7SDivya Bharathi				value of the <attr>
39e8a60aa7SDivya Bharathi
40*5b09081fSMauro Carvalho Chehab		display_name:
41*5b09081fSMauro Carvalho Chehab				A file that can be read to obtain a user friendly
42e8a60aa7SDivya Bharathi				description of the at <attr>
43e8a60aa7SDivya Bharathi
44*5b09081fSMauro Carvalho Chehab		display_name_language_code:
45*5b09081fSMauro 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
51*5b09081fSMauro Carvalho Chehab		possible_values:
52*5b09081fSMauro 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
58*5b09081fSMauro Carvalho Chehab		min_value:
59*5b09081fSMauro Carvalho Chehab				A file that can be read to obtain the lower
60e8a60aa7SDivya Bharathi				bound value of the <attr>
61e8a60aa7SDivya Bharathi
62*5b09081fSMauro Carvalho Chehab		max_value:
63*5b09081fSMauro Carvalho Chehab				A file that can be read to obtain the upper
64e8a60aa7SDivya Bharathi				bound value of the <attr>
65e8a60aa7SDivya Bharathi
66*5b09081fSMauro Carvalho Chehab		scalar_increment:
67*5b09081fSMauro 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
72*5b09081fSMauro Carvalho Chehab		max_length:
73*5b09081fSMauro Carvalho Chehab				A file that can be read to obtain the maximum
74e8a60aa7SDivya Bharathi				length value of the <attr>
75e8a60aa7SDivya Bharathi
76*5b09081fSMauro Carvalho Chehab		min_length:
77*5b09081fSMauro 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
81*5b09081fSMauro Carvalho Chehab		------------------------------
82e8a60aa7SDivya Bharathi
83e8a60aa7SDivya Bharathi		On Dell systems the following additional attributes are available:
84e8a60aa7SDivya Bharathi
85*5b09081fSMauro Carvalho Chehab		dell_modifier:
86*5b09081fSMauro 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
90*5b09081fSMauro Carvalho Chehab				modifier rules can be in following format::
91*5b09081fSMauro Carvalho Chehab
92e8a60aa7SDivya Bharathi				    [ReadOnlyIf:<attribute>=<value>]
93e8a60aa7SDivya Bharathi				    [ReadOnlyIfNot:<attribute>=<value>]
94e8a60aa7SDivya Bharathi				    [SuppressIf:<attribute>=<value>]
95e8a60aa7SDivya Bharathi				    [SuppressIfNot:<attribute>=<value>]
96e8a60aa7SDivya Bharathi
97*5b09081fSMauro Carvalho Chehab				For example::
98*5b09081fSMauro 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
108*5b09081fSMauro Carvalho Chehab		dell_value_modifier:
109*5b09081fSMauro 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
114*5b09081fSMauro Carvalho Chehab					dell_value_modifier rules can be in following format::
115*5b09081fSMauro Carvalho Chehab
116e8a60aa7SDivya Bharathi					    <value>[ForceIf:<attribute>=<value>]
117e8a60aa7SDivya Bharathi					    <value>[ForceIfNot:<attribute>=<value>]
118e8a60aa7SDivya Bharathi
119*5b09081fSMauro Carvalho Chehab					For example:
120*5b09081fSMauro Carvalho Chehab
121e8a60aa7SDivya Bharathi					    LegacyOrom/dell_value_modifier has value:
122e8a60aa7SDivya Bharathi						    Disabled[ForceIf:SecureBoot=Enabled]
123*5b09081fSMauro 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		Mario Limonciello <mario.limonciello@dell.com>,
134e8a60aa7SDivya Bharathi		Prasanth KSR <prasanth.ksr@dell.com>
135*5b09081fSMauro 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.
141*5b09081fSMauro 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
149*5b09081fSMauro Carvalho Chehab		is_enabled:
150*5b09081fSMauro 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
154*5b09081fSMauro Carvalho Chehab		role:
155*5b09081fSMauro Carvalho Chehab					The type of authentication used.
156e8a60aa7SDivya Bharathi					This attribute is mandatory.
157*5b09081fSMauro Carvalho Chehab
158e8a60aa7SDivya Bharathi					Known types:
159*5b09081fSMauro Carvalho Chehab						bios-admin:
160*5b09081fSMauro Carvalho Chehab							Representing BIOS administrator password
161*5b09081fSMauro Carvalho Chehab						power-on:
162*5b09081fSMauro Carvalho Chehab							Representing a password required to use
163e8a60aa7SDivya Bharathi							the system
164e8a60aa7SDivya Bharathi
165*5b09081fSMauro Carvalho Chehab		mechanism:
166*5b09081fSMauro Carvalho Chehab					The means of authentication.  This attribute is mandatory.
167e8a60aa7SDivya Bharathi					Only supported type currently is "password".
168e8a60aa7SDivya Bharathi
169*5b09081fSMauro Carvalho Chehab		max_password_length:
170*5b09081fSMauro Carvalho Chehab					A file that can be read to obtain the
171e8a60aa7SDivya Bharathi					maximum length of the Password
172e8a60aa7SDivya Bharathi
173*5b09081fSMauro Carvalho Chehab		min_password_length:
174*5b09081fSMauro Carvalho Chehab					A file that can be read to obtain the
175e8a60aa7SDivya Bharathi					minimum length of the Password
176e8a60aa7SDivya Bharathi
177*5b09081fSMauro Carvalho Chehab		current_password:
178*5b09081fSMauro Carvalho Chehab					A write only value used for privileged access such as
179e8a60aa7SDivya Bharathi					setting	attributes when a system or admin password is set
180e8a60aa7SDivya Bharathi					or resetting to a new password
181e8a60aa7SDivya Bharathi
182e8a60aa7SDivya Bharathi					This attribute is mandatory when mechanism == "password".
183e8a60aa7SDivya Bharathi
184*5b09081fSMauro Carvalho Chehab		new_password:
185*5b09081fSMauro Carvalho Chehab					A write only value that when used in tandem with
186e8a60aa7SDivya Bharathi					current_password will reset a system or admin password.
187e8a60aa7SDivya Bharathi
188e8a60aa7SDivya Bharathi		Note, password management is session specific. If Admin password is set,
189e8a60aa7SDivya Bharathi		same password must be written into current_password file (required for
190e8a60aa7SDivya Bharathi		password-validation) and must be cleared once the session is over.
191*5b09081fSMauro Carvalho Chehab		For example::
192*5b09081fSMauro Carvalho Chehab
193e8a60aa7SDivya Bharathi			echo "password" > current_password
194e8a60aa7SDivya Bharathi			echo "disabled" > TouchScreen/current_value
195e8a60aa7SDivya Bharathi			echo "" > current_password
196e8a60aa7SDivya Bharathi
197e8a60aa7SDivya Bharathi		Drivers may emit a CHANGE uevent when a password is set or unset
198e8a60aa7SDivya Bharathi		userspace may check it again.
199e8a60aa7SDivya Bharathi
200e8a60aa7SDivya Bharathi		On Dell systems, if Admin password is set, then all BIOS attributes
201e8a60aa7SDivya Bharathi		require password validation.
202e8a60aa7SDivya Bharathi
203e8a60aa7SDivya BharathiWhat:		/sys/class/firmware-attributes/*/attributes/pending_reboot
204e8a60aa7SDivya BharathiDate:		February 2021
205e8a60aa7SDivya BharathiKernelVersion:	5.11
206e8a60aa7SDivya BharathiContact:	Divya Bharathi <Divya.Bharathi@Dell.com>,
207e8a60aa7SDivya Bharathi		Mario Limonciello <mario.limonciello@dell.com>,
208e8a60aa7SDivya Bharathi		Prasanth KSR <prasanth.ksr@dell.com>
209e8a60aa7SDivya BharathiDescription:
210e8a60aa7SDivya Bharathi		A read-only attribute reads 1 if a reboot is necessary to apply
211e8a60aa7SDivya Bharathi		pending BIOS attribute changes. Also, an uevent_KOBJ_CHANGE is
212e8a60aa7SDivya Bharathi		generated when it changes to 1.
213e8a60aa7SDivya Bharathi
214*5b09081fSMauro Carvalho Chehab			==	=========================================
215*5b09081fSMauro Carvalho Chehab			0	All BIOS attributes setting are current
216*5b09081fSMauro Carvalho Chehab			1	A reboot is necessary to get pending BIOS
217*5b09081fSMauro Carvalho Chehab			        attribute changes applied
218*5b09081fSMauro Carvalho Chehab			==	=========================================
219e8a60aa7SDivya Bharathi
220e8a60aa7SDivya Bharathi		Note, userspace applications need to follow below steps for efficient
221e8a60aa7SDivya Bharathi		BIOS management,
222*5b09081fSMauro Carvalho Chehab
223e8a60aa7SDivya Bharathi		1.	Check if admin password is set. If yes, follow session method for
224e8a60aa7SDivya Bharathi			password management as briefed under authentication section above.
225e8a60aa7SDivya Bharathi		2.	Before setting any attribute, check if it has any modifiers
226e8a60aa7SDivya Bharathi			or value_modifiers. If yes, incorporate them and then modify
227e8a60aa7SDivya Bharathi			attribute.
228e8a60aa7SDivya Bharathi
229e8a60aa7SDivya Bharathi		Drivers may emit a CHANGE uevent when this value changes and userspace
230e8a60aa7SDivya Bharathi		may check it again.
231e8a60aa7SDivya Bharathi
232e8a60aa7SDivya BharathiWhat:		/sys/class/firmware-attributes/*/attributes/reset_bios
233e8a60aa7SDivya BharathiDate:		February 2021
234e8a60aa7SDivya BharathiKernelVersion:	5.11
235e8a60aa7SDivya BharathiContact:	Divya Bharathi <Divya.Bharathi@Dell.com>,
236e8a60aa7SDivya Bharathi		Mario Limonciello <mario.limonciello@dell.com>,
237e8a60aa7SDivya Bharathi		Prasanth KSR <prasanth.ksr@dell.com>
238e8a60aa7SDivya BharathiDescription:
239e8a60aa7SDivya Bharathi		This attribute can be used to reset the BIOS Configuration.
240e8a60aa7SDivya Bharathi		Specifically, it tells which type of reset BIOS configuration is being
241e8a60aa7SDivya Bharathi		requested on the host.
242e8a60aa7SDivya Bharathi
243e8a60aa7SDivya Bharathi		Reading from it returns a list of supported options encoded as:
244e8a60aa7SDivya Bharathi
245*5b09081fSMauro Carvalho Chehab			- 'builtinsafe' (Built in safe configuration profile)
246*5b09081fSMauro Carvalho Chehab			- 'lastknowngood' (Last known good saved configuration profile)
247*5b09081fSMauro Carvalho Chehab			- 'factory' (Default factory settings configuration profile)
248*5b09081fSMauro Carvalho Chehab			- 'custom' (Custom saved configuration profile)
249e8a60aa7SDivya Bharathi
250e8a60aa7SDivya Bharathi		The currently selected option is printed in square brackets as
251*5b09081fSMauro Carvalho Chehab		shown below::
252e8a60aa7SDivya Bharathi
253e8a60aa7SDivya Bharathi		    # echo "factory" > /sys/class/firmware-attributes/*/device/attributes/reset_bios
254e8a60aa7SDivya Bharathi		    # cat /sys/class/firmware-attributes/*/device/attributes/reset_bios
255e8a60aa7SDivya Bharathi		    # builtinsafe lastknowngood [factory] custom
256e8a60aa7SDivya Bharathi
257e8a60aa7SDivya Bharathi		Note that any changes to this attribute requires a reboot
258e8a60aa7SDivya Bharathi		for changes to take effect.
259