iPXE
UefiMultiPhase.h
Go to the documentation of this file.
1 /** @file
2  This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
3 
4 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9 
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 
13 **/
14 
15 #ifndef __UEFI_MULTIPHASE_H__
16 #define __UEFI_MULTIPHASE_H__
17 
18 FILE_LICENCE ( BSD3 );
19 
21 ///
22 /// Enumeration of memory types introduced in UEFI.
23 ///
24 typedef enum {
25  ///
26  /// Not used.
27  ///
29  ///
30  /// The code portions of a loaded application.
31  /// (Note that UEFI OS loaders are UEFI applications.)
32  ///
34  ///
35  /// The data portions of a loaded application and the default data allocation
36  /// type used by an application to allocate pool memory.
37  ///
39  ///
40  /// The code portions of a loaded Boot Services Driver.
41  ///
43  ///
44  /// The data portions of a loaded Boot Serves Driver, and the default data
45  /// allocation type used by a Boot Services Driver to allocate pool memory.
46  ///
48  ///
49  /// The code portions of a loaded Runtime Services Driver.
50  ///
52  ///
53  /// The data portions of a loaded Runtime Services Driver and the default
54  /// data allocation type used by a Runtime Services Driver to allocate pool memory.
55  ///
57  ///
58  /// Free (unallocated) memory.
59  ///
61  ///
62  /// Memory in which errors have been detected.
63  ///
65  ///
66  /// Memory that holds the ACPI tables.
67  ///
69  ///
70  /// Address space reserved for use by the firmware.
71  ///
73  ///
74  /// Used by system firmware to request that a memory-mapped IO region
75  /// be mapped by the OS to a virtual address so it can be accessed by EFI runtime services.
76  ///
78  ///
79  /// System memory-mapped IO region that is used to translate memory
80  /// cycles to IO cycles by the processor.
81  ///
83  ///
84  /// Address space reserved by the firmware for code that is part of the processor.
85  ///
87  ///
88  /// A memory region that operates as EfiConventionalMemory,
89  /// however it happens to also support byte-addressable non-volatility.
90  ///
94 
95 ///
96 /// Enumeration of reset types.
97 ///
98 typedef enum {
99  ///
100  /// Used to induce a system-wide reset. This sets all circuitry within the
101  /// system to its initial state. This type of reset is asynchronous to system
102  /// operation and operates withgout regard to cycle boundaries. EfiColdReset
103  /// is tantamount to a system power cycle.
104  ///
106  ///
107  /// Used to induce a system-wide initialization. The processors are set to their
108  /// initial state, and pending cycles are not corrupted. If the system does
109  /// not support this reset type, then an EfiResetCold must be performed.
110  ///
112  ///
113  /// Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3
114  /// state. If the system does not support this reset type, then when the system
115  /// is rebooted, it should exhibit the EfiResetCold attributes.
116  ///
118  ///
119  /// Used to induce a system-wide reset. The exact type of the reset is defined by
120  /// the EFI_GUID that follows the Null-terminated Unicode string passed into
121  /// ResetData. If the platform does not recognize the EFI_GUID in ResetData the
122  /// platform must pick a supported reset type to perform. The platform may
123  /// optionally log the parameters from any non-normal reset that occurs.
124  ///
127 
128 ///
129 /// Data structure that precedes all of the standard EFI table types.
130 ///
131 typedef struct {
132  ///
133  /// A 64-bit signature that identifies the type of table that follows.
134  /// Unique signatures have been generated for the EFI System Table,
135  /// the EFI Boot Services Table, and the EFI Runtime Services Table.
136  ///
138  ///
139  /// The revision of the EFI Specification to which this table
140  /// conforms. The upper 16 bits of this field contain the major
141  /// revision value, and the lower 16 bits contain the minor revision
142  /// value. The minor revision values are limited to the range of 00..99.
143  ///
145  ///
146  /// The size, in bytes, of the entire table including the EFI_TABLE_HEADER.
147  ///
149  ///
150  /// The 32-bit CRC for the entire table. This value is computed by
151  /// setting this field to 0, and computing the 32-bit CRC for HeaderSize bytes.
152  ///
154  ///
155  /// Reserved field that must be set to 0.
156  ///
159 
160 ///
161 /// Attributes of variable.
162 ///
163 #define EFI_VARIABLE_NON_VOLATILE 0x00000001
164 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
165 #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
166 ///
167 /// This attribute is identified by the mnemonic 'HR'
168 /// elsewhere in this specification.
169 ///
170 #define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
171 ///
172 /// Attributes of Authenticated Variable
173 ///
174 #define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
175 #define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
176 #define EFI_VARIABLE_APPEND_WRITE 0x00000040
177 
178 
179 ///
180 /// AuthInfo is a WIN_CERTIFICATE using the wCertificateType
181 /// WIN_CERTIFICATE_UEFI_GUID and the CertType
182 /// EFI_CERT_TYPE_RSA2048_SHA256_GUID. If the attribute specifies
183 /// authenticated access, then the Data buffer should begin with an
184 /// authentication descriptor prior to the data payload and DataSize
185 /// should reflect the the data.and descriptor size. The caller
186 /// shall digest the Monotonic Count value and the associated data
187 /// for the variable update using the SHA-256 1-way hash algorithm.
188 /// The ensuing the 32-byte digest will be signed using the private
189 /// key associated w/ the public/private 2048-bit RSA key-pair. The
190 /// WIN_CERTIFICATE shall be used to describe the signature of the
191 /// Variable data *Data. In addition, the signature will also
192 /// include the MonotonicCount value to guard against replay attacks.
193 ///
194 typedef struct {
195  ///
196  /// Included in the signature of
197  /// AuthInfo.Used to ensure freshness/no
198  /// replay. Incremented during each
199  /// "Write" access.
200  ///
202  ///
203  /// Provides the authorization for the variable
204  /// access. It is a signature across the
205  /// variable data and the Monotonic Count
206  /// value. Caller uses Private key that is
207  /// associated with a public key that has been
208  /// provisioned via the key exchange.
209  ///
212 
213 ///
214 /// When the attribute EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS is
215 /// set, then the Data buffer shall begin with an instance of a complete (and serialized)
216 /// EFI_VARIABLE_AUTHENTICATION_2 descriptor. The descriptor shall be followed by the new
217 /// variable value and DataSize shall reflect the combined size of the descriptor and the new
218 /// variable value. The authentication descriptor is not part of the variable data and is not
219 /// returned by subsequent calls to GetVariable().
220 ///
221 typedef struct {
222  ///
223  /// For the TimeStamp value, components Pad1, Nanosecond, TimeZone, Daylight and
224  /// Pad2 shall be set to 0. This means that the time shall always be expressed in GMT.
225  ///
227  ///
228  /// Only a CertType of EFI_CERT_TYPE_PKCS7_GUID is accepted.
229  ///
232 
233 #endif
UINT32 Reserved
Reserved field that must be set to 0.
EFI_RESET_TYPE
Enumeration of reset types.
UINT64 MonotonicCount
Included in the signature of AuthInfo.Used to ensure freshness/no replay.
A memory region that operates as EfiConventionalMemory, however it happens to also support byte-addre...
unsigned int UINT32
Definition: ProcessorBind.h:56
Certificate which encapsulates a GUID-specific digital signature.
UINT64 Signature
A 64-bit signature that identifies the type of table that follows.
WIN_CERTIFICATE_UEFI_GUID AuthInfo
Provides the authorization for the variable access.
Used to induce a system-wide reset.
UINT32 CRC32
The 32-bit CRC for the entire table.
The code portions of a loaded application.
FILE_LICENCE(BSD3)
WIN_CERTIFICATE_UEFI_GUID AuthInfo
Only a CertType of EFI_CERT_TYPE_PKCS7_GUID is accepted.
Used to induce a system-wide reset.
Used to induce a system-wide initialization.
EFI_MEMORY_TYPE
Enumeration of memory types introduced in UEFI.
Address space reserved by the firmware for code that is part of the processor.
Used by system firmware to request that a memory-mapped IO region be mapped by the OS to a virtual ad...
Memory that holds the ACPI tables.
EFI_TIME TimeStamp
For the TimeStamp value, components Pad1, Nanosecond, TimeZone, Daylight and Pad2 shall be set to 0.
The code portions of a loaded Boot Services Driver.
Free (unallocated) memory.
Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3 state.
UINT32 Revision
The revision of the EFI Specification to which this table conforms.
unsigned long long UINT64
Definition: ProcessorBind.h:54
System memory-mapped IO region that is used to translate memory cycles to IO cycles by the processor.
EFI Time Abstraction: Year: 1900 - 9999 Month: 1 - 12 Day: 1 - 31 Hour: 0 - 23 Minute: 0 - 59 Second:...
Definition: UefiBaseType.h:74
The data portions of a loaded Runtime Services Driver and the default data allocation type used by a ...
GUID for UEFI WIN_CERTIFICATE structure.
The code portions of a loaded Runtime Services Driver.
When the attribute EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS is set, then the Data buffer sh...
Data structure that precedes all of the standard EFI table types.
Address space reserved for use by the firmware.
The data portions of a loaded Boot Serves Driver, and the default data allocation type used by a Boot...
AuthInfo is a WIN_CERTIFICATE using the wCertificateType WIN_CERTIFICATE_UEFI_GUID and the CertType E...
UINT32 HeaderSize
The size, in bytes, of the entire table including the EFI_TABLE_HEADER.
The data portions of a loaded application and the default data allocation type used by an application...
Memory in which errors have been detected.