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.2.
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  Produces an error code in the range reserved for use by the Platform Initialization
27  Architecture Specification.
28 
29  The supported 32-bit range is 0xA0000000-0xBFFFFFFF
30  The supported 64-bit range is 0xA000000000000000-0xBFFFFFFFFFFFFFFF
31 
32  @param StatusCode The status code value to convert into a warning code.
33  StatusCode must be in the range 0x00000000..0x1FFFFFFF.
34 
35  @return The value specified by StatusCode in the PI reserved range.
36 
37 **/
38 #define DXE_ERROR(StatusCode) (MAX_BIT | (MAX_BIT >> 2) | StatusCode)
39 
40 ///
41 /// If this value is returned by an EFI image, then the image should be unloaded.
42 ///
43 #define EFI_REQUEST_UNLOAD_IMAGE DXE_ERROR (1)
44 
45 ///
46 /// If this value is returned by an API, it means the capability is not yet
47 /// installed/available/ready to use.
48 ///
49 #define EFI_NOT_AVAILABLE_YET DXE_ERROR (2)
50 
51 ///
52 /// Success and warning codes reserved for use by PI.
53 /// Supported 32-bit range is 0x20000000-0x3fffffff.
54 /// Supported 64-bit range is 0x2000000000000000-0x3fffffffffffffff.
55 ///
56 #define PI_ENCODE_WARNING(a) ((MAX_BIT >> 2) | (a))
57 
58 ///
59 /// Error codes reserved for use by PI.
60 /// Supported 32-bit range is 0xa0000000-0xbfffffff.
61 /// Supported 64-bit range is 0xa000000000000000-0xbfffffffffffffff.
62 ///
63 #define PI_ENCODE_ERROR(a) (MAX_BIT | (MAX_BIT >> 2) | (a))
64 
65 ///
66 /// Return status codes defined in SMM CIS.
67 ///
68 #define EFI_INTERRUPT_PENDING PI_ENCODE_ERROR (0)
69 
70 #define EFI_WARN_INTERRUPT_SOURCE_PENDING PI_ENCODE_WARNING (0)
71 #define EFI_WARN_INTERRUPT_SOURCE_QUIESCED PI_ENCODE_WARNING (1)
72 
73 ///
74 /// Bitmask of values for Authentication Status.
75 /// Authentication Status is returned from EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL
76 /// and the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
77 ///
78 /// xx00 Image was not signed.
79 /// xxx1 Platform security policy override. Assumes the same meaning as 0010 (the image was signed, the
80 /// signature was tested, and the signature passed authentication test).
81 /// 0010 Image was signed, the signature was tested, and the signature passed authentication test.
82 /// 0110 Image was signed and the signature was not tested.
83 /// 1010 Image was signed, the signature was tested, and the signature failed the authentication test.
84 ///
85 ///@{
86 #define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01
87 #define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02
88 #define EFI_AUTH_STATUS_NOT_TESTED 0x04
89 #define EFI_AUTH_STATUS_TEST_FAILED 0x08
90 #define EFI_AUTH_STATUS_ALL 0x0f
91 ///@}
92 
93 ///
94 /// MMRAM states and capabilities
95 ///
96 #define EFI_MMRAM_OPEN 0x00000001
97 #define EFI_MMRAM_CLOSED 0x00000002
98 #define EFI_MMRAM_LOCKED 0x00000004
99 #define EFI_CACHEABLE 0x00000008
100 #define EFI_ALLOCATED 0x00000010
101 #define EFI_NEEDS_TESTING 0x00000020
102 #define EFI_NEEDS_ECC_INITIALIZATION 0x00000040
103 
104 #define EFI_SMRAM_OPEN EFI_MMRAM_OPEN
105 #define EFI_SMRAM_CLOSED EFI_MMRAM_CLOSED
106 #define EFI_SMRAM_LOCKED EFI_MMRAM_LOCKED
107 
108 ///
109 /// Structure describing a MMRAM region and its accessibility attributes.
110 ///
111 typedef struct {
112  ///
113  /// Designates the physical address of the MMRAM in memory. This view of memory is
114  /// the same as seen by I/O-based agents, for example, but it may not be the address seen
115  /// by the processors.
116  ///
118  ///
119  /// Designates the address of the MMRAM, as seen by software executing on the
120  /// processors. This address may or may not match PhysicalStart.
121  ///
123  ///
124  /// Describes the number of bytes in the MMRAM region.
125  ///
127  ///
128  /// Describes the accessibility attributes of the MMRAM. These attributes include the
129  /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical
130  /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC
131  /// initialization).
132  ///
135 
137 
138 ///
139 /// Structure describing a MMRAM region which cannot be used for the MMRAM heap.
140 ///
142  ///
143  /// Starting address of the reserved MMRAM area, as it appears while MMRAM is open.
144  /// Ignored if MmramReservedSize is 0.
145  ///
147  ///
148  /// Number of bytes occupied by the reserved MMRAM area. A size of zero indicates the
149  /// last MMRAM area.
150  ///
153 
154 typedef enum {
161 } EFI_PCD_TYPE;
162 
163 typedef struct {
164  ///
165  /// The returned information associated with the requested TokenNumber. If
166  /// TokenNumber is 0, then PcdType is set to EFI_PCD_TYPE_8.
167  ///
169  ///
170  /// The size of the data in bytes associated with the TokenNumber specified. If
171  /// TokenNumber is 0, then PcdSize is set 0.
172  ///
174  ///
175  /// The null-terminated ASCII string associated with a given token. If the
176  /// TokenNumber specified was 0, then this field corresponds to the null-terminated
177  /// ASCII string associated with the token's namespace Guid. If NULL, there is no
178  /// name associated with this request.
179  ///
181 } EFI_PCD_INFO;
182 
183 /**
184  The function prototype for invoking a function on an Application Processor.
185 
186  This definition is used by the UEFI MP Serices Protocol, and the
187  PI SMM System Table.
188 
189  @param[in,out] Buffer The pointer to private data buffer.
190 **/
191 typedef
192 VOID
194  IN OUT VOID *Buffer
195  );
196 
197 /**
198  The function prototype for invoking a function on an Application Processor.
199 
200  This definition is used by the UEFI MM MP Serices Protocol.
201 
202  @param[in] ProcedureArgument The pointer to private data buffer.
203 
204  @retval EFI_SUCCESS Excutive the procedure successfully
205 
206 **/
207 typedef
210  IN VOID *ProcedureArgument
211  );
212 
213 #endif
EFI_PCD_TYPE PcdType
The returned information associated with the requested TokenNumber.
Definition: PiMultiPhase.h:168
Present the dependency expression values in PI.
EFI_MMRAM_DESCRIPTOR EFI_SMRAM_DESCRIPTOR
Definition: PiMultiPhase.h:136
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:126
UINT64 RegionState
Describes the accessibility attributes of the MMRAM.
Definition: PiMultiPhase.h:133
UINT64 MmramReservedSize
Number of bytes occupied by the reserved MMRAM area.
Definition: PiMultiPhase.h:151
EFI_STATUS(EFIAPI * EFI_AP_PROCEDURE2)(IN VOID *ProcedureArgument)
The function prototype for invoking a function on an Application Processor.
Definition: PiMultiPhase.h:209
#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:122
EFI_PHYSICAL_ADDRESS PhysicalStart
Designates the physical address of the MMRAM in memory.
Definition: PiMultiPhase.h:117
EFI_PHYSICAL_ADDRESS MmramReservedStart
Starting address of the reserved MMRAM area, as it appears while MMRAM is open.
Definition: PiMultiPhase.h:146
#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:141
The firmware file related definitions in PI.
EFI_PCD_TYPE
Definition: PiMultiPhase.h:154
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:173
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:193
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:180
Structure describing a MMRAM region and its accessibility attributes.
Definition: PiMultiPhase.h:111
FILE_LICENCE(BSD2_PATENT)