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 - 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9 
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.
12 
13  @par Revision Reference:
14  These elements are defined in UEFI Platform Initialization Specification 1.2.
15 
16 **/
17 
18 #ifndef __PI_MULTIPHASE_H__
19 #define __PI_MULTIPHASE_H__
20 
21 FILE_LICENCE ( BSD3 );
22 
25 #include <ipxe/efi/Pi/PiBootMode.h>
26 #include <ipxe/efi/Pi/PiHob.h>
30 
31 /**
32  Produces an error code in the range reserved for use by the Platform Initialization
33  Architecture Specification.
34 
35  The supported 32-bit range is 0xA0000000-0xBFFFFFFF
36  The supported 64-bit range is 0xA000000000000000-0xBFFFFFFFFFFFFFFF
37 
38  @param StatusCode The status code value to convert into a warning code.
39  StatusCode must be in the range 0x00000000..0x1FFFFFFF.
40 
41  @return The value specified by StatusCode in the PI reserved range.
42 
43 **/
44 #define DXE_ERROR(StatusCode) (MAX_BIT | (MAX_BIT >> 2) | StatusCode)
45 
46 ///
47 /// If this value is returned by an EFI image, then the image should be unloaded.
48 ///
49 #define EFI_REQUEST_UNLOAD_IMAGE DXE_ERROR (1)
50 
51 ///
52 /// If this value is returned by an API, it means the capability is not yet
53 /// installed/available/ready to use.
54 ///
55 #define EFI_NOT_AVAILABLE_YET DXE_ERROR (2)
56 
57 ///
58 /// Success and warning codes reserved for use by PI.
59 /// Supported 32-bit range is 0x20000000-0x3fffffff.
60 /// Supported 64-bit range is 0x2000000000000000-0x3fffffffffffffff.
61 ///
62 #define PI_ENCODE_WARNING(a) ((MAX_BIT >> 2) | (a))
63 
64 ///
65 /// Error codes reserved for use by PI.
66 /// Supported 32-bit range is 0xa0000000-0xbfffffff.
67 /// Supported 64-bit range is 0xa000000000000000-0xbfffffffffffffff.
68 ///
69 #define PI_ENCODE_ERROR(a) (MAX_BIT | (MAX_BIT >> 2) | (a))
70 
71 ///
72 /// Return status codes defined in SMM CIS.
73 ///
74 #define EFI_INTERRUPT_PENDING PI_ENCODE_ERROR (0)
75 
76 #define EFI_WARN_INTERRUPT_SOURCE_PENDING PI_ENCODE_WARNING (0)
77 #define EFI_WARN_INTERRUPT_SOURCE_QUIESCED PI_ENCODE_WARNING (1)
78 
79 ///
80 /// Bitmask of values for Authentication Status.
81 /// Authentication Status is returned from EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL
82 /// and the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
83 ///
84 /// xx00 Image was not signed.
85 /// xxx1 Platform security policy override. Assumes the same meaning as 0010 (the image was signed, the
86 /// signature was tested, and the signature passed authentication test).
87 /// 0010 Image was signed, the signature was tested, and the signature passed authentication test.
88 /// 0110 Image was signed and the signature was not tested.
89 /// 1010 Image was signed, the signature was tested, and the signature failed the authentication test.
90 ///
91 ///@{
92 #define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01
93 #define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02
94 #define EFI_AUTH_STATUS_NOT_TESTED 0x04
95 #define EFI_AUTH_STATUS_TEST_FAILED 0x08
96 #define EFI_AUTH_STATUS_ALL 0x0f
97 ///@}
98 
99 ///
100 /// SMRAM states and capabilities
101 ///
102 #define EFI_SMRAM_OPEN 0x00000001
103 #define EFI_SMRAM_CLOSED 0x00000002
104 #define EFI_SMRAM_LOCKED 0x00000004
105 #define EFI_CACHEABLE 0x00000008
106 #define EFI_ALLOCATED 0x00000010
107 #define EFI_NEEDS_TESTING 0x00000020
108 #define EFI_NEEDS_ECC_INITIALIZATION 0x00000040
109 
110 ///
111 /// Structure describing a SMRAM region and its accessibility attributes.
112 ///
113 typedef struct {
114  ///
115  /// Designates the physical address of the SMRAM in memory. This view of memory is
116  /// the same as seen by I/O-based agents, for example, but it may not be the address seen
117  /// by the processors.
118  ///
120  ///
121  /// Designates the address of the SMRAM, as seen by software executing on the
122  /// processors. This address may or may not match PhysicalStart.
123  ///
125  ///
126  /// Describes the number of bytes in the SMRAM region.
127  ///
129  ///
130  /// Describes the accessibility attributes of the SMRAM. These attributes include the
131  /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical
132  /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC
133  /// initialization).
134  ///
137 
138 typedef enum {
145 } EFI_PCD_TYPE;
146 
147 typedef struct {
148  ///
149  /// The returned information associated with the requested TokenNumber. If
150  /// TokenNumber is 0, then PcdType is set to EFI_PCD_TYPE_8.
151  ///
153  ///
154  /// The size of the data in bytes associated with the TokenNumber specified. If
155  /// TokenNumber is 0, then PcdSize is set 0.
156  ///
158  ///
159  /// The null-terminated ASCII string associated with a given token. If the
160  /// TokenNumber specified was 0, then this field corresponds to the null-terminated
161  /// ASCII string associated with the token's namespace Guid. If NULL, there is no
162  /// name associated with this request.
163  ///
165 } EFI_PCD_INFO;
166 
167 /**
168  The function prototype for invoking a function on an Application Processor.
169 
170  This definition is used by the UEFI MP Serices Protocol, and the
171  PI SMM System Table.
172 
173  @param[in,out] Buffer The pointer to private data buffer.
174 **/
175 typedef
176 VOID
178  IN OUT VOID *Buffer
179  );
180 
181 #endif
EFI_PCD_TYPE PcdType
The returned information associated with the requested TokenNumber.
Definition: PiMultiPhase.h:152
Present the dependency expression values in PI.
The firmware volume related definitions in PI.
UINT64 RegionState
Describes the accessibility attributes of the SMRAM.
Definition: PiMultiPhase.h:135
UINT64 EFI_PHYSICAL_ADDRESS
64-bit physical memory address.
Definition: UefiBaseType.h:56
#define OUT
Definition: mlx_utils.h:29
EFI_PHYSICAL_ADDRESS PhysicalStart
Designates the physical address of the SMRAM in memory.
Definition: PiMultiPhase.h:119
EFI_PHYSICAL_ADDRESS CpuStart
Designates the address of the SMRAM, as seen by software executing on the processors.
Definition: PiMultiPhase.h:124
#define EFIAPI
SEGOFF16_t Buffer
Buffer address.
Definition: pxe_api.h:65
UINT64 UINTN
Unsigned value of native width.
Definition: ProcessorBind.h:71
#define VOID
Undeclared type.
Definition: Base.h:319
UINT64 PhysicalSize
Describes the number of bytes in the SMRAM region.
Definition: PiMultiPhase.h:128
unsigned long long UINT64
Definition: ProcessorBind.h:54
FILE_LICENCE(BSD3)
#define IN
Definition: mlx_utils.h:28
Present the boot mode values in PI.
The firmware file related definitions in PI.
EFI_PCD_TYPE
Definition: PiMultiPhase.h:138
char CHAR8
Definition: ProcessorBind.h:63
UINTN PcdSize
The size of the data in bytes associated with the TokenNumber specified.
Definition: PiMultiPhase.h:157
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:177
StatusCode related definitions in PI.
CHAR8 * PcdName
The null-terminated ASCII string associated with a given token.
Definition: PiMultiPhase.h:164
Structure describing a SMRAM region and its accessibility attributes.
Definition: PiMultiPhase.h:113