]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Pi/PiMultiPhase.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Pi / PiMultiPhase.h
CommitLineData
959ccb23 1/** @file\r
2 Include file matches things in PI for multiple module types.\r
3\r
9095d37b 4Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
959ccb23 6\r
959ccb23 7 @par Revision Reference:\r
af2dc6a7 8 These elements are defined in UEFI Platform Initialization Specification 1.2.\r
959ccb23 9\r
10**/\r
11\r
12#ifndef __PI_MULTIPHASE_H__\r
13#define __PI_MULTIPHASE_H__\r
14\r
959ccb23 15#include <Pi/PiFirmwareVolume.h>\r
16#include <Pi/PiFirmwareFile.h>\r
17#include <Pi/PiBootMode.h>\r
959ccb23 18#include <Pi/PiHob.h>\r
19#include <Pi/PiDependency.h>\r
d7dfd027 20#include <Pi/PiStatusCode.h>\r
8c803876 21#include <Pi/PiS3BootScript.h>\r
211a2649 22\r
b205f267 23/**\r
24 Produces an error code in the range reserved for use by the Platform Initialization\r
25 Architecture Specification.\r
26\r
9095d37b
LG
27 The supported 32-bit range is 0xA0000000-0xBFFFFFFF\r
28 The supported 64-bit range is 0xA000000000000000-0xBFFFFFFFFFFFFFFF\r
b205f267 29\r
9095d37b 30 @param StatusCode The status code value to convert into a warning code.\r
b205f267 31 StatusCode must be in the range 0x00000000..0x1FFFFFFF.\r
32\r
33 @return The value specified by StatusCode in the PI reserved range.\r
34\r
35**/\r
36#define DXE_ERROR(StatusCode) (MAX_BIT | (MAX_BIT >> 2) | StatusCode)\r
37\r
38///\r
39/// If this value is returned by an EFI image, then the image should be unloaded.\r
40///\r
41#define EFI_REQUEST_UNLOAD_IMAGE DXE_ERROR (1)\r
42\r
43///\r
9095d37b 44/// If this value is returned by an API, it means the capability is not yet\r
b205f267 45/// installed/available/ready to use.\r
46///\r
2f88bd3a 47#define EFI_NOT_AVAILABLE_YET DXE_ERROR (2)\r
b205f267 48\r
04c5d169 49///\r
af2dc6a7 50/// Success and warning codes reserved for use by PI.\r
51/// Supported 32-bit range is 0x20000000-0x3fffffff.\r
52/// Supported 64-bit range is 0x2000000000000000-0x3fffffffffffffff.\r
04c5d169 53///\r
2f88bd3a 54#define PI_ENCODE_WARNING(a) ((MAX_BIT >> 2) | (a))\r
04c5d169 55\r
56///\r
af2dc6a7 57/// Error codes reserved for use by PI.\r
58/// Supported 32-bit range is 0xa0000000-0xbfffffff.\r
59/// Supported 64-bit range is 0xa000000000000000-0xbfffffffffffffff.\r
04c5d169 60///\r
2f88bd3a 61#define PI_ENCODE_ERROR(a) (MAX_BIT | (MAX_BIT >> 2) | (a))\r
04c5d169 62\r
9095d37b 63///\r
af2dc6a7 64/// Return status codes defined in SMM CIS.\r
9095d37b 65///\r
2f88bd3a 66#define EFI_INTERRUPT_PENDING PI_ENCODE_ERROR (0)\r
04c5d169 67\r
68#define EFI_WARN_INTERRUPT_SOURCE_PENDING PI_ENCODE_WARNING (0)\r
69#define EFI_WARN_INTERRUPT_SOURCE_QUIESCED PI_ENCODE_WARNING (1)\r
70\r
b205f267 71///\r
72/// Bitmask of values for Authentication Status.\r
9095d37b 73/// Authentication Status is returned from EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL\r
b205f267 74/// and the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI\r
75///\r
76/// xx00 Image was not signed.\r
af2dc6a7 77/// xxx1 Platform security policy override. Assumes the same meaning as 0010 (the image was signed, the\r
b205f267 78/// signature was tested, and the signature passed authentication test).\r
79/// 0010 Image was signed, the signature was tested, and the signature passed authentication test.\r
80/// 0110 Image was signed and the signature was not tested.\r
81/// 1010 Image was signed, the signature was tested, and the signature failed the authentication test.\r
82///\r
83///@{\r
2f88bd3a
MK
84#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01\r
85#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02\r
86#define EFI_AUTH_STATUS_NOT_TESTED 0x04\r
87#define EFI_AUTH_STATUS_TEST_FAILED 0x08\r
88#define EFI_AUTH_STATUS_ALL 0x0f\r
b205f267 89///@}\r
211a2649 90\r
79a42176 91///\r
2f208e59 92/// MMRAM states and capabilities\r
79a42176 93///\r
2f88bd3a
MK
94#define EFI_MMRAM_OPEN 0x00000001\r
95#define EFI_MMRAM_CLOSED 0x00000002\r
96#define EFI_MMRAM_LOCKED 0x00000004\r
97#define EFI_CACHEABLE 0x00000008\r
98#define EFI_ALLOCATED 0x00000010\r
99#define EFI_NEEDS_TESTING 0x00000020\r
100#define EFI_NEEDS_ECC_INITIALIZATION 0x00000040\r
79a42176 101\r
2f88bd3a
MK
102#define EFI_SMRAM_OPEN EFI_MMRAM_OPEN\r
103#define EFI_SMRAM_CLOSED EFI_MMRAM_CLOSED\r
104#define EFI_SMRAM_LOCKED EFI_MMRAM_LOCKED\r
2f208e59 105\r
79a42176 106///\r
2f208e59 107/// Structure describing a MMRAM region and its accessibility attributes.\r
79a42176 108///\r
109typedef struct {\r
110 ///\r
2f208e59
ED
111 /// Designates the physical address of the MMRAM in memory. This view of memory is\r
112 /// the same as seen by I/O-based agents, for example, but it may not be the address seen\r
79a42176 113 /// by the processors.\r
114 ///\r
2f88bd3a 115 EFI_PHYSICAL_ADDRESS PhysicalStart;\r
79a42176 116 ///\r
2f208e59 117 /// Designates the address of the MMRAM, as seen by software executing on the\r
79a42176 118 /// processors. This address may or may not match PhysicalStart.\r
119 ///\r
2f88bd3a 120 EFI_PHYSICAL_ADDRESS CpuStart;\r
79a42176 121 ///\r
2f208e59 122 /// Describes the number of bytes in the MMRAM region.\r
79a42176 123 ///\r
2f88bd3a 124 UINT64 PhysicalSize;\r
79a42176 125 ///\r
2f208e59
ED
126 /// Describes the accessibility attributes of the MMRAM. These attributes include the\r
127 /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical\r
128 /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC\r
79a42176 129 /// initialization).\r
130 ///\r
2f88bd3a 131 UINT64 RegionState;\r
2f208e59
ED
132} EFI_MMRAM_DESCRIPTOR;\r
133\r
2f88bd3a 134typedef EFI_MMRAM_DESCRIPTOR EFI_SMRAM_DESCRIPTOR;\r
79a42176 135\r
27b8a529
KQ
136///\r
137/// Structure describing a MMRAM region which cannot be used for the MMRAM heap.\r
138///\r
139typedef struct _EFI_MM_RESERVED_MMRAM_REGION {\r
140 ///\r
141 /// Starting address of the reserved MMRAM area, as it appears while MMRAM is open.\r
142 /// Ignored if MmramReservedSize is 0.\r
143 ///\r
144 EFI_PHYSICAL_ADDRESS MmramReservedStart;\r
145 ///\r
146 /// Number of bytes occupied by the reserved MMRAM area. A size of zero indicates the\r
147 /// last MMRAM area.\r
148 ///\r
149 UINT64 MmramReservedSize;\r
150} EFI_MM_RESERVED_MMRAM_REGION;\r
151\r
96d6d004
SZ
152typedef enum {\r
153 EFI_PCD_TYPE_8,\r
154 EFI_PCD_TYPE_16,\r
155 EFI_PCD_TYPE_32,\r
156 EFI_PCD_TYPE_64,\r
157 EFI_PCD_TYPE_BOOL,\r
158 EFI_PCD_TYPE_PTR\r
159} EFI_PCD_TYPE;\r
160\r
161typedef struct {\r
162 ///\r
163 /// The returned information associated with the requested TokenNumber. If\r
164 /// TokenNumber is 0, then PcdType is set to EFI_PCD_TYPE_8.\r
165 ///\r
2f88bd3a 166 EFI_PCD_TYPE PcdType;\r
96d6d004
SZ
167 ///\r
168 /// The size of the data in bytes associated with the TokenNumber specified. If\r
169 /// TokenNumber is 0, then PcdSize is set 0.\r
170 ///\r
2f88bd3a 171 UINTN PcdSize;\r
96d6d004
SZ
172 ///\r
173 /// The null-terminated ASCII string associated with a given token. If the\r
174 /// TokenNumber specified was 0, then this field corresponds to the null-terminated\r
175 /// ASCII string associated with the token's namespace Guid. If NULL, there is no\r
176 /// name associated with this request.\r
177 ///\r
2f88bd3a 178 CHAR8 *PcdName;\r
96d6d004
SZ
179} EFI_PCD_INFO;\r
180\r
0d24d7d6
HW
181/**\r
182 The function prototype for invoking a function on an Application Processor.\r
183\r
184 This definition is used by the UEFI MP Serices Protocol, and the\r
185 PI SMM System Table.\r
186\r
187 @param[in,out] Buffer The pointer to private data buffer.\r
188**/\r
189typedef\r
190VOID\r
191(EFIAPI *EFI_AP_PROCEDURE)(\r
192 IN OUT VOID *Buffer\r
193 );\r
194\r
18f169a9
ED
195/**\r
196 The function prototype for invoking a function on an Application Processor.\r
197\r
198 This definition is used by the UEFI MM MP Serices Protocol.\r
199\r
200 @param[in] ProcedureArgument The pointer to private data buffer.\r
201\r
202 @retval EFI_SUCCESS Excutive the procedure successfully\r
203\r
204**/\r
205typedef\r
206EFI_STATUS\r
207(EFIAPI *EFI_AP_PROCEDURE2)(\r
208 IN VOID *ProcedureArgument\r
2f88bd3a 209 );\r
18f169a9 210\r
959ccb23 211#endif\r