]>
Commit | Line | Data |
---|---|---|
959ccb23 | 1 | /** @file\r |
2 | Include file matches things in PI for multiple module types.\r | |
3 | \r | |
96d6d004 | 4 | Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r |
af2dc6a7 | 5 | This program and the accompanying materials are licensed and made available under \r |
6 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
7 | The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php. \r | |
959ccb23 | 9 | \r |
af2dc6a7 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
959ccb23 | 12 | \r |
959ccb23 | 13 | @par Revision Reference:\r |
af2dc6a7 | 14 | These elements are defined in UEFI Platform Initialization Specification 1.2.\r |
959ccb23 | 15 | \r |
16 | **/\r | |
17 | \r | |
18 | #ifndef __PI_MULTIPHASE_H__\r | |
19 | #define __PI_MULTIPHASE_H__\r | |
20 | \r | |
959ccb23 | 21 | #include <Pi/PiFirmwareVolume.h>\r |
22 | #include <Pi/PiFirmwareFile.h>\r | |
23 | #include <Pi/PiBootMode.h>\r | |
959ccb23 | 24 | #include <Pi/PiHob.h>\r |
25 | #include <Pi/PiDependency.h>\r | |
d7dfd027 | 26 | #include <Pi/PiStatusCode.h>\r |
8c803876 | 27 | #include <Pi/PiS3BootScript.h>\r |
211a2649 | 28 | \r |
b205f267 | 29 | /**\r |
30 | Produces an error code in the range reserved for use by the Platform Initialization\r | |
31 | Architecture Specification.\r | |
32 | \r | |
33 | The supported 32-bit range is 0xA0000000-0xBFFFFFFF \r | |
34 | The supported 64-bit range is 0xA000000000000000-0xBFFFFFFFFFFFFFFF \r | |
35 | \r | |
36 | @param StatusCode The status code value to convert into a warning code. \r | |
37 | StatusCode must be in the range 0x00000000..0x1FFFFFFF.\r | |
38 | \r | |
39 | @return The value specified by StatusCode in the PI reserved range.\r | |
40 | \r | |
41 | **/\r | |
42 | #define DXE_ERROR(StatusCode) (MAX_BIT | (MAX_BIT >> 2) | StatusCode)\r | |
43 | \r | |
44 | ///\r | |
45 | /// If this value is returned by an EFI image, then the image should be unloaded.\r | |
46 | ///\r | |
47 | #define EFI_REQUEST_UNLOAD_IMAGE DXE_ERROR (1)\r | |
48 | \r | |
49 | ///\r | |
50 | /// If this value is returned by an API, it means the capability is not yet \r | |
51 | /// installed/available/ready to use.\r | |
52 | ///\r | |
53 | #define EFI_NOT_AVAILABLE_YET DXE_ERROR (2)\r | |
54 | \r | |
04c5d169 | 55 | ///\r |
af2dc6a7 | 56 | /// Success and warning codes reserved for use by PI.\r |
57 | /// Supported 32-bit range is 0x20000000-0x3fffffff.\r | |
58 | /// Supported 64-bit range is 0x2000000000000000-0x3fffffffffffffff.\r | |
04c5d169 | 59 | ///\r |
60 | #define PI_ENCODE_WARNING(a) ((MAX_BIT >> 2) | (a))\r | |
61 | \r | |
62 | ///\r | |
af2dc6a7 | 63 | /// Error codes reserved for use by PI.\r |
64 | /// Supported 32-bit range is 0xa0000000-0xbfffffff.\r | |
65 | /// Supported 64-bit range is 0xa000000000000000-0xbfffffffffffffff.\r | |
04c5d169 | 66 | ///\r |
67 | #define PI_ENCODE_ERROR(a) (MAX_BIT | (MAX_BIT >> 2) | (a))\r | |
68 | \r | |
69 | /// \r | |
af2dc6a7 | 70 | /// Return status codes defined in SMM CIS.\r |
04c5d169 | 71 | /// \r |
72 | #define EFI_INTERRUPT_PENDING PI_ENCODE_ERROR (0)\r | |
73 | \r | |
74 | #define EFI_WARN_INTERRUPT_SOURCE_PENDING PI_ENCODE_WARNING (0)\r | |
75 | #define EFI_WARN_INTERRUPT_SOURCE_QUIESCED PI_ENCODE_WARNING (1)\r | |
76 | \r | |
b205f267 | 77 | ///\r |
78 | /// Bitmask of values for Authentication Status.\r | |
79 | /// Authentication Status is returned from EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL \r | |
80 | /// and the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI\r | |
81 | ///\r | |
82 | /// xx00 Image was not signed.\r | |
af2dc6a7 | 83 | /// xxx1 Platform security policy override. Assumes the same meaning as 0010 (the image was signed, the\r |
b205f267 | 84 | /// signature was tested, and the signature passed authentication test).\r |
85 | /// 0010 Image was signed, the signature was tested, and the signature passed authentication test.\r | |
86 | /// 0110 Image was signed and the signature was not tested.\r | |
87 | /// 1010 Image was signed, the signature was tested, and the signature failed the authentication test.\r | |
88 | ///\r | |
89 | ///@{\r | |
90 | #define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01\r | |
91 | #define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02\r | |
92 | #define EFI_AUTH_STATUS_NOT_TESTED 0x04\r | |
93 | #define EFI_AUTH_STATUS_TEST_FAILED 0x08\r | |
94 | #define EFI_AUTH_STATUS_ALL 0x0f\r | |
95 | ///@}\r | |
211a2649 | 96 | \r |
79a42176 | 97 | ///\r |
98 | /// SMRAM states and capabilities\r | |
99 | ///\r | |
100 | #define EFI_SMRAM_OPEN 0x00000001\r | |
101 | #define EFI_SMRAM_CLOSED 0x00000002\r | |
102 | #define EFI_SMRAM_LOCKED 0x00000004\r | |
103 | #define EFI_CACHEABLE 0x00000008\r | |
104 | #define EFI_ALLOCATED 0x00000010\r | |
105 | #define EFI_NEEDS_TESTING 0x00000020\r | |
106 | #define EFI_NEEDS_ECC_INITIALIZATION 0x00000040\r | |
107 | \r | |
108 | ///\r | |
af2dc6a7 | 109 | /// Structure describing a SMRAM region and its accessibility attributes.\r |
79a42176 | 110 | ///\r |
111 | typedef struct {\r | |
112 | ///\r | |
113 | /// Designates the physical address of the SMRAM in memory. This view of memory is \r | |
114 | /// the same as seen by I/O-based agents, for example, but it may not be the address seen \r | |
115 | /// by the processors.\r | |
116 | ///\r | |
117 | EFI_PHYSICAL_ADDRESS PhysicalStart;\r | |
118 | ///\r | |
119 | /// Designates the address of the SMRAM, as seen by software executing on the \r | |
120 | /// processors. This address may or may not match PhysicalStart.\r | |
121 | ///\r | |
122 | EFI_PHYSICAL_ADDRESS CpuStart; \r | |
123 | ///\r | |
124 | /// Describes the number of bytes in the SMRAM region.\r | |
125 | ///\r | |
126 | UINT64 PhysicalSize;\r | |
127 | ///\r | |
128 | /// Describes the accessibility attributes of the SMRAM. These attributes include the \r | |
129 | /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical \r | |
130 | /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC \r | |
131 | /// initialization).\r | |
132 | ///\r | |
133 | UINT64 RegionState;\r | |
134 | } EFI_SMRAM_DESCRIPTOR;\r | |
135 | \r | |
96d6d004 SZ |
136 | typedef enum {\r |
137 | EFI_PCD_TYPE_8,\r | |
138 | EFI_PCD_TYPE_16,\r | |
139 | EFI_PCD_TYPE_32,\r | |
140 | EFI_PCD_TYPE_64,\r | |
141 | EFI_PCD_TYPE_BOOL,\r | |
142 | EFI_PCD_TYPE_PTR\r | |
143 | } EFI_PCD_TYPE;\r | |
144 | \r | |
145 | typedef struct {\r | |
146 | ///\r | |
147 | /// The returned information associated with the requested TokenNumber. If\r | |
148 | /// TokenNumber is 0, then PcdType is set to EFI_PCD_TYPE_8.\r | |
149 | ///\r | |
150 | EFI_PCD_TYPE PcdType;\r | |
151 | ///\r | |
152 | /// The size of the data in bytes associated with the TokenNumber specified. If\r | |
153 | /// TokenNumber is 0, then PcdSize is set 0.\r | |
154 | ///\r | |
155 | UINTN PcdSize;\r | |
156 | ///\r | |
157 | /// The null-terminated ASCII string associated with a given token. If the\r | |
158 | /// TokenNumber specified was 0, then this field corresponds to the null-terminated\r | |
159 | /// ASCII string associated with the token's namespace Guid. If NULL, there is no\r | |
160 | /// name associated with this request.\r | |
161 | ///\r | |
162 | CHAR8 *PcdName;\r | |
163 | } EFI_PCD_INFO;\r | |
164 | \r | |
959ccb23 | 165 | #endif\r |