]>
Commit | Line | Data |
---|---|---|
72df7b0f | 1 | /** @file\r |
2 | Framework PEI master include file. This file should match the PEI CIS spec.\r | |
3 | \r | |
4 | Copyright (c) 2006, Intel Corporation \r | |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
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 | |
12 | \r | |
13 | Module Name: PeiCis.h\r | |
14 | \r | |
15 | @par Revision Reference:\r | |
16 | Version 0.91.\r | |
17 | \r | |
18 | **/\r | |
19 | \r | |
20 | #ifndef __PEIM_CIS_H__\r | |
21 | #define __PEIM_CIS_H__\r | |
22 | \r | |
23 | #include <Common/MultiPhase.h>\r | |
24 | #include <Common/BootMode.h>\r | |
25 | #include <Common/Hob.h>\r | |
26 | #include <Common/FirmwareVolumeImageFormat.h>\r | |
27 | #include <Common/FirmwareVolumeHeader.h>\r | |
28 | #include <Common/FirmwareFileSystem.h>\r | |
29 | #include <Common/Dependency.h>\r | |
30 | \r | |
31 | #define TIANO_ERROR(a) (MAX_2_BITS | (a))\r | |
32 | \r | |
33 | #if (EFI_SPECIFICATION_VERSION < 0x00020000)\r | |
34 | //\r | |
35 | // Tiano added a couple of return types. These are owned by UEFI specification\r | |
36 | // and Tiano can not use them. Thus for UEFI 2.0/R9 support we moved the values\r | |
37 | // to a UEFI OEM extension range to conform to UEFI specification.\r | |
38 | //\r | |
39 | #define EFI_NOT_AVAILABLE_YET EFIERR (28)\r | |
40 | #define EFI_UNLOAD_IMAGE EFIERR (29)\r | |
41 | #else\r | |
42 | #define EFI_NOT_AVAILABLE_YET TIANO_ERROR (0)\r | |
43 | #define EFI_UNLOAD_IMAGE TIANO_ERROR (1)\r | |
44 | #endif\r | |
45 | \r | |
46 | //\r | |
47 | // Declare forward referenced data structures\r | |
48 | //\r | |
49 | typedef struct _EFI_PEI_SERVICES EFI_PEI_SERVICES;\r | |
50 | typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR;\r | |
51 | \r | |
52 | \r | |
53 | #include <Ppi/CpuIo.h>\r | |
54 | #include <Ppi/PciCfg.h>\r | |
55 | \r | |
56 | //\r | |
57 | // PEI Specification Revision information\r | |
58 | //\r | |
59 | #define PEI_SPECIFICATION_MAJOR_REVISION 0\r | |
60 | #define PEI_SPECIFICATION_MINOR_REVISION 91\r | |
61 | \r | |
62 | /**\r | |
63 | The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI \r | |
64 | Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header. \r | |
65 | \r | |
66 | @param FfsHeader Pointer to the FFS file header. \r | |
67 | \r | |
68 | @param PeiServices Describes the list of possible PEI Services.\r | |
69 | \r | |
70 | @return Status code\r | |
71 | \r | |
72 | **/\r | |
73 | typedef\r | |
74 | EFI_STATUS\r | |
75 | (EFIAPI *EFI_PEIM_ENTRY_POINT)(\r | |
76 | IN EFI_FFS_FILE_HEADER *FfsHeader,\r | |
77 | IN EFI_PEI_SERVICES **PeiServices\r | |
78 | );\r | |
79 | \r | |
80 | /**\r | |
81 | Entry point of the notification callback function itself within the PEIM.\r | |
82 | \r | |
83 | @param PeiServices Indirect reference to the PEI Services Table.\r | |
84 | \r | |
85 | @param NotifyDescriptor Address of the notification descriptor data structure.\r | |
86 | \r | |
87 | @param Ppi Address of the PPI that was installed.\r | |
88 | \r | |
89 | @return Status code\r | |
90 | \r | |
91 | **/\r | |
92 | typedef\r | |
93 | EFI_STATUS\r | |
94 | (EFIAPI *EFI_PEIM_NOTIFY_ENTRY_POINT) (\r | |
95 | IN EFI_PEI_SERVICES **PeiServices,\r | |
96 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r | |
97 | IN VOID *Ppi\r | |
98 | );\r | |
99 | \r | |
100 | //\r | |
101 | // PEI Ppi Services List Descriptors\r | |
102 | //\r | |
103 | #define EFI_PEI_PPI_DESCRIPTOR_PIC 0x00000001\r | |
104 | #define EFI_PEI_PPI_DESCRIPTOR_PPI 0x00000010\r | |
105 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK 0x00000020\r | |
106 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH 0x00000040\r | |
107 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES 0x00000060\r | |
108 | #define EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST 0x80000000\r | |
109 | \r | |
110 | typedef struct {\r | |
111 | UINTN Flags;\r | |
112 | EFI_GUID *Guid;\r | |
113 | VOID *Ppi;\r | |
114 | } EFI_PEI_PPI_DESCRIPTOR;\r | |
115 | \r | |
116 | struct _EFI_PEI_NOTIFY_DESCRIPTOR {\r | |
117 | UINTN Flags;\r | |
118 | EFI_GUID *Guid;\r | |
119 | EFI_PEIM_NOTIFY_ENTRY_POINT Notify;\r | |
120 | };\r | |
121 | \r | |
122 | /**\r | |
123 | This service is the first one provided by the PEI Foundation. This function \r | |
124 | installs an interface in the PEI PPI database by GUID. The purpose of the \r | |
125 | service is to publish an interface that other parties can use to call \r | |
126 | additional PEIMs.\r | |
127 | \r | |
128 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table \r | |
129 | published by the PEI Foundation. \r | |
130 | \r | |
131 | @param PpiList A pointer to the list of interfaces that the caller shall install.\r | |
132 | \r | |
133 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
134 | \r | |
135 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field. \r | |
136 | \r | |
137 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
138 | \r | |
139 | **/\r | |
140 | typedef\r | |
141 | EFI_STATUS\r | |
142 | (EFIAPI *EFI_PEI_INSTALL_PPI) (\r | |
143 | IN EFI_PEI_SERVICES **PeiServices,\r | |
144 | IN EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
145 | );\r | |
146 | \r | |
147 | /**\r | |
148 | This function reinstalls an interface in the PEI PPI database by GUID. \r | |
149 | The purpose of the service is to publish an interface that other parties \r | |
150 | can use to replace a same-named interface in the protocol database \r | |
151 | with a different interface. \r | |
152 | \r | |
153 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table \r | |
154 | published by the PEI Foundation. \r | |
155 | \r | |
156 | @param OldPpi A pointer to the former PPI in the database. \r | |
157 | \r | |
158 | @param NewPpi A pointer to the new interfaces that the caller shall install.\r | |
159 | \r | |
160 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
161 | \r | |
162 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field. \r | |
163 | \r | |
164 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
165 | \r | |
166 | @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been installed.\r | |
167 | \r | |
168 | **/\r | |
169 | typedef\r | |
170 | EFI_STATUS\r | |
171 | (EFIAPI *EFI_PEI_REINSTALL_PPI) (\r | |
172 | IN EFI_PEI_SERVICES **PeiServices,\r | |
173 | IN EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r | |
174 | IN EFI_PEI_PPI_DESCRIPTOR *NewPpi\r | |
175 | );\r | |
176 | \r | |
177 | /**\r | |
178 | This function locates an interface in the PEI PPI database by GUID. \r | |
179 | \r | |
180 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.\r | |
181 | \r | |
182 | @param Guid A pointer to the GUID whose corresponding interface needs to be found.\r | |
183 | \r | |
184 | @param Instance The N-th instance of the interface that is required.\r | |
185 | \r | |
186 | @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.\r | |
187 | \r | |
188 | @param Ppi A pointer to the instance of the interface. \r | |
189 | \r | |
190 | @retval EFI_SUCCESS The interface was successfully returned.\r | |
191 | \r | |
192 | @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.\r | |
193 | \r | |
194 | **/\r | |
195 | typedef\r | |
196 | EFI_STATUS\r | |
197 | (EFIAPI *EFI_PEI_LOCATE_PPI) (\r | |
198 | IN EFI_PEI_SERVICES **PeiServices,\r | |
199 | IN EFI_GUID *Guid,\r | |
200 | IN UINTN Instance,\r | |
201 | IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r | |
202 | IN OUT VOID **Ppi\r | |
203 | );\r | |
204 | \r | |
205 | /**\r | |
206 | This function installs a notification service to be called back when a \r | |
207 | given interface is installed or reinstalled. The purpose of the service \r | |
208 | is to publish an interface that other parties can use to call additional PPIs \r | |
209 | that may materialize later.\r | |
210 | \r | |
211 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r | |
212 | \r | |
213 | @param NotifyList A pointer to the list of notification interfaces that the caller shall install.\r | |
214 | \r | |
215 | @retval EFI_SUCCESS The interface was successfully installed.\r | |
216 | \r | |
217 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field. \r | |
218 | \r | |
219 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
220 | \r | |
221 | **/\r | |
222 | typedef\r | |
223 | EFI_STATUS\r | |
224 | (EFIAPI *EFI_PEI_NOTIFY_PPI) (\r | |
225 | IN EFI_PEI_SERVICES **PeiServices,\r | |
226 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r | |
227 | );\r | |
228 | \r | |
229 | /**\r | |
230 | This function returns the present value of the boot mode.\r | |
231 | \r | |
232 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. \r | |
233 | \r | |
234 | @param BootMode A pointer to contain the value of the boot mode.\r | |
235 | \r | |
236 | @retval EFI_SUCCESS The boot mode was returned successfully.\r | |
237 | \r | |
238 | **/\r | |
239 | typedef\r | |
240 | EFI_STATUS\r | |
241 | (EFIAPI *EFI_PEI_GET_BOOT_MODE) (\r | |
242 | IN EFI_PEI_SERVICES **PeiServices,\r | |
243 | OUT EFI_BOOT_MODE *BootMode\r | |
244 | );\r | |
245 | \r | |
246 | /**\r | |
247 | This function sets the value of the boot mode.\r | |
248 | \r | |
249 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r | |
250 | \r | |
251 | @param BootMode The value of the boot mode to set.\r | |
252 | \r | |
253 | @retval EFI_SUCCESS The boot mode was returned successfully.\r | |
254 | \r | |
255 | **/\r | |
256 | typedef\r | |
257 | EFI_STATUS\r | |
258 | (EFIAPI *EFI_PEI_SET_BOOT_MODE) (\r | |
259 | IN EFI_PEI_SERVICES **PeiServices,\r | |
260 | IN EFI_BOOT_MODE BootMode\r | |
261 | );\r | |
262 | \r | |
263 | /**\r | |
264 | This function returns the pointer to the list of Hand-Off Blocks (HOBs) in memory. \r | |
265 | \r | |
266 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r | |
267 | \r | |
268 | @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize\r | |
269 | \r | |
270 | @retval EFI_SUCCESS The list was successfully returned.\r | |
271 | \r | |
272 | @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.\r | |
273 | \r | |
274 | **/\r | |
275 | typedef\r | |
276 | EFI_STATUS\r | |
277 | (EFIAPI *EFI_PEI_GET_HOB_LIST) (\r | |
278 | IN EFI_PEI_SERVICES **PeiServices,\r | |
279 | IN OUT VOID **HobList\r | |
280 | );\r | |
281 | \r | |
282 | /**\r | |
283 | Content-type: text/html ]>