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