Mike Waychison | 54fad53 | 2011-03-11 17:43:32 -0800 | [diff] [blame] | 1 | What: /sys/firmware/efi/vars |
| 2 | Date: April 2004 |
| 3 | Contact: Matt Domsch <Matt_Domsch@dell.com> |
| 4 | Description: |
| 5 | This directory exposes interfaces for interactive with |
| 6 | EFI variables. For more information on EFI variables, |
| 7 | see 'Variable Services' in the UEFI specification |
| 8 | (section 7.2 in specification version 2.3 Errata D). |
| 9 | |
| 10 | In summary, EFI variables are named, and are classified |
| 11 | into separate namespaces through the use of a vendor |
| 12 | GUID. They also have an arbitrary binary value |
| 13 | associated with them. |
| 14 | |
| 15 | The efivars module enumerates these variables and |
| 16 | creates a separate directory for each one found. Each |
| 17 | directory has a name of the form "<key>-<vendor guid>" |
| 18 | and contains the following files: |
| 19 | |
| 20 | attributes: A read-only text file enumerating the |
| 21 | EFI variable flags. Potential values |
| 22 | include: |
| 23 | |
| 24 | EFI_VARIABLE_NON_VOLATILE |
| 25 | EFI_VARIABLE_BOOTSERVICE_ACCESS |
| 26 | EFI_VARIABLE_RUNTIME_ACCESS |
| 27 | EFI_VARIABLE_HARDWARE_ERROR_RECORD |
| 28 | EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS |
| 29 | |
| 30 | See the EFI documentation for an |
| 31 | explanation of each of these variables. |
| 32 | |
| 33 | data: A read-only binary file that can be read |
| 34 | to attain the value of the EFI variable |
| 35 | |
| 36 | guid: The vendor GUID of the variable. This |
| 37 | should always match the GUID in the |
| 38 | variable's name. |
| 39 | |
| 40 | raw_var: A binary file that can be read to obtain |
| 41 | a structure that contains everything |
| 42 | there is to know about the variable. |
| 43 | For structure definition see "struct |
| 44 | efi_variable" in the kernel sources. |
| 45 | |
| 46 | This file can also be written to in |
| 47 | order to update the value of a variable. |
| 48 | For this to work however, all fields of |
| 49 | the "struct efi_variable" passed must |
| 50 | match byte for byte with the structure |
| 51 | read out of the file, save for the value |
| 52 | portion. |
| 53 | |
| 54 | **Note** the efi_variable structure |
| 55 | read/written with this file contains a |
| 56 | 'long' type that may change widths |
| 57 | depending on your underlying |
| 58 | architecture. |
| 59 | |
| 60 | size: As ASCII representation of the size of |
| 61 | the variable's value. |
| 62 | |
| 63 | |
| 64 | In addition, two other magic binary files are provided |
| 65 | in the top-level directory and are used for adding and |
| 66 | removing variables: |
| 67 | |
| 68 | new_var: Takes a "struct efi_variable" and |
| 69 | instructs the EFI firmware to create a |
| 70 | new variable. |
| 71 | |
| 72 | del_var: Takes a "struct efi_variable" and |
| 73 | instructs the EFI firmware to remove any |
| 74 | variable that has a matching vendor GUID |
| 75 | and variable key name. |