]>
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 | |
0647c9ad LG |
66 | @param FfsHeader Pointer to the FFS file header.\r |
67 | @param PeiServices Describes the list of possible PEI Services.\r | |
72df7b0f | 68 | \r |
69 | @return Status code\r | |
70 | \r | |
71 | **/\r | |
72 | typedef\r | |
73 | EFI_STATUS\r | |
74 | (EFIAPI *EFI_PEIM_ENTRY_POINT)(\r | |
75 | IN EFI_FFS_FILE_HEADER *FfsHeader,\r | |
76 | IN EFI_PEI_SERVICES **PeiServices\r | |
77 | );\r | |
78 | \r | |
79 | /**\r | |
80 | Entry point of the notification callback function itself within the PEIM.\r | |
81 | \r | |
0647c9ad | 82 | @param PeiServices Indirect reference to the PEI Services Table.\r |
72df7b0f | 83 | @param NotifyDescriptor Address of the notification descriptor data structure.\r |
0647c9ad | 84 | @param Ppi Address of the PPI that was installed.\r |
72df7b0f | 85 | \r |
86 | @return Status code\r | |
87 | \r | |
88 | **/\r | |
89 | typedef\r | |
90 | EFI_STATUS\r | |
91 | (EFIAPI *EFI_PEIM_NOTIFY_ENTRY_POINT) (\r | |
92 | IN EFI_PEI_SERVICES **PeiServices,\r | |
93 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r | |
94 | IN VOID *Ppi\r | |
95 | );\r | |
96 | \r | |
97 | //\r | |
98 | // PEI Ppi Services List Descriptors\r | |
99 | //\r | |
100 | #define EFI_PEI_PPI_DESCRIPTOR_PIC 0x00000001\r | |
101 | #define EFI_PEI_PPI_DESCRIPTOR_PPI 0x00000010\r | |
102 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK 0x00000020\r | |
103 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH 0x00000040\r | |
104 | #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES 0x00000060\r | |
105 | #define EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST 0x80000000\r | |
106 | \r | |
107 | typedef struct {\r | |
108 | UINTN Flags;\r | |
109 | EFI_GUID *Guid;\r | |
110 | VOID *Ppi;\r | |
111 | } EFI_PEI_PPI_DESCRIPTOR;\r | |
112 | \r | |
113 | struct _EFI_PEI_NOTIFY_DESCRIPTOR {\r | |
114 | UINTN Flags;\r | |
115 | EFI_GUID *Guid;\r | |
116 | EFI_PEIM_NOTIFY_ENTRY_POINT Notify;\r | |
117 | };\r | |
118 | \r | |
119 | /**\r | |
120 | This service is the first one provided by the PEI Foundation. This function \r | |
121 | installs an interface in the PEI PPI database by GUID. The purpose of the \r | |
122 | service is to publish an interface that other parties can use to call \r | |
123 | additional PEIMs.\r | |
124 | \r | |
0647c9ad LG |
125 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table\r |
126 | published by the PEI Foundation.\r | |
127 | @param PpiList A pointer to the list of interfaces that the caller shall install.\r | |
72df7b0f | 128 | \r |
0647c9ad LG |
129 | @retval EFI_SUCCESS The interface was successfully installed.\r |
130 | @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 | |
131 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
72df7b0f | 132 | \r |
133 | **/\r | |
134 | typedef\r | |
135 | EFI_STATUS\r | |
136 | (EFIAPI *EFI_PEI_INSTALL_PPI) (\r | |
137 | IN EFI_PEI_SERVICES **PeiServices,\r | |
138 | IN EFI_PEI_PPI_DESCRIPTOR *PpiList\r | |
139 | );\r | |
140 | \r | |
141 | /**\r | |
142 | This function reinstalls an interface in the PEI PPI database by GUID. \r | |
143 | The purpose of the service is to publish an interface that other parties \r | |
144 | can use to replace a same-named interface in the protocol database \r | |
145 | with a different interface. \r | |
146 | \r | |
0647c9ad LG |
147 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table\r |
148 | published by the PEI Foundation.\r | |
149 | @param OldPpi A pointer to the former PPI in the database.\r | |
150 | @param NewPpi A pointer to the new interfaces that the caller shall install.\r | |
72df7b0f | 151 | \r |
0647c9ad LG |
152 | @retval EFI_SUCCESS The interface was successfully installed.\r |
153 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the \r | |
154 | list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r | |
155 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
156 | @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been installed.\r | |
72df7b0f | 157 | \r |
158 | **/\r | |
159 | typedef\r | |
160 | EFI_STATUS\r | |
161 | (EFIAPI *EFI_PEI_REINSTALL_PPI) (\r | |
162 | IN EFI_PEI_SERVICES **PeiServices,\r | |
163 | IN EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r | |
164 | IN EFI_PEI_PPI_DESCRIPTOR *NewPpi\r | |
165 | );\r | |
166 | \r | |
167 | /**\r | |
168 | This function locates an interface in the PEI PPI database by GUID. \r | |
169 | \r | |
0647c9ad LG |
170 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.\r |
171 | @param Guid A pointer to the GUID whose corresponding interface needs to be found.\r | |
172 | @param Instance The N-th instance of the interface that is required.\r | |
173 | @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.\r | |
174 | @param Ppi A pointer to the instance of the interface.\r | |
72df7b0f | 175 | \r |
0647c9ad LG |
176 | @retval EFI_SUCCESS The interface was successfully returned.\r |
177 | @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.\r | |
72df7b0f | 178 | \r |
179 | **/\r | |
180 | typedef\r | |
181 | EFI_STATUS\r | |
182 | (EFIAPI *EFI_PEI_LOCATE_PPI) (\r | |
183 | IN EFI_PEI_SERVICES **PeiServices,\r | |
184 | IN EFI_GUID *Guid,\r | |
185 | IN UINTN Instance,\r | |
186 | IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r | |
187 | IN OUT VOID **Ppi\r | |
188 | );\r | |
189 | \r | |
190 | /**\r | |
191 | This function installs a notification service to be called back when a \r | |
192 | given interface is installed or reinstalled. The purpose of the service \r | |
193 | is to publish an interface that other parties can use to call additional PPIs \r | |
194 | that may materialize later.\r | |
195 | \r | |
0647c9ad LG |
196 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r |
197 | @param NotifyList A pointer to the list of notification interfaces that the caller shall install.\r | |
72df7b0f | 198 | \r |
0647c9ad LG |
199 | @retval EFI_SUCCESS The interface was successfully installed.\r |
200 | @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the \r | |
201 | list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r | |
202 | @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r | |
72df7b0f | 203 | \r |
204 | **/\r | |
205 | typedef\r | |
206 | EFI_STATUS\r | |
207 | (EFIAPI *EFI_PEI_NOTIFY_PPI) (\r | |
208 | IN EFI_PEI_SERVICES **PeiServices,\r | |
209 | IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r | |
210 | );\r | |
211 | \r | |
212 | /**\r | |
213 | This function returns the present value of the boot mode.\r | |
214 | \r | |
0647c9ad LG |
215 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
216 | @param BootMode A pointer to contain the value of the boot mode.\r | |
72df7b0f | 217 | \r |
0647c9ad | 218 | @retval EFI_SUCCESS The boot mode was returned successfully.\r |
72df7b0f | 219 | \r |
220 | **/\r | |
221 | typedef\r | |
222 | EFI_STATUS\r | |
223 | (EFIAPI *EFI_PEI_GET_BOOT_MODE) (\r | |
224 | IN EFI_PEI_SERVICES **PeiServices,\r | |
225 | OUT EFI_BOOT_MODE *BootMode\r | |
226 | );\r | |
227 | \r | |
228 | /**\r | |
229 | This function sets the value of the boot mode.\r | |
230 | \r | |
0647c9ad LG |
231 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r |
232 | @param BootMode The value of the boot mode to set.\r | |
72df7b0f | 233 | \r |
0647c9ad | 234 | @retval EFI_SUCCESS The boot mode was returned successfully.\r |
72df7b0f | 235 | \r |
236 | **/\r | |
237 | typedef\r | |
238 | EFI_STATUS\r | |
239 | (EFIAPI *EFI_PEI_SET_BOOT_MODE) (\r | |
240 | IN EFI_PEI_SERVICES **PeiServices,\r | |
241 | IN EFI_BOOT_MODE BootMode\r | |
242 | );\r | |
243 | \r | |
244 | /**\r | |
245 | This function returns the pointer to the list of Hand-Off Blocks (HOBs) in memory. \r | |
246 | \r | |
0647c9ad LG |
247 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r |
248 | @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize\r | |
72df7b0f | 249 | \r |
0647c9ad | 250 | @retval EFI_SUCCESS The list was successfully returned.\r |
72df7b0f | 251 | @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.\r |
252 | \r | |
253 | **/\r | |
254 | typedef\r | |
255 | EFI_STATUS\r | |
256 | (EFIAPI *EFI_PEI_GET_HOB_LIST) (\r | |
257 | IN EFI_PEI_SERVICES **PeiServices,\r | |
258 | IN OUT VOID **HobList\r | |
259 | );\r | |
260 | \r | |
261 | /**\r | |
511710d6 | 262 | This service published by the PEI Foundation abstracts the creation of a Hand-Off Block's (HOB's) headers.\r |
72df7b0f | 263 | \r |
0647c9ad LG |
264 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
265 | @param Type The type of HOB to be installed.\r | |
266 | @param Length The length of the HOB to be added.\r | |
267 | @param Hob The address of a pointer that will contain the HOB header.\r | |
72df7b0f | 268 | \r |
0647c9ad LG |
269 | @retval EFI_SUCCESS The HOB was successfully created.\r |
270 | @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r | |
72df7b0f | 271 | \r |
272 | **/\r | |
273 | typedef\r | |
274 | EFI_STATUS\r | |
275 | (EFIAPI *EFI_PEI_CREATE_HOB) (\r | |
276 | IN EFI_PEI_SERVICES **PeiServices,\r | |
277 | IN UINT16 Type,\r | |
278 | IN UINT16 Length,\r | |
279 | IN OUT VOID **Hob\r | |
280 | );\r | |
281 | \r | |
282 | /**\r | |
283 | The purpose of the service is to abstract the capability of the PEI \r | |
284 | Foundation to discover instances of firmware volumes in the system. \r | |
285 | Given the input file pointer, this service searches for the next \r | |
286 | matching file in the Firmware File System (FFS) volume.\r | |
287 | \r | |
0647c9ad LG |
288 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
289 | @param Instance This instance of the firmware volume to find. The value 0 is the Boot Firmware Volume (BFV).\r | |
290 | @param FwVolHeader Pointer to the firmware volume header of the volume to return.\r | |
72df7b0f | 291 | \r |
0647c9ad LG |
292 | @retval EFI_SUCCESS The volume was found.\r |
293 | @retval EFI_NOT_FOUND The volume was not found.\r | |
72df7b0f | 294 | @retval EFI_INVALID_PARAMETER FwVolHeader is NULL\r |
295 | \r | |
296 | **/\r | |
297 | typedef\r | |
298 | EFI_STATUS\r | |
299 | (EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME) (\r | |
300 | IN EFI_PEI_SERVICES **PeiServices,\r | |
301 | IN UINTN Instance,\r | |
302 | IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader\r | |
303 | );\r | |
304 | \r | |
305 | /**\r | |
306 | The purpose of the service is to abstract the capability of the PEI \r | |
307 | Foundation to discover instances of firmware files in the system. \r | |
308 | Given the input file pointer, this service searches for the next matching \r | |
309 | file in the Firmware File System (FFS) volume.\r | |
310 | \r | |
0647c9ad LG |
311 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
312 | @param SearchType A filter to find files only of this type.\r | |
313 | @param FwVolHeader Pointer to the firmware volume header of the volume to search.This parameter \r | |
314 | must point to a valid FFS volume.\r | |
315 | @param FileHeader Pointer to the current file from which to begin searching.This pointer will be \r | |
316 | updated upon return to reflect the file found.\r | |
72df7b0f | 317 | \r |
0647c9ad LG |
318 | @retval EFI_SUCCESS The file was found.\r |
319 | @retval EFI_NOT_FOUND The file was not found.\r | |
320 | @retval EFI_NOT_FOUND The header checksum was not zero.\r | |
72df7b0f | 321 | \r |
322 | **/\r | |
323 | typedef\r | |
324 | EFI_STATUS\r | |
325 | (EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE) (\r | |
326 | IN EFI_PEI_SERVICES **PeiServices,\r | |
327 | IN EFI_FV_FILETYPE SearchType,\r | |
328 | IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,\r | |
329 | IN OUT EFI_FFS_FILE_HEADER **FileHeader\r | |
330 | );\r | |
331 | \r | |
332 | /**\r | |
333 | Given the input file pointer, this service searches for the next \r | |
334 | matching file in the Firmware File System (FFS) volume. \r | |
335 | \r | |
0647c9ad LG |
336 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
337 | @param SectionType The value of the section type to find.\r | |
338 | @param FfsFileHeader A pointer to the file header that contains the set of sections to be searched.\r | |
339 | @param SectionData A pointer to the discovered section, if successful.\r | |
72df7b0f | 340 | \r |
0647c9ad LG |
341 | @retval EFI_SUCCESS The section was found.\r |
342 | @retval EFI_NOT_FOUND The section was not found.\r | |
72df7b0f | 343 | \r |
344 | **/\r | |
345 | typedef\r | |
346 | EFI_STATUS\r | |
347 | (EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA) (\r | |
348 | IN EFI_PEI_SERVICES **PeiServices,\r | |
349 | IN EFI_SECTION_TYPE SectionType,\r | |
350 | IN EFI_FFS_FILE_HEADER *FfsFileHeader,\r | |
351 | IN OUT VOID **SectionData\r | |
352 | );\r | |
353 | \r | |
354 | /**\r | |
355 | This function registers the found memory configuration with the PEI Foundation.\r | |
356 | \r | |
0647c9ad LG |
357 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
358 | @param MemoryBegin The value of a region of installed memory\r | |
359 | @param MemoryLength The corresponding length of a region of installed memory.\r | |
72df7b0f | 360 | \r |
0647c9ad | 361 | @retval EFI_SUCCESS The region was successfully installed in a HOB.\r |
72df7b0f | 362 | @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.\r |
0647c9ad | 363 | @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r |
72df7b0f | 364 | \r |
365 | **/\r | |
366 | typedef\r | |
367 | EFI_STATUS\r | |
368 | (EFIAPI *EFI_PEI_INSTALL_PEI_MEMORY) (\r | |
369 | IN EFI_PEI_SERVICES **PeiServices,\r | |
370 | IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r | |
371 | IN UINT64 MemoryLength\r | |
372 | );\r | |
373 | \r | |
374 | /**\r | |
375 | The purpose of the service is to publish an interface that allows \r | |
376 | PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r | |
377 | \r | |
0647c9ad LG |
378 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
379 | @param MemoryType The type of memory to allocate.\r | |
380 | @param Pages The number of contiguous 4 KB pages to allocate.\r | |
381 | @param Memory Pointer to a physical address. On output, the address is set to the base \r | |
382 | of the page range that was allocated.\r | |
72df7b0f | 383 | \r |
0647c9ad | 384 | @retval EFI_SUCCESS The memory range was successfully allocated.\r |
72df7b0f | 385 | @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.\r |
72df7b0f | 386 | @retval EFI_INVALID_PARAMETER Type is not equal to AllocateAnyPages.\r |
387 | \r | |
388 | **/\r | |
389 | typedef\r | |
390 | EFI_STATUS\r | |
391 | (EFIAPI *EFI_PEI_ALLOCATE_PAGES) (\r | |
392 | IN EFI_PEI_SERVICES **PeiServices,\r | |
393 | IN EFI_MEMORY_TYPE MemoryType,\r | |
394 | IN UINTN Pages,\r | |
395 | IN OUT EFI_PHYSICAL_ADDRESS *Memory\r | |
396 | );\r | |
397 | \r | |
398 | /**\r | |
399 | The purpose of this service is to publish an interface that \r | |
400 | allows PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r | |
401 | \r | |
0647c9ad LG |
402 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
403 | @param Size The number of bytes to allocate from the pool.\r | |
404 | @param Buffer If the call succeeds, a pointer to a pointer to the allocated buffer; undefined otherwise.\r | |
72df7b0f | 405 | \r |
0647c9ad LG |
406 | @retval EFI_SUCCESS The allocation was successful.\r |
407 | @retval EFI_OUT_OF_RESOURCES There is not enough heap to allocate the requested size.\r | |
72df7b0f | 408 | \r |
409 | **/\r | |
410 | typedef\r | |
411 | EFI_STATUS\r | |
412 | (EFIAPI *EFI_PEI_ALLOCATE_POOL) (\r | |
413 | IN EFI_PEI_SERVICES **PeiServices,\r | |
414 | IN UINTN Size,\r | |
415 | OUT VOID **Buffer\r | |
416 | );\r | |
417 | \r | |
418 | /**\r | |
419 | This service copies the contents of one buffer to another buffer.\r | |
420 | \r | |
0647c9ad LG |
421 | @param Destination Pointer to the destination buffer of the memory copy.\r |
422 | @param Source Pointer to the source buffer of the memory copy\r | |
423 | @param Length Number of bytes to copy from Source to Destination.\r | |
72df7b0f | 424 | \r |
425 | @return None\r | |
426 | \r | |
427 | **/\r | |
428 | typedef\r | |
429 | VOID\r | |
430 | (EFIAPI *EFI_PEI_COPY_MEM) (\r | |
431 | IN VOID *Destination,\r | |
432 | IN VOID *Source,\r | |
433 | IN UINTN Length\r | |
434 | );\r | |
435 | \r | |
436 | /**\r | |
437 | The service fills a buffer with a specified value.\r | |
438 | \r | |
0647c9ad LG |
439 | @param Buffer Pointer to the buffer to fill.\r |
440 | @param Size Number of bytes in Buffer to fill.\r | |
441 | @param Value Value to fill Buffer with\r | |
72df7b0f | 442 | \r |
443 | @return None\r | |
444 | \r | |
445 | **/\r | |
446 | typedef\r | |
447 | VOID\r | |
448 | (EFIAPI *EFI_PEI_SET_MEM) (\r | |
449 | IN VOID *Buffer,\r | |
450 | IN UINTN Size,\r | |
451 | IN UINT8 Value\r | |
452 | );\r | |
453 | \r | |
454 | /**\r | |
455 | This service publishes an interface that allows PEIMs to report status codes.\r | |
456 | \r | |
0647c9ad LG |
457 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r |
458 | @param Type Indicates the type of status code being reported.\r | |
459 | @param Value Describes the current status of a hardware or\r | |
460 | software entity. This includes information about the class and\r | |
461 | subclass that is used to classify the entity as well as an operation.\r | |
462 | For progress codes, the operation is the current activity.\r | |
463 | For error codes, it is the exception.For debug codes,it is not defined at this time.\r | |
464 | @param Instance The enumeration of a hardware or software entity within\r | |
465 | the system. A system may contain multiple entities that match a class/subclass\r | |
466 | pairing. The instance differentiates between them. An instance of 0 indicates\r | |
467 | that instance information is unavailable, not meaningful, or not relevant.\r | |
468 | Valid instance numbers start with 1.\r | |
469 | @param CallerId This optional parameter may be used to identify the caller.\r | |
470 | This parameter allows the status code driver to apply different rules to\r | |
471 | different callers.\r | |
472 | @param Data This optional parameter may be used to pass additional data.\r | |
473 | \r | |
474 | @retval EFI_SUCCESS The function completed successfully.\r | |
72df7b0f | 475 | @retval EFI_NOT_AVAILABLE_YET No progress code provider has installed an interface in the system.\r |
476 | \r | |
477 | **/\r | |
478 | typedef\r | |
479 | EFI_STATUS\r | |
480 | (EFIAPI *EFI_PEI_REPORT_STATUS_CODE) (\r | |
481 | IN EFI_PEI_SERVICES **PeiServices,\r | |
482 | IN EFI_STATUS_CODE_TYPE Type,\r | |
483 | IN EFI_STATUS_CODE_VALUE Value,\r | |
484 | IN UINT32 Instance,\r | |
485 | IN EFI_GUID *CallerId OPTIONAL,\r | |
486 | IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
487 | );\r | |
488 | \r | |
489 | /**\r | |
490 | Resets the entire platform.\r | |
491 | \r | |
0647c9ad LG |
492 | @param PeiServices An indirect pointer to the EFI_PEI_SERVICES\r |
493 | table published by the PEI Foundation.\r | |
72df7b0f | 494 | \r |
0647c9ad | 495 | @retval EFI_SUCCESS The function completed successfully.\r |
72df7b0f | 496 | @retval EFI_NOT_AVAILABLE_YET The service has not been installed yet.\r |
497 | \r | |
498 | **/\r | |
499 | typedef\r | |
500 | EFI_STATUS\r | |
501 | (EFIAPI *EFI_PEI_RESET_SYSTEM) (\r | |
502 | IN EFI_PEI_SERVICES **PeiServices\r | |
503 | );\r | |
504 | \r | |
505 | //\r | |
506 | // EFI PEI Services Table\r | |
507 | //\r | |
508 | #define PEI_SERVICES_SIGNATURE 0x5652455320494550ULL\r | |
509 | #define PEI_SERVICES_REVISION ((PEI_SPECIFICATION_MAJOR_REVISION << 16) | (PEI_SPECIFICATION_MINOR_REVISION))\r | |
510 | \r | |
511 | struct _EFI_PEI_SERVICES {\r | |
512 | EFI_TABLE_HEADER Hdr;\r | |
513 | \r | |
514 | //\r | |
515 | // PPI Functions\r | |
516 | //\r | |
517 | EFI_PEI_INSTALL_PPI InstallPpi;\r | |
518 | EFI_PEI_REINSTALL_PPI ReInstallPpi;\r | |
519 | EFI_PEI_LOCATE_PPI LocatePpi;\r | |
520 | EFI_PEI_NOTIFY_PPI NotifyPpi;\r | |
521 | \r | |
522 | //\r | |
523 | // Boot Mode Functions\r | |
524 | //\r | |
525 | EFI_PEI_GET_BOOT_MODE GetBootMode;\r | |
526 | EFI_PEI_SET_BOOT_MODE SetBootMode;\r | |
527 | \r | |
528 | //\r | |
529 | // HOB Functions\r | |
530 | //\r | |
531 | EFI_PEI_GET_HOB_LIST GetHobList;\r | |
532 | EFI_PEI_CREATE_HOB CreateHob;\r | |
533 | \r | |
534 | //\r | |
535 | // Filesystem Functions\r | |
536 | //\r | |
537 | EFI_PEI_FFS_FIND_NEXT_VOLUME FfsFindNextVolume;\r | |
538 | EFI_PEI_FFS_FIND_NEXT_FILE FfsFindNextFile;\r | |
539 | EFI_PEI_FFS_FIND_SECTION_DATA FfsFindSectionData;\r | |
540 | \r | |
541 | //\r | |
542 | // Memory Functions\r | |
543 | //\r | |
544 | EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;\r | |
545 | EFI_PEI_ALLOCATE_PAGES AllocatePages;\r | |
546 | EFI_PEI_ALLOCATE_POOL AllocatePool;\r | |
547 | EFI_PEI_COPY_MEM CopyMem;\r | |
548 | EFI_PEI_SET_MEM SetMem;\r | |
549 | \r | |
550 | //\r | |
551 | // Status Code\r | |
552 | //\r | |
553 | EFI_PEI_REPORT_STATUS_CODE PeiReportStatusCode;\r | |
554 | \r | |
555 | //\r | |
556 | // Reset\r | |
557 | //\r | |
558 | EFI_PEI_RESET_SYSTEM PeiResetSystem;\r | |
559 | \r | |
560 | //\r | |
561 | // Pointer to PPI interface\r | |
562 | //\r | |
563 | EFI_PEI_CPU_IO_PPI *CpuIo;\r | |
564 | EFI_PEI_PCI_CFG_PPI *PciCfg;\r | |
565 | \r | |
566 | };\r | |
567 | \r | |
568 | typedef struct {\r | |
569 | UINTN BootFirmwareVolume;\r | |
570 | UINTN SizeOfCacheAsRam;\r | |
571 | EFI_PEI_PPI_DESCRIPTOR *DispatchTable;\r | |
572 | } EFI_PEI_STARTUP_DESCRIPTOR;\r | |
573 | \r | |
574 | #include <Common/EfiImage.h>\r | |
575 | #include <Common/StatusCode.h>\r | |
576 | #include <Common/BootScript.h>\r | |
577 | #include <Common/Capsule.h>\r | |
578 | \r | |
579 | #include <Guid/Apriori.h>\r | |
580 | #include <Guid/Capsule.h>\r | |
581 | #include <Guid/DxeServices.h>\r | |
582 | #include <Guid/HobList.h>\r | |
583 | #include <Guid/MemoryAllocationHob.h>\r | |
584 | #include <Guid/FirmwareFileSystem.h>\r | |
585 | #include <Guid/SmramMemoryReserve.h>\r | |
586 | #include <Guid/GlobalVariable.h>\r | |
587 | \r | |
588 | #include <Ppi/BlockIo.h>\r | |
589 | #include <Ppi/BootInRecoveryMode.h>\r | |
590 | #include <Ppi/BootScriptExecuter.h>\r | |
591 | #include <Ppi/DeviceRecoveryModule.h>\r | |
592 | #include <Ppi/DxeIpl.h>\r | |
593 | #include <Ppi/EndOfPeiPhase.h>\r | |
594 | #include <Ppi/FindFv.h>\r | |
595 | #include <Ppi/LoadFile.h>\r | |
596 | #include <Ppi/MasterBootMode.h>\r | |
597 | #include <Ppi/MemoryDiscovered.h>\r | |
598 | #include <Ppi/Pcd.h>\r | |
599 | #include <Ppi/ReadOnlyVariable.h>\r | |
600 | #include <Ppi/RecoveryModule.h>\r | |
601 | #include <Ppi/Reset.h>\r | |
602 | #include <Ppi/S3Resume.h>\r | |
603 | #include <Ppi/SecPlatformInformation.h>\r | |
604 | #include <Ppi/SectionExtraction.h>\r | |
605 | #include <Ppi/Security.h>\r | |
606 | #include <Ppi/Smbus.h>\r | |
607 | #include <Ppi/Stall.h>\r | |
608 | #include <Ppi/StatusCode.h>\r | |
609 | \r | |
610 | #include <Protocol/FirmwareVolumeBlock.h>\r | |
72df7b0f | 611 | #endif\r |