xref: /freebsd/lib/libsecureboot/efi/include/Guid/GlobalVariable.h (revision 1d386b48a555f61cb7325543adbbb5c3f3407a66)
1*13ea0450SMarcin Wojtas /** @file
2*13ea0450SMarcin Wojtas   GUID for EFI (NVRAM) Variables.
3*13ea0450SMarcin Wojtas   Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
4*13ea0450SMarcin Wojtas   This program and the accompanying materials
5*13ea0450SMarcin Wojtas   are licensed and made available under the terms and conditions of the BSD License
6*13ea0450SMarcin Wojtas   which accompanies this distribution.  The full text of the license may be found at
7*13ea0450SMarcin Wojtas   http://opensource.org/licenses/bsd-license.php
8*13ea0450SMarcin Wojtas   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9*13ea0450SMarcin Wojtas   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
10*13ea0450SMarcin Wojtas   @par Revision Reference:
11*13ea0450SMarcin Wojtas   GUID defined in UEFI 2.1
12*13ea0450SMarcin Wojtas **/
13*13ea0450SMarcin Wojtas 
14*13ea0450SMarcin Wojtas #ifndef __GLOBAL_VARIABLE_GUID_H__
15*13ea0450SMarcin Wojtas #define __GLOBAL_VARIABLE_GUID_H__
16*13ea0450SMarcin Wojtas 
17*13ea0450SMarcin Wojtas #include <sys/cdefs.h>
18*13ea0450SMarcin Wojtas #ifndef EFI_GLOBAL_VARIABLE
19*13ea0450SMarcin Wojtas #define EFI_GLOBAL_VARIABLE \
20*13ea0450SMarcin Wojtas   { \
21*13ea0450SMarcin Wojtas     0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C } \
22*13ea0450SMarcin Wojtas   }
23*13ea0450SMarcin Wojtas #endif	/* EFI_GLOBAL_VARIABLE */
24*13ea0450SMarcin Wojtas 
25*13ea0450SMarcin Wojtas extern EFI_GUID gEfiGlobalVariableGuid;
26*13ea0450SMarcin Wojtas 
27*13ea0450SMarcin Wojtas //
28*13ea0450SMarcin Wojtas // Follow UEFI 2.4 spec:
29*13ea0450SMarcin Wojtas // To prevent name collisions with possible future globally defined variables,
30*13ea0450SMarcin Wojtas // other internal firmware data variables that are not defined here must be
31*13ea0450SMarcin Wojtas // saved with a unique VendorGuid other than EFI_GLOBAL_VARIABLE or
32*13ea0450SMarcin Wojtas // any other GUID defined by the UEFI Specification. Implementations must
33*13ea0450SMarcin Wojtas // only permit the creation of variables with a UEFI Specification-defined
34*13ea0450SMarcin Wojtas // VendorGuid when these variables are documented in the UEFI Specification.
35*13ea0450SMarcin Wojtas //
36*13ea0450SMarcin Wojtas // Note: except the globally defined variables defined below, the spec also defines
37*13ea0450SMarcin Wojtas // L"Boot####"      - A boot load option.
38*13ea0450SMarcin Wojtas // L"Driver####"    - A driver load option.
39*13ea0450SMarcin Wojtas // L"SysPrep####"   - A System Prep application load option.
40*13ea0450SMarcin Wojtas // L"Key####"       - Describes hot key relationship with a Boot#### load option.
41*13ea0450SMarcin Wojtas // The attribute for them is NV+BS+RT, #### is a printed hex value, and no 0x or h
42*13ea0450SMarcin Wojtas // is included in the hex value. They can not be expressed as a #define like other globally
43*13ea0450SMarcin Wojtas // defined variables, it is because we can not list the Boot0000, Boot0001, etc one by one.
44*13ea0450SMarcin Wojtas //
45*13ea0450SMarcin Wojtas 
46*13ea0450SMarcin Wojtas ///
47*13ea0450SMarcin Wojtas /// The language codes that the firmware supports. This value is deprecated.
48*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
49*13ea0450SMarcin Wojtas ///
50*13ea0450SMarcin Wojtas #define EFI_LANG_CODES_VARIABLE_NAME                L"LangCodes"
51*13ea0450SMarcin Wojtas ///
52*13ea0450SMarcin Wojtas /// The language code that the system is configured for. This value is deprecated.
53*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
54*13ea0450SMarcin Wojtas ///
55*13ea0450SMarcin Wojtas #define EFI_LANG_VARIABLE_NAME                      L"Lang"
56*13ea0450SMarcin Wojtas ///
57*13ea0450SMarcin Wojtas /// The firmware's boot managers timeout, in seconds, before initiating the default boot selection.
58*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
59*13ea0450SMarcin Wojtas ///
60*13ea0450SMarcin Wojtas #define EFI_TIME_OUT_VARIABLE_NAME                  L"Timeout"
61*13ea0450SMarcin Wojtas ///
62*13ea0450SMarcin Wojtas /// The language codes that the firmware supports.
63*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
64*13ea0450SMarcin Wojtas ///
65*13ea0450SMarcin Wojtas #define EFI_PLATFORM_LANG_CODES_VARIABLE_NAME       L"PlatformLangCodes"
66*13ea0450SMarcin Wojtas ///
67*13ea0450SMarcin Wojtas /// The language code that the system is configured for.
68*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
69*13ea0450SMarcin Wojtas ///
70*13ea0450SMarcin Wojtas #define EFI_PLATFORM_LANG_VARIABLE_NAME             L"PlatformLang"
71*13ea0450SMarcin Wojtas ///
72*13ea0450SMarcin Wojtas /// The device path of the default input/output/error output console.
73*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
74*13ea0450SMarcin Wojtas ///
75*13ea0450SMarcin Wojtas #define EFI_CON_IN_VARIABLE_NAME                    L"ConIn"
76*13ea0450SMarcin Wojtas #define EFI_CON_OUT_VARIABLE_NAME                   L"ConOut"
77*13ea0450SMarcin Wojtas #define EFI_ERR_OUT_VARIABLE_NAME                   L"ErrOut"
78*13ea0450SMarcin Wojtas ///
79*13ea0450SMarcin Wojtas /// The device path of all possible input/output/error output devices.
80*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
81*13ea0450SMarcin Wojtas ///
82*13ea0450SMarcin Wojtas #define EFI_CON_IN_DEV_VARIABLE_NAME                L"ConInDev"
83*13ea0450SMarcin Wojtas #define EFI_CON_OUT_DEV_VARIABLE_NAME               L"ConOutDev"
84*13ea0450SMarcin Wojtas #define EFI_ERR_OUT_DEV_VARIABLE_NAME               L"ErrOutDev"
85*13ea0450SMarcin Wojtas ///
86*13ea0450SMarcin Wojtas /// The ordered boot option load list.
87*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
88*13ea0450SMarcin Wojtas ///
89*13ea0450SMarcin Wojtas #define EFI_BOOT_ORDER_VARIABLE_NAME                L"BootOrder"
90*13ea0450SMarcin Wojtas ///
91*13ea0450SMarcin Wojtas /// The boot option for the next boot only.
92*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
93*13ea0450SMarcin Wojtas ///
94*13ea0450SMarcin Wojtas #define EFI_BOOT_NEXT_VARIABLE_NAME                 L"BootNext"
95*13ea0450SMarcin Wojtas ///
96*13ea0450SMarcin Wojtas /// The boot option that was selected for the current boot.
97*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
98*13ea0450SMarcin Wojtas ///
99*13ea0450SMarcin Wojtas #define EFI_BOOT_CURRENT_VARIABLE_NAME              L"BootCurrent"
100*13ea0450SMarcin Wojtas ///
101*13ea0450SMarcin Wojtas /// The types of boot options supported by the boot manager. Should be treated as read-only.
102*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
103*13ea0450SMarcin Wojtas ///
104*13ea0450SMarcin Wojtas #define EFI_BOOT_OPTION_SUPPORT_VARIABLE_NAME       L"BootOptionSupport"
105*13ea0450SMarcin Wojtas ///
106*13ea0450SMarcin Wojtas /// The ordered driver load option list.
107*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
108*13ea0450SMarcin Wojtas ///
109*13ea0450SMarcin Wojtas #define EFI_DRIVER_ORDER_VARIABLE_NAME              L"DriverOrder"
110*13ea0450SMarcin Wojtas ///
111*13ea0450SMarcin Wojtas /// The ordered System Prep Application load option list.
112*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
113*13ea0450SMarcin Wojtas ///
114*13ea0450SMarcin Wojtas #define EFI_SYS_PREP_ORDER_VARIABLE_NAME            L"SysPrepOrder"
115*13ea0450SMarcin Wojtas ///
116*13ea0450SMarcin Wojtas /// Identifies the level of hardware error record persistence
117*13ea0450SMarcin Wojtas /// support implemented by the platform. This variable is
118*13ea0450SMarcin Wojtas /// only modified by firmware and is read-only to the OS.
119*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
120*13ea0450SMarcin Wojtas ///
121*13ea0450SMarcin Wojtas #define EFI_HW_ERR_REC_SUPPORT_VARIABLE_NAME        L"HwErrRecSupport"
122*13ea0450SMarcin Wojtas ///
123*13ea0450SMarcin Wojtas /// Whether the system is operating in setup mode (1) or not (0).
124*13ea0450SMarcin Wojtas /// All other values are reserved. Should be treated as read-only.
125*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
126*13ea0450SMarcin Wojtas ///
127*13ea0450SMarcin Wojtas #define EFI_SETUP_MODE_NAME                         L"SetupMode"
128*13ea0450SMarcin Wojtas ///
129*13ea0450SMarcin Wojtas /// The Key Exchange Key Signature Database.
130*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT+AT.
131*13ea0450SMarcin Wojtas ///
132*13ea0450SMarcin Wojtas #define EFI_KEY_EXCHANGE_KEY_NAME                   L"KEK"
133*13ea0450SMarcin Wojtas ///
134*13ea0450SMarcin Wojtas /// The public Platform Key.
135*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT+AT.
136*13ea0450SMarcin Wojtas ///
137*13ea0450SMarcin Wojtas #define EFI_PLATFORM_KEY_NAME                       L"PK"
138*13ea0450SMarcin Wojtas ///
139*13ea0450SMarcin Wojtas /// Array of GUIDs representing the type of signatures supported
140*13ea0450SMarcin Wojtas /// by the platform firmware. Should be treated as read-only.
141*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
142*13ea0450SMarcin Wojtas ///
143*13ea0450SMarcin Wojtas #define EFI_SIGNATURE_SUPPORT_NAME                  L"SignatureSupport"
144*13ea0450SMarcin Wojtas ///
145*13ea0450SMarcin Wojtas /// Whether the platform firmware is operating in Secure boot mode (1) or not (0).
146*13ea0450SMarcin Wojtas /// All other values are reserved. Should be treated as read-only.
147*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
148*13ea0450SMarcin Wojtas ///
149*13ea0450SMarcin Wojtas #define EFI_SECURE_BOOT_MODE_NAME                   L"SecureBoot"
150*13ea0450SMarcin Wojtas ///
151*13ea0450SMarcin Wojtas /// The OEM's default Key Exchange Key Signature Database. Should be treated as read-only.
152*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
153*13ea0450SMarcin Wojtas ///
154*13ea0450SMarcin Wojtas #define EFI_KEK_DEFAULT_VARIABLE_NAME               L"KEKDefault"
155*13ea0450SMarcin Wojtas ///
156*13ea0450SMarcin Wojtas /// The OEM's default public Platform Key. Should be treated as read-only.
157*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
158*13ea0450SMarcin Wojtas ///
159*13ea0450SMarcin Wojtas #define EFI_PK_DEFAULT_VARIABLE_NAME                L"PKDefault"
160*13ea0450SMarcin Wojtas ///
161*13ea0450SMarcin Wojtas /// The OEM's default secure boot signature store. Should be treated as read-only.
162*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
163*13ea0450SMarcin Wojtas ///
164*13ea0450SMarcin Wojtas #define EFI_DB_DEFAULT_VARIABLE_NAME                L"dbDefault"
165*13ea0450SMarcin Wojtas ///
166*13ea0450SMarcin Wojtas /// The OEM's default secure boot blacklist signature store. Should be treated as read-only.
167*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
168*13ea0450SMarcin Wojtas ///
169*13ea0450SMarcin Wojtas #define EFI_DBX_DEFAULT_VARIABLE_NAME               L"dbxDefault"
170*13ea0450SMarcin Wojtas ///
171*13ea0450SMarcin Wojtas /// The OEM's default secure boot timestamp signature store. Should be treated as read-only.
172*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
173*13ea0450SMarcin Wojtas ///
174*13ea0450SMarcin Wojtas #define EFI_DBT_DEFAULT_VARIABLE_NAME               L"dbtDefault"
175*13ea0450SMarcin Wojtas ///
176*13ea0450SMarcin Wojtas /// Allows the firmware to indicate supported features and actions to the OS.
177*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
178*13ea0450SMarcin Wojtas ///
179*13ea0450SMarcin Wojtas #define EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME    L"OsIndicationsSupported"
180*13ea0450SMarcin Wojtas ///
181*13ea0450SMarcin Wojtas /// Allows the OS to request the firmware to enable certain features and to take certain actions.
182*13ea0450SMarcin Wojtas /// Its attribute is NV+BS+RT.
183*13ea0450SMarcin Wojtas ///
184*13ea0450SMarcin Wojtas #define EFI_OS_INDICATIONS_VARIABLE_NAME            L"OsIndications"
185*13ea0450SMarcin Wojtas ///
186*13ea0450SMarcin Wojtas /// Whether the system is configured to use only vendor provided
187*13ea0450SMarcin Wojtas /// keys or not. Should be treated as read-only.
188*13ea0450SMarcin Wojtas /// Its attribute is BS+RT.
189*13ea0450SMarcin Wojtas ///
190*13ea0450SMarcin Wojtas #define EFI_VENDOR_KEYS_VARIABLE_NAME               L"VendorKeys"
191*13ea0450SMarcin Wojtas 
192*13ea0450SMarcin Wojtas #endif
193