1 .\" Copyright (c) 2017 Netflix, Inc
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd UEFI environment variable interaction
44 .Op Fl -fromfile Ar file
58 .Dq Unified Extensible Firmware Interface
60 environment variables.
61 UEFI variables have three part: A namespace, a name and a value.
62 The namespace is a GUID that is self assigned by the group defining the
64 The name is a Unicode name for the variable.
65 The value is binary data.
66 All Unicode data is presented to the user as UTF-8.
68 The following options are available:
70 .It Fl n Ar name Fl -name Ar name
71 Specify the name of the variable to operate on.
74 argument is the GUID of the variable, followed by a dash, followed by the
76 The GUID may be in numeric format, or may be one of the well known
80 .It Fl f Ar file Fl -fromfile Ar file
81 When writing or appending to a variable, take the data for the
84 instead of from the command line.
90 This behavior is not well understood and is currently unimplemented.
92 Append the specified value to the UEFI variable rather than replacing
94 .It Fl t Ar attr Fl -attributes Ar attr
95 Specify, in hexadecimal, the attributes for this
97 See section 7.2 (GetVariable subsection, Related Definitions) of the
98 UEFI Specification for hex values to use.
100 Display the variable data as modified ascii: All printable characters
101 are printed, while unprintable characters are rendered as a two-digit
102 hexadecimal number preceded by a % character.
104 Display the variable data as binary data.
105 Usually will be used with the
112 Delete the specified variable.
113 May not be used with either the
121 .It Fl d Fl -device Fl -device-path
122 Interpret the variables printed as UEFI device paths and print the
123 UEFI standard string representation.
125 flag is specified, guids are converted to names if they are known (and
129 List variable data as a hex dump.
130 .It Fl L Fl -list-guids
131 Lists the well known GUIDs.
132 The names listed here may be used in place of the numeric GUID values.
133 These names will replace the numeric GUID values unless
137 List all the variables.
140 flag is also listed, their values will be displayed.
142 Do not display the variable name.
144 Print the value of the variable.
145 .It Fl R Fl -raw-guid
146 Do not substitute well known names for GUID numeric values in output.
148 Treat the value of the variable as UCS2 and convert it to UTF8 and
151 Write (replace) the variable specified with the value specified from
153 No command line option to do this is available since UEFI variables
154 are binary structures rather than strings.
157 can be used to specify simple strings.
161 environment variable.
166 program is intended to be compatible (strict superset) with a program
167 of the same name included in the Red Hat libefivar package,
172 flags are not implemented and never will be.
179 Appendix A of the UEFI specification has the format for GUIDs.
181 .Dq Globally Unique Identifiers
182 have the format described in RFC 4122.
186 utility first appeared in