2 This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
4 Copyright (c) 2006 - 2009, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
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.
15 #ifndef __UEFI_MULTIPHASE_H__
16 #define __UEFI_MULTIPHASE_H__
18 #include <Guid/WinCertificate.h>
20 /// Enumeration of memory types introduced in UEFI.
26 EfiReservedMemoryType
,
28 /// The code portions of a loaded application.
29 /// (Note that UEFI OS loaders are UEFI applications.)
33 /// The data portions of a loaded application and the default data allocation
34 /// type used by an application to allocate pool memory.
38 /// The code portions of a loaded Boot Services Driver
42 /// The data portions of a loaded Boot Serves Driver, and the default data
43 /// allocation type used by a Boot Services Driver to allocate pool memory.
47 /// The code portions of a loaded Runtime Services Driver.
49 EfiRuntimeServicesCode
,
51 /// The data portions of a loaded Runtime Services Driver and the default
52 /// data allocation type used by a Runtime Services Driver to allocate pool memory.
54 EfiRuntimeServicesData
,
56 /// Free (unallocated) memory.
58 EfiConventionalMemory
,
60 /// Memory in which errors have been detected.
64 /// Memory that holds the ACPI tables.
68 /// Address space reserved for use by the firmware.
72 /// Used by system firmware to request that a memory-mapped IO region
73 /// be mapped by the OS to a virtual address so it can be accessed by EFI runtime services.
77 /// System memory-mapped IO region that is used to translate memory
78 /// cycles to IO cycles by the processor.
80 EfiMemoryMappedIOPortSpace
,
82 /// Address space reserved by the firmware for code that is part of the processor.
89 /// Data structure that precedes all of the standard EFI table types.
93 /// A 64-bit signature that identifies the type of table that follows.
94 /// Unique signatures have been generated for the EFI System Table,
95 /// the EFI Boot Services Table, and the EFI Runtime Services Table.
99 /// The revision of the EFI Specification to which this table
100 /// conforms. The upper 16 bits of this field contain the major
101 /// revision value, and the lower 16 bits contain the minor revision
102 /// value. The minor revision values are limited to the range of 00..99.
106 /// The size, in bytes, of the entire table including the EFI_TABLE_HEADER.
110 /// The 32-bit CRC for the entire table. This value is computed by
111 /// setting this field to 0, and computing the 32-bit CRC for HeaderSize bytes.
115 /// Reserved field that must be set to 0.
121 /// Attributes of variable.
123 #define EFI_VARIABLE_NON_VOLATILE 0x00000001
124 #define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
125 #define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
126 #define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
129 /// This attribute is identified by the mnemonic 'HR'
130 /// elsewhere in this specification.
132 #define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
135 /// AuthInfo is a WIN_CERTIFICATE using the wCertificateType
136 /// WIN_CERTIFICATE_UEFI_GUID and the CertType
137 /// EFI_CERT_TYPE_RSA2048_SHA256. If the attribute specifies
138 /// authenticated access, then the Data buffer should begin with an
139 /// authentication descriptor prior to the data payload and DataSize
140 /// should reflect the the data.and descriptor size. The caller
141 /// shall digest the Monotonic Count value and the associated data
142 /// for the variable update using the SHA-256 1-way hash algorithm.
143 /// The ensuing the 32-byte digest will be signed using the private
144 /// key associated w/ the public/private 2048-bit RSA key-pair. The
145 /// WIN_CERTIFICATE shall be used to describe the signature of the
146 /// Variable data *Data. In addition, the signature will also
147 /// include the MonotonicCount value to guard against replay attacks
151 /// Included in the signature of
152 /// AuthInfo.Used to ensure freshness/no
153 /// replay. Incremented during each
156 UINT64 MonotonicCount
;
158 /// Provides the authorization for the variable
159 /// access. It is a signature across the
160 /// variable data and the Monotonic Count
161 /// value. Caller uses Private key that is
162 /// associated with a public key that has been
163 /// provisioned via the key exchange.
165 WIN_CERTIFICATE_UEFI_GUID AuthInfo
;
166 } EFI_VARIABLE_AUTHENTICATION
;