162306a36Sopenharmony_ciWhat:		/sys/firmware/efi/vars
262306a36Sopenharmony_ciDate:		April 2004
362306a36Sopenharmony_ciContact:	Matt Domsch <Matt_Domsch@dell.com>
462306a36Sopenharmony_ciDescription:
562306a36Sopenharmony_ci		This directory exposes interfaces for interactive with
662306a36Sopenharmony_ci		EFI variables.  For more information on EFI variables,
762306a36Sopenharmony_ci		see 'Variable Services' in the UEFI specification
862306a36Sopenharmony_ci		(section 7.2 in specification version 2.3 Errata D).
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci		In summary, EFI variables are named, and are classified
1162306a36Sopenharmony_ci		into separate namespaces through the use of a vendor
1262306a36Sopenharmony_ci		GUID.  They also have an arbitrary binary value
1362306a36Sopenharmony_ci		associated with them.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci		The efivars module enumerates these variables and
1662306a36Sopenharmony_ci		creates a separate directory for each one found.  Each
1762306a36Sopenharmony_ci		directory has a name of the form "<key>-<vendor guid>"
1862306a36Sopenharmony_ci		and contains the following files:
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci		=============== ========================================
2162306a36Sopenharmony_ci		attributes:	A read-only text file enumerating the
2262306a36Sopenharmony_ci				EFI variable flags.  Potential values
2362306a36Sopenharmony_ci				include:
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci				EFI_VARIABLE_NON_VOLATILE
2662306a36Sopenharmony_ci				EFI_VARIABLE_BOOTSERVICE_ACCESS
2762306a36Sopenharmony_ci				EFI_VARIABLE_RUNTIME_ACCESS
2862306a36Sopenharmony_ci				EFI_VARIABLE_HARDWARE_ERROR_RECORD
2962306a36Sopenharmony_ci				EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci				See the EFI documentation for an
3262306a36Sopenharmony_ci				explanation of each of these variables.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci		data:		A read-only binary file that can be read
3562306a36Sopenharmony_ci				to attain the value of the EFI variable
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci		guid:		The vendor GUID of the variable.  This
3862306a36Sopenharmony_ci				should always match the GUID in the
3962306a36Sopenharmony_ci				variable's name.
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci		raw_var:	A binary file that can be read to obtain
4262306a36Sopenharmony_ci				a structure that contains everything
4362306a36Sopenharmony_ci				there is to know about the variable.
4462306a36Sopenharmony_ci				For structure definition see "struct
4562306a36Sopenharmony_ci				efi_variable" in the kernel sources.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci				This file can also be written to in
4862306a36Sopenharmony_ci				order to update the value of a variable.
4962306a36Sopenharmony_ci				For this to work however, all fields of
5062306a36Sopenharmony_ci				the "struct efi_variable" passed must
5162306a36Sopenharmony_ci				match byte for byte with the structure
5262306a36Sopenharmony_ci				read out of the file, save for the value
5362306a36Sopenharmony_ci				portion.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci				**Note** the efi_variable structure
5662306a36Sopenharmony_ci				read/written with this file contains a
5762306a36Sopenharmony_ci				'long' type that may change widths
5862306a36Sopenharmony_ci				depending on your underlying
5962306a36Sopenharmony_ci				architecture.
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci		size:		As ASCII representation of the size of
6262306a36Sopenharmony_ci				the variable's value.
6362306a36Sopenharmony_ci		=============== ========================================
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci		In addition, two other magic binary files are provided
6762306a36Sopenharmony_ci		in the top-level directory and are used for adding and
6862306a36Sopenharmony_ci		removing variables:
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci		=============== ========================================
7162306a36Sopenharmony_ci		new_var:	Takes a "struct efi_variable" and
7262306a36Sopenharmony_ci				instructs the EFI firmware to create a
7362306a36Sopenharmony_ci				new variable.
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci		del_var:	Takes a "struct efi_variable" and
7662306a36Sopenharmony_ci				instructs the EFI firmware to remove any
7762306a36Sopenharmony_ci				variable that has a matching vendor GUID
7862306a36Sopenharmony_ci				and variable key name.
7962306a36Sopenharmony_ci		=============== ========================================
80