2 Include file matches things in PI for multiple module types.
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
7 @par Revision Reference:
8 These elements are defined in UEFI Platform Initialization Specification 1.2.
12 #ifndef __PI_MULTIPHASE_H__
13 #define __PI_MULTIPHASE_H__
15 #include <Pi/PiFirmwareVolume.h>
16 #include <Pi/PiFirmwareFile.h>
17 #include <Pi/PiBootMode.h>
19 #include <Pi/PiDependency.h>
20 #include <Pi/PiStatusCode.h>
21 #include <Pi/PiS3BootScript.h>
24 Produces an error code in the range reserved for use by the Platform Initialization
25 Architecture Specification.
27 The supported 32-bit range is 0xA0000000-0xBFFFFFFF
28 The supported 64-bit range is 0xA000000000000000-0xBFFFFFFFFFFFFFFF
30 @param StatusCode The status code value to convert into a warning code.
31 StatusCode must be in the range 0x00000000..0x1FFFFFFF.
33 @return The value specified by StatusCode in the PI reserved range.
36 #define DXE_ERROR(StatusCode) (MAX_BIT | (MAX_BIT >> 2) | StatusCode)
39 /// If this value is returned by an EFI image, then the image should be unloaded.
41 #define EFI_REQUEST_UNLOAD_IMAGE DXE_ERROR (1)
44 /// If this value is returned by an API, it means the capability is not yet
45 /// installed/available/ready to use.
47 #define EFI_NOT_AVAILABLE_YET DXE_ERROR (2)
50 /// Success and warning codes reserved for use by PI.
51 /// Supported 32-bit range is 0x20000000-0x3fffffff.
52 /// Supported 64-bit range is 0x2000000000000000-0x3fffffffffffffff.
54 #define PI_ENCODE_WARNING(a) ((MAX_BIT >> 2) | (a))
57 /// Error codes reserved for use by PI.
58 /// Supported 32-bit range is 0xa0000000-0xbfffffff.
59 /// Supported 64-bit range is 0xa000000000000000-0xbfffffffffffffff.
61 #define PI_ENCODE_ERROR(a) (MAX_BIT | (MAX_BIT >> 2) | (a))
64 /// Return status codes defined in SMM CIS.
66 #define EFI_INTERRUPT_PENDING PI_ENCODE_ERROR (0)
68 #define EFI_WARN_INTERRUPT_SOURCE_PENDING PI_ENCODE_WARNING (0)
69 #define EFI_WARN_INTERRUPT_SOURCE_QUIESCED PI_ENCODE_WARNING (1)
72 /// Bitmask of values for Authentication Status.
73 /// Authentication Status is returned from EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL
74 /// and the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
76 /// xx00 Image was not signed.
77 /// xxx1 Platform security policy override. Assumes the same meaning as 0010 (the image was signed, the
78 /// signature was tested, and the signature passed authentication test).
79 /// 0010 Image was signed, the signature was tested, and the signature passed authentication test.
80 /// 0110 Image was signed and the signature was not tested.
81 /// 1010 Image was signed, the signature was tested, and the signature failed the authentication test.
84 #define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01
85 #define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02
86 #define EFI_AUTH_STATUS_NOT_TESTED 0x04
87 #define EFI_AUTH_STATUS_TEST_FAILED 0x08
88 #define EFI_AUTH_STATUS_ALL 0x0f
92 /// MMRAM states and capabilities
94 #define EFI_MMRAM_OPEN 0x00000001
95 #define EFI_MMRAM_CLOSED 0x00000002
96 #define EFI_MMRAM_LOCKED 0x00000004
97 #define EFI_CACHEABLE 0x00000008
98 #define EFI_ALLOCATED 0x00000010
99 #define EFI_NEEDS_TESTING 0x00000020
100 #define EFI_NEEDS_ECC_INITIALIZATION 0x00000040
102 #define EFI_SMRAM_OPEN EFI_MMRAM_OPEN
103 #define EFI_SMRAM_CLOSED EFI_MMRAM_CLOSED
104 #define EFI_SMRAM_LOCKED EFI_MMRAM_LOCKED
107 /// Structure describing a MMRAM region and its accessibility attributes.
111 /// Designates the physical address of the MMRAM in memory. This view of memory is
112 /// the same as seen by I/O-based agents, for example, but it may not be the address seen
113 /// by the processors.
115 EFI_PHYSICAL_ADDRESS PhysicalStart
;
117 /// Designates the address of the MMRAM, as seen by software executing on the
118 /// processors. This address may or may not match PhysicalStart.
120 EFI_PHYSICAL_ADDRESS CpuStart
;
122 /// Describes the number of bytes in the MMRAM region.
126 /// Describes the accessibility attributes of the MMRAM. These attributes include the
127 /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical
128 /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC
132 } EFI_MMRAM_DESCRIPTOR
;
134 typedef EFI_MMRAM_DESCRIPTOR EFI_SMRAM_DESCRIPTOR
;
147 /// The returned information associated with the requested TokenNumber. If
148 /// TokenNumber is 0, then PcdType is set to EFI_PCD_TYPE_8.
150 EFI_PCD_TYPE PcdType
;
152 /// The size of the data in bytes associated with the TokenNumber specified. If
153 /// TokenNumber is 0, then PcdSize is set 0.
157 /// The null-terminated ASCII string associated with a given token. If the
158 /// TokenNumber specified was 0, then this field corresponds to the null-terminated
159 /// ASCII string associated with the token's namespace Guid. If NULL, there is no
160 /// name associated with this request.
166 The function prototype for invoking a function on an Application Processor.
168 This definition is used by the UEFI MP Serices Protocol, and the
171 @param[in,out] Buffer The pointer to private data buffer.
175 (EFIAPI
*EFI_AP_PROCEDURE
)(
180 The function prototype for invoking a function on an Application Processor.
182 This definition is used by the UEFI MM MP Serices Protocol.
184 @param[in] ProcedureArgument The pointer to private data buffer.
186 @retval EFI_SUCCESS Excutive the procedure successfully
191 (EFIAPI
*EFI_AP_PROCEDURE2
)(
192 IN VOID
*ProcedureArgument