]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Pi/PiPeiCis.h
MdePkg/PiPeiCis.h: Change comments of EFI_PEI_RESET2_SYSTEM
[mirror_edk2.git] / MdePkg / Include / Pi / PiPeiCis.h
CommitLineData
959ccb23 1/** @file\r
2 PI PEI master include file. This file should match the PI spec.\r
3\r
efaed0ab 4Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
9344f092 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
959ccb23 6\r
959ccb23 7 @par Revision Reference:\r
27dc016c 8 PI Version 1.6.\r
959ccb23 9\r
10**/\r
11\r
12#ifndef __PI_PEICIS_H__\r
13#define __PI_PEICIS_H__\r
14\r
d7dfd027 15#include <Uefi/UefiMultiPhase.h>\r
959ccb23 16#include <Pi/PiMultiPhase.h>\r
17\r
6de794cd 18///\r
af2dc6a7 19/// The handles of EFI FV.\r
9095d37b 20///\r
00edb218 21typedef VOID *EFI_PEI_FV_HANDLE;\r
6de794cd 22\r
23///\r
af2dc6a7 24/// The handles of EFI FFS.\r
9095d37b 25///\r
00edb218 26typedef VOID *EFI_PEI_FILE_HANDLE;\r
959ccb23 27\r
6de794cd 28///\r
af2dc6a7 29/// Declare the forward reference data structure for EFI_PEI_SERVICE.\r
9095d37b 30///\r
959ccb23 31typedef struct _EFI_PEI_SERVICES EFI_PEI_SERVICES;\r
6de794cd 32\r
33///\r
af2dc6a7 34/// Declare the forward reference data structure for EFI_PEI_NOTIFY_DESCRIPTOR.\r
9095d37b 35///\r
959ccb23 36typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR;\r
37\r
38\r
39#include <Ppi/CpuIo.h>\r
40#include <Ppi/PciCfg2.h>\r
41\r
fb3df220 42\r
959ccb23 43/**\r
9095d37b
LG
44 The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI\r
45 Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header.\r
959ccb23 46\r
6de794cd 47 @param FileHandle Pointer to the FFS file header.\r
959ccb23 48 @param PeiServices Describes the list of possible PEI Services.\r
49\r
373b5cf9 50 @retval EFI_SUCCESS The PEI completed successfully.\r
51 @retval !EFI_SUCCESS There is error in PEIM.\r
959ccb23 52\r
53**/\r
54typedef\r
55EFI_STATUS\r
1c9d209f 56(EFIAPI *EFI_PEIM_ENTRY_POINT2)(\r
b0d803fe 57 IN EFI_PEI_FILE_HANDLE FileHandle,\r
58 IN CONST EFI_PEI_SERVICES **PeiServices\r
959ccb23 59 );\r
60\r
61/**\r
62 Entry point of the notification callback function itself within the PEIM.\r
63\r
64 @param PeiServices Indirect reference to the PEI Services Table.\r
65 @param NotifyDescriptor Address of the notification descriptor data structure.\r
66 @param Ppi Address of the PPI that was installed.\r
67\r
373b5cf9 68 @return Status of the notification.\r
66e5133c 69 The status code returned from this function is ignored.\r
959ccb23 70**/\r
71typedef\r
72EFI_STATUS\r
6de794cd 73(EFIAPI *EFI_PEIM_NOTIFY_ENTRY_POINT)(\r
959ccb23 74 IN EFI_PEI_SERVICES **PeiServices,\r
75 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
76 IN VOID *Ppi\r
77 );\r
78\r
79//\r
80// PEI Ppi Services List Descriptors\r
81//\r
82#define EFI_PEI_PPI_DESCRIPTOR_PIC 0x00000001\r
83#define EFI_PEI_PPI_DESCRIPTOR_PPI 0x00000010\r
84#define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK 0x00000020\r
85#define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH 0x00000040\r
86#define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES 0x00000060\r
87#define EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST 0x80000000\r
88\r
6de794cd 89///\r
90/// The data structure through which a PEIM describes available services to the PEI Foundation.\r
9095d37b 91///\r
959ccb23 92typedef struct {\r
1bf79370
LG
93 ///\r
94 /// This field is a set of flags describing the characteristics of this imported table entry.\r
95 /// All flags are defined as EFI_PEI_PPI_DESCRIPTOR_***, which can also be combined into one.\r
96 ///\r
959ccb23 97 UINTN Flags;\r
1bf79370
LG
98 ///\r
99 /// The address of the EFI_GUID that names the interface.\r
100 ///\r
959ccb23 101 EFI_GUID *Guid;\r
1bf79370
LG
102 ///\r
103 /// A pointer to the PPI. It contains the information necessary to install a service.\r
104 ///\r
959ccb23 105 VOID *Ppi;\r
106} EFI_PEI_PPI_DESCRIPTOR;\r
107\r
9095d37b
LG
108///\r
109/// The data structure in a given PEIM that tells the PEI\r
6de794cd 110/// Foundation where to invoke the notification service.\r
9095d37b 111///\r
959ccb23 112struct _EFI_PEI_NOTIFY_DESCRIPTOR {\r
1bf79370 113 ///\r
af2dc6a7 114 /// Details if the type of notification are callback or dispatch.\r
1bf79370 115 ///\r
959ccb23 116 UINTN Flags;\r
1bf79370
LG
117 ///\r
118 /// The address of the EFI_GUID that names the interface.\r
119 ///\r
959ccb23 120 EFI_GUID *Guid;\r
1bf79370
LG
121 ///\r
122 /// Address of the notification callback function itself within the PEIM.\r
123 ///\r
959ccb23 124 EFI_PEIM_NOTIFY_ENTRY_POINT Notify;\r
125};\r
126\r
8546d5a6 127///\r
128/// This data structure is the means by which callable services are installed and\r
129/// notifications are registered in the PEI phase.\r
130///\r
131typedef union {\r
132 ///\r
133 /// The typedef structure of the notification descriptor.\r
134 ///\r
135 EFI_PEI_NOTIFY_DESCRIPTOR Notify;\r
136 ///\r
137 /// The typedef structure of the PPI descriptor.\r
138 ///\r
139 EFI_PEI_PPI_DESCRIPTOR Ppi;\r
140} EFI_PEI_DESCRIPTOR;\r
141\r
959ccb23 142/**\r
9095d37b
LG
143 This service is the first one provided by the PEI Foundation. This function\r
144 installs an interface in the PEI PPI database by GUID. The purpose of the\r
145 service is to publish an interface that other parties can use to call\r
959ccb23 146 additional PEIMs.\r
147\r
148 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table\r
149 published by the PEI Foundation.\r
150 @param PpiList A pointer to the list of interfaces that the caller shall install.\r
151\r
152 @retval EFI_SUCCESS The interface was successfully installed.\r
9095d37b
LG
153 @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI\r
154 descriptors in the list do not have the\r
af2dc6a7 155 EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r
959ccb23 156 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r
157\r
158**/\r
159typedef\r
160EFI_STATUS\r
6de794cd 161(EFIAPI *EFI_PEI_INSTALL_PPI)(\r
1c280088 162 IN CONST EFI_PEI_SERVICES **PeiServices,\r
163 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r
959ccb23 164 );\r
165\r
166/**\r
9095d37b
LG
167 This function reinstalls an interface in the PEI PPI database by GUID.\r
168 The purpose of the service is to publish an interface that other parties\r
169 can use to replace a same-named interface in the protocol database\r
170 with a different interface.\r
959ccb23 171\r
172 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table\r
173 published by the PEI Foundation.\r
174 @param OldPpi A pointer to the former PPI in the database.\r
175 @param NewPpi A pointer to the new interfaces that the caller shall install.\r
176\r
177 @retval EFI_SUCCESS The interface was successfully installed.\r
9095d37b 178 @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the\r
959ccb23 179 list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.\r
180 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r
181 @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been installed.\r
182\r
183**/\r
184typedef\r
185EFI_STATUS\r
6de794cd 186(EFIAPI *EFI_PEI_REINSTALL_PPI)(\r
1c280088 187 IN CONST EFI_PEI_SERVICES **PeiServices,\r
188 IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r
189 IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi\r
959ccb23 190 );\r
191\r
192/**\r
9095d37b 193 This function locates an interface in the PEI PPI database by GUID.\r
959ccb23 194\r
195 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.\r
196 @param Guid A pointer to the GUID whose corresponding interface needs to be found.\r
197 @param Instance The N-th instance of the interface that is required.\r
198 @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.\r
199 @param Ppi A pointer to the instance of the interface.\r
200\r
201 @retval EFI_SUCCESS The interface was successfully returned.\r
202 @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.\r
203\r
204**/\r
205typedef\r
206EFI_STATUS\r
6de794cd 207(EFIAPI *EFI_PEI_LOCATE_PPI)(\r
1c280088 208 IN CONST EFI_PEI_SERVICES **PeiServices,\r
209 IN CONST EFI_GUID *Guid,\r
210 IN UINTN Instance,\r
211 IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL,\r
212 IN OUT VOID **Ppi\r
959ccb23 213 );\r
214\r
215/**\r
9095d37b
LG
216 This function installs a notification service to be called back when a\r
217 given interface is installed or reinstalled. The purpose of the service\r
218 is to publish an interface that other parties can use to call additional PPIs\r
959ccb23 219 that may materialize later.\r
220\r
221 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r
222 @param NotifyList A pointer to the list of notification interfaces that the caller shall install.\r
223\r
224 @retval EFI_SUCCESS The interface was successfully installed.\r
9095d37b 225 @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL, or any of the PEI PPI descriptors in the\r
cc948847 226 list do not have the EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES bit set in the Flags field.\r
959ccb23 227 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.\r
228\r
229**/\r
230typedef\r
231EFI_STATUS\r
6de794cd 232(EFIAPI *EFI_PEI_NOTIFY_PPI)(\r
1c280088 233 IN CONST EFI_PEI_SERVICES **PeiServices,\r
234 IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r
959ccb23 235 );\r
236\r
237/**\r
238 This function returns the present value of the boot mode.\r
239\r
240 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
241 @param BootMode A pointer to contain the value of the boot mode.\r
242\r
af2dc6a7 243 @retval EFI_SUCCESS The boot mode returned successfully.\r
959ccb23 244\r
245**/\r
246typedef\r
247EFI_STATUS\r
6de794cd 248(EFIAPI *EFI_PEI_GET_BOOT_MODE)(\r
1c280088 249 IN CONST EFI_PEI_SERVICES **PeiServices,\r
250 OUT EFI_BOOT_MODE *BootMode\r
959ccb23 251 );\r
252\r
253/**\r
254 This function sets the value of the boot mode.\r
255\r
256 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r
257 @param BootMode The value of the boot mode to set.\r
258\r
af2dc6a7 259 @retval EFI_SUCCESS The boot mode returned successfully.\r
959ccb23 260\r
261**/\r
262typedef\r
263EFI_STATUS\r
6de794cd 264(EFIAPI *EFI_PEI_SET_BOOT_MODE)(\r
1c280088 265 IN CONST EFI_PEI_SERVICES **PeiServices,\r
266 IN EFI_BOOT_MODE BootMode\r
959ccb23 267 );\r
268\r
269/**\r
9095d37b 270 This function returns the pointer to the list of Hand-Off Blocks (HOBs) in memory.\r
959ccb23 271\r
272 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation\r
273 @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize\r
274\r
275 @retval EFI_SUCCESS The list was successfully returned.\r
276 @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.\r
277\r
278**/\r
279typedef\r
280EFI_STATUS\r
6de794cd 281(EFIAPI *EFI_PEI_GET_HOB_LIST)(\r
1c280088 282 IN CONST EFI_PEI_SERVICES **PeiServices,\r
67c89a21 283 OUT VOID **HobList\r
959ccb23 284 );\r
285\r
286/**\r
af2dc6a7 287 This service, published by the PEI Foundation, abstracts the creation of a Hand-Off Block's (HOB's) headers.\r
959ccb23 288\r
289 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
290 @param Type The type of HOB to be installed.\r
291 @param Length The length of the HOB to be added.\r
292 @param Hob The address of a pointer that will contain the HOB header.\r
293\r
294 @retval EFI_SUCCESS The HOB was successfully created.\r
295 @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r
296\r
297**/\r
298typedef\r
299EFI_STATUS\r
6de794cd 300(EFIAPI *EFI_PEI_CREATE_HOB)(\r
1c280088 301 IN CONST EFI_PEI_SERVICES **PeiServices,\r
302 IN UINT16 Type,\r
303 IN UINT16 Length,\r
7b1bf9f6 304 IN OUT VOID **Hob\r
959ccb23 305 );\r
306\r
307/**\r
9095d37b
LG
308 The purpose of the service is to abstract the capability of the PEI\r
309 Foundation to discover instances of firmware volumes in the system.\r
c7c308ad 310\r
311 This service enables PEIMs to discover additional firmware volumes. The PEI Foundation uses this\r
312 service to abstract the locations and formats of various firmware volumes. These volumes include\r
313 the Boot Firmware Volume and any other volumes exposed by EFI_PEI_FV_PPI. The service\r
314 returns a volume handle of type EFI_PEI_FV_HANDLE, which must be unique within the system.\r
959ccb23 315\r
316 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
c7c308ad 317 @param Instance This instance of the firmware volume to find.\r
318 The value 0 is the Boot Firmware Volume (BFV).\r
319 @param VolumeHandle On exit, points to the next volumn handle or NULL if it does not exist.\r
959ccb23 320\r
321 @retval EFI_SUCCESS The volume was found.\r
322 @retval EFI_NOT_FOUND The volume was not found.\r
7b1bf9f6 323 @retval EFI_INVALID_PARAMETER VolumeHandle is NULL.\r
959ccb23 324\r
325**/\r
326typedef\r
327EFI_STATUS\r
6de794cd 328(EFIAPI *EFI_PEI_FFS_FIND_NEXT_VOLUME2)(\r
1c280088 329 IN CONST EFI_PEI_SERVICES **PeiServices,\r
330 IN UINTN Instance,\r
331 OUT EFI_PEI_FV_HANDLE *VolumeHandle\r
959ccb23 332 );\r
333\r
334/**\r
c7c308ad 335 Searches for the next matching file in the firmware volume.\r
336\r
337 This service enables PEIMs to discover firmware files within a specified volume.\r
338 To find the first instance of a firmware file, pass a FileHandle value of NULL into the service.\r
339 The service returns a file handle of type EFI_PEI_FILE_HANDLE, which must be unique within\r
340 the system.\r
959ccb23 341\r
342 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
343 @param SearchType A filter to find files only of this type.\r
c7c308ad 344 @param FvHandle Handle of firmware volume in which to search.\r
345 @param FileHandle On entry, points to the current handle from which to begin searching\r
346 or NULL to start at the beginning of the firmware volume.\r
347 On exit, points the file handle of the next file in the volume or NULL\r
348 if there are no more files.\r
959ccb23 349\r
c7c308ad 350 @retval EFI_SUCCESS The file was found.\r
351 @retval EFI_NOT_FOUND The file was not found.\r
352 @retval EFI_NOT_FOUND The header checksum was not zero.\r
959ccb23 353\r
354**/\r
355typedef\r
356EFI_STATUS\r
6de794cd 357(EFIAPI *EFI_PEI_FFS_FIND_NEXT_FILE2)(\r
1c280088 358 IN CONST EFI_PEI_SERVICES **PeiServices,\r
359 IN EFI_FV_FILETYPE SearchType,\r
c7c308ad 360 IN CONST EFI_PEI_FV_HANDLE FvHandle,\r
1c280088 361 IN OUT EFI_PEI_FILE_HANDLE *FileHandle\r
959ccb23 362 );\r
363\r
364/**\r
c7c308ad 365 Searches for the next matching section within the specified file.\r
366\r
367 This service enables PEI modules to discover the first section of a given type within a valid file.\r
368 This service will search within encapsulation sections (compression and GUIDed) as well. It will\r
369 search inside of a GUIDed section or a compressed section, but may not, for example, search a\r
370 GUIDed section inside a GUIDes section.\r
af2dc6a7 371 This service will not search within compression sections or GUIDed sections that require\r
c7c308ad 372 extraction if memory is not present.\r
959ccb23 373\r
374 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
375 @param SectionType The value of the section type to find.\r
c7c308ad 376 @param FileHandle Handle of the firmware file to search.\r
959ccb23 377 @param SectionData A pointer to the discovered section, if successful.\r
378\r
c7c308ad 379 @retval EFI_SUCCESS The section was found.\r
380 @retval EFI_NOT_FOUND The section was not found.\r
959ccb23 381\r
382**/\r
383typedef\r
384EFI_STATUS\r
6de794cd 385(EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA2)(\r
1c280088 386 IN CONST EFI_PEI_SERVICES **PeiServices,\r
387 IN EFI_SECTION_TYPE SectionType,\r
388 IN EFI_PEI_FILE_HANDLE FileHandle,\r
c7c308ad 389 OUT VOID **SectionData\r
959ccb23 390 );\r
391\r
c7935105
SZ
392/**\r
393 Searches for the next matching section within the specified file.\r
394\r
395 This service enables PEI modules to discover the section of a given type within a valid file.\r
396 This service will search within encapsulation sections (compression and GUIDed) as well. It will\r
397 search inside of a GUIDed section or a compressed section, but may not, for example, search a\r
398 GUIDed section inside a GUIDes section.\r
399 This service will not search within compression sections or GUIDed sections that require\r
400 extraction if memory is not present.\r
401\r
402 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
403 @param SectionType The value of the section type to find.\r
404 @param SectionInstance Section instance to find.\r
405 @param FileHandle Handle of the firmware file to search.\r
406 @param SectionData A pointer to the discovered section, if successful.\r
407 @param AuthenticationStatus A pointer to the authentication status for this section.\r
408\r
409 @retval EFI_SUCCESS The section was found.\r
410 @retval EFI_NOT_FOUND The section was not found.\r
411\r
412**/\r
413typedef\r
414EFI_STATUS\r
415(EFIAPI *EFI_PEI_FFS_FIND_SECTION_DATA3)(\r
416 IN CONST EFI_PEI_SERVICES **PeiServices,\r
417 IN EFI_SECTION_TYPE SectionType,\r
418 IN UINTN SectionInstance,\r
419 IN EFI_PEI_FILE_HANDLE FileHandle,\r
420 OUT VOID **SectionData,\r
421 OUT UINT32 *AuthenticationStatus\r
422 );\r
423\r
959ccb23 424/**\r
425 This function registers the found memory configuration with the PEI Foundation.\r
426\r
427 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
af2dc6a7 428 @param MemoryBegin The value of a region of installed memory.\r
959ccb23 429 @param MemoryLength The corresponding length of a region of installed memory.\r
430\r
431 @retval EFI_SUCCESS The region was successfully installed in a HOB.\r
432 @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.\r
433 @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.\r
434\r
435**/\r
436typedef\r
437EFI_STATUS\r
6de794cd 438(EFIAPI *EFI_PEI_INSTALL_PEI_MEMORY)(\r
1c280088 439 IN CONST EFI_PEI_SERVICES **PeiServices,\r
959ccb23 440 IN EFI_PHYSICAL_ADDRESS MemoryBegin,\r
441 IN UINT64 MemoryLength\r
442 );\r
443\r
444/**\r
9095d37b 445 The purpose of the service is to publish an interface that allows\r
959ccb23 446 PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r
447\r
9f43484c
SZ
448 Prior to InstallPeiMemory() being called, PEI will allocate pages from the heap.\r
449 After InstallPeiMemory() is called, PEI will allocate pages within the region\r
450 of memory provided by InstallPeiMemory() service in a best-effort fashion.\r
451 Location-specific allocations are not managed by the PEI foundation code.\r
452\r
959ccb23 453 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
454 @param MemoryType The type of memory to allocate.\r
455 @param Pages The number of contiguous 4 KB pages to allocate.\r
9095d37b 456 @param Memory A pointer to a physical address. On output, the address is set to the base\r
959ccb23 457 of the page range that was allocated.\r
458\r
459 @retval EFI_SUCCESS The memory range was successfully allocated.\r
460 @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.\r
9095d37b 461 @retval EFI_INVALID_PARAMETER The type is not equal to EfiLoaderCode, EfiLoaderData, EfiRuntimeServicesCode,\r
ded5aa23 462 EfiRuntimeServicesData, EfiBootServicesCode, EfiBootServicesData,\r
b7113eb0 463 EfiACPIReclaimMemory, EfiReservedMemoryType, or EfiACPIMemoryNVS.\r
959ccb23 464\r
465**/\r
466typedef\r
467EFI_STATUS\r
6de794cd 468(EFIAPI *EFI_PEI_ALLOCATE_PAGES)(\r
1c280088 469 IN CONST EFI_PEI_SERVICES **PeiServices,\r
959ccb23 470 IN EFI_MEMORY_TYPE MemoryType,\r
471 IN UINTN Pages,\r
c7c308ad 472 OUT EFI_PHYSICAL_ADDRESS *Memory\r
959ccb23 473 );\r
474\r
9f43484c
SZ
475/**\r
476 Frees memory pages.\r
477\r
478 @param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
479 @param[in] Memory The base physical address of the pages to be freed.\r
480 @param[in] Pages The number of contiguous 4 KB pages to free.\r
481\r
482 @retval EFI_SUCCESS The requested pages were freed.\r
483 @retval EFI_INVALID_PARAMETER Memory is not a page-aligned address or Pages is invalid.\r
484 @retval EFI_NOT_FOUND The requested memory pages were not allocated with\r
485 AllocatePages().\r
486\r
487**/\r
488typedef\r
489EFI_STATUS\r
490(EFIAPI *EFI_PEI_FREE_PAGES) (\r
491 IN CONST EFI_PEI_SERVICES **PeiServices,\r
492 IN EFI_PHYSICAL_ADDRESS Memory,\r
493 IN UINTN Pages\r
494 );\r
495\r
959ccb23 496/**\r
9095d37b 497 The purpose of this service is to publish an interface that\r
959ccb23 498 allows PEIMs to allocate memory ranges that are managed by the PEI Foundation.\r
499\r
500 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
501 @param Size The number of bytes to allocate from the pool.\r
502 @param Buffer If the call succeeds, a pointer to a pointer to the allocated buffer; undefined otherwise.\r
503\r
504 @retval EFI_SUCCESS The allocation was successful.\r
505 @retval EFI_OUT_OF_RESOURCES There is not enough heap to allocate the requested size.\r
506\r
507**/\r
508typedef\r
509EFI_STATUS\r
6de794cd 510(EFIAPI *EFI_PEI_ALLOCATE_POOL)(\r
1c280088 511 IN CONST EFI_PEI_SERVICES **PeiServices,\r
959ccb23 512 IN UINTN Size,\r
513 OUT VOID **Buffer\r
514 );\r
515\r
516/**\r
517 This service copies the contents of one buffer to another buffer.\r
518\r
af2dc6a7 519 @param Destination The pointer to the destination buffer of the memory copy.\r
520 @param Source The pointer to the source buffer of the memory copy.\r
521 @param Length The number of bytes to copy from Source to Destination.\r
959ccb23 522\r
959ccb23 523**/\r
524typedef\r
525VOID\r
6de794cd 526(EFIAPI *EFI_PEI_COPY_MEM)(\r
959ccb23 527 IN VOID *Destination,\r
528 IN VOID *Source,\r
529 IN UINTN Length\r
530 );\r
531\r
532/**\r
533 The service fills a buffer with a specified value.\r
534\r
af2dc6a7 535 @param Buffer The pointer to the buffer to fill.\r
536 @param Size The number of bytes in Buffer to fill.\r
537 @param Value The value to fill Buffer with.\r
959ccb23 538\r
959ccb23 539**/\r
540typedef\r
541VOID\r
6de794cd 542(EFIAPI *EFI_PEI_SET_MEM)(\r
959ccb23 543 IN VOID *Buffer,\r
544 IN UINTN Size,\r
545 IN UINT8 Value\r
546 );\r
547\r
548/**\r
549 This service publishes an interface that allows PEIMs to report status codes.\r
550\r
c7c308ad 551 ReportStatusCode() is called by PEIMs that wish to report status information on their\r
552 progress. The principal use model is for a PEIM to emit one of the standard 32-bit error codes. This\r
553 will allow a platform owner to ascertain the state of the system, especially under conditions where\r
554 the full consoles might not have been installed.\r
555\r
959ccb23 556 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.\r
557 @param Type Indicates the type of status code being reported.\r
558 @param Value Describes the current status of a hardware or\r
559 software entity. This includes information about the class and\r
560 subclass that is used to classify the entity as well as an operation.\r
561 For progress codes, the operation is the current activity.\r
562 For error codes, it is the exception.For debug codes,it is not defined at this time.\r
563 @param Instance The enumeration of a hardware or software entity within\r
564 the system. A system may contain multiple entities that match a class/subclass\r
565 pairing. The instance differentiates between them. An instance of 0 indicates\r
566 that instance information is unavailable, not meaningful, or not relevant.\r
567 Valid instance numbers start with 1.\r
568 @param CallerId This optional parameter may be used to identify the caller.\r
569 This parameter allows the status code driver to apply different rules to\r
570 different callers.\r
571 @param Data This optional parameter may be used to pass additional data.\r
572\r
573 @retval EFI_SUCCESS The function completed successfully.\r
574 @retval EFI_NOT_AVAILABLE_YET No progress code provider has installed an interface in the system.\r
575\r
576**/\r
577typedef\r
578EFI_STATUS\r
6de794cd 579(EFIAPI *EFI_PEI_REPORT_STATUS_CODE)(\r
1c280088 580 IN CONST EFI_PEI_SERVICES **PeiServices,\r
581 IN EFI_STATUS_CODE_TYPE Type,\r
582 IN EFI_STATUS_CODE_VALUE Value,\r
583 IN UINT32 Instance,\r
584 IN CONST EFI_GUID *CallerId OPTIONAL,\r
585 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL\r
959ccb23 586 );\r
587\r
588/**\r
589 Resets the entire platform.\r
590\r
c7c308ad 591 This service resets the entire platform, including all processors\r
592 and devices, and reboots the system.\r
9095d37b 593 This service will never return EFI_SUCCESS.\r
c7c308ad 594\r
959ccb23 595 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES\r
596 table published by the PEI Foundation.\r
597\r
959ccb23 598 @retval EFI_NOT_AVAILABLE_YET The service has not been installed yet.\r
599\r
600**/\r
601typedef\r
602EFI_STATUS\r
6de794cd 603(EFIAPI *EFI_PEI_RESET_SYSTEM)(\r
b0d803fe 604 IN CONST EFI_PEI_SERVICES **PeiServices\r
959ccb23 605 );\r
606\r
ddcf46b2
SZ
607/**\r
608 Resets the entire platform.\r
609\r
610 @param[in] ResetType The type of reset to perform.\r
611 @param[in] ResetStatus The status code for the reset.\r
c867c8ce 612 @param[in] DataSize The size, in bytes, of ResetData.\r
ddcf46b2
SZ
613 @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown\r
614 the data buffer starts with a Null-terminated string, optionally\r
615 followed by additional binary data. The string is a description\r
616 that the caller may use to further indicate the reason for the\r
efaed0ab 617 system reset.\r
ddcf46b2
SZ
618\r
619**/\r
620typedef\r
621VOID\r
622(EFIAPI *EFI_PEI_RESET2_SYSTEM) (\r
623 IN EFI_RESET_TYPE ResetType,\r
624 IN EFI_STATUS ResetStatus,\r
625 IN UINTN DataSize,\r
626 IN VOID *ResetData OPTIONAL\r
627 );\r
628\r
959ccb23 629/**\r
c7c308ad 630 Find a file within a volume by its name.\r
631\r
00edb218
A
632 This service searches for files with a specific name, within\r
633 either the specified firmware volume or all firmware volumes.\r
634 The service returns a file handle of type EFI_PEI_FILE_HANDLE,\r
959ccb23 635 which must be unique within the system.\r
636\r
00edb218
A
637 @param FileName A pointer to the name of the file to\r
638 find within the firmware volume.\r
c7c308ad 639 @param VolumeHandle The firmware volume to search.\r
640 @param FileHandle Upon exit, points to the found file's\r
959ccb23 641 handle or NULL if it could not be found.\r
642\r
af2dc6a7 643 @retval EFI_SUCCESS The file was found.\r
644 @retval EFI_NOT_FOUND The file was not found.\r
00edb218
A
645 @retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or\r
646 FileName was NULL.\r
959ccb23 647\r
959ccb23 648**/\r
649typedef\r
650EFI_STATUS\r
6de794cd 651(EFIAPI *EFI_PEI_FFS_FIND_BY_NAME)(\r
c7c308ad 652 IN CONST EFI_GUID *FileName,\r
653 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
654 OUT EFI_PEI_FILE_HANDLE *FileHandle\r
00edb218 655 );\r
959ccb23 656\r
c7c308ad 657///\r
af2dc6a7 658/// The information of the FV file.\r
c7c308ad 659///\r
959ccb23 660typedef struct {\r
c7c308ad 661 ///\r
662 /// Name of the file.\r
663 ///\r
00edb218 664 EFI_GUID FileName;\r
c7c308ad 665 ///\r
666 /// File type.\r
667 ///\r
00edb218 668 EFI_FV_FILETYPE FileType;\r
c7c308ad 669 ///\r
670 /// Attributes of the file.\r
671 ///\r
00edb218 672 EFI_FV_FILE_ATTRIBUTES FileAttributes;\r
c7c308ad 673 ///\r
674 /// Points to the file's data (not the header).\r
675 /// Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED\r
676 /// is zero.\r
677 ///\r
00edb218 678 VOID *Buffer;\r
c7c308ad 679 ///\r
242942b2 680 /// Size of the file's data.\r
c7c308ad 681 ///\r
00edb218 682 UINT32 BufferSize;\r
959ccb23 683} EFI_FV_FILE_INFO;\r
684\r
c7935105
SZ
685///\r
686/// The information with authentication status of the FV file.\r
687///\r
688typedef struct {\r
689 ///\r
690 /// Name of the file.\r
691 ///\r
692 EFI_GUID FileName;\r
693 ///\r
694 /// File type.\r
695 ///\r
696 EFI_FV_FILETYPE FileType;\r
697 ///\r
698 /// Attributes of the file.\r
699 ///\r
700 EFI_FV_FILE_ATTRIBUTES FileAttributes;\r
701 ///\r
702 /// Points to the file's data (not the header).\r
703 /// Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED\r
704 /// is zero.\r
705 ///\r
706 VOID *Buffer;\r
707 ///\r
708 /// Size of the file's data.\r
709 ///\r
710 UINT32 BufferSize;\r
711 ///\r
712 /// Authentication status for this file.\r
713 ///\r
714 UINT32 AuthenticationStatus;\r
715} EFI_FV_FILE_INFO2;\r
716\r
959ccb23 717/**\r
c7c308ad 718 Returns information about a specific file.\r
719\r
00edb218
A
720 This function returns information about a specific file,\r
721 including its file name, type, attributes, starting address and\r
af2dc6a7 722 size. If the firmware volume is not memory mapped, then the\r
959ccb23 723 Buffer member will be NULL.\r
724\r
af2dc6a7 725 @param FileHandle The handle of the file.\r
5528573c 726 @param FileInfo Upon exit, points to the file's\r
959ccb23 727 information.\r
728\r
af2dc6a7 729 @retval EFI_SUCCESS File information was returned.\r
730 @retval EFI_INVALID_PARAMETER FileHandle does not\r
959ccb23 731 represent a valid file.\r
af2dc6a7 732 @retval EFI_INVALID_PARAMETER FileInfo is NULL.\r
9095d37b 733\r
959ccb23 734**/\r
735typedef\r
736EFI_STATUS\r
6de794cd 737(EFIAPI *EFI_PEI_FFS_GET_FILE_INFO)(\r
c7c308ad 738 IN EFI_PEI_FILE_HANDLE FileHandle,\r
1c280088 739 OUT EFI_FV_FILE_INFO *FileInfo\r
00edb218 740 );\r
959ccb23 741\r
c7935105
SZ
742/**\r
743 Returns information about a specific file.\r
744\r
745 This function returns information about a specific file,\r
746 including its file name, type, attributes, starting address, size and authentication status.\r
747 If the firmware volume is not memory mapped, then the Buffer member will be NULL.\r
748\r
749 @param FileHandle The handle of the file.\r
750 @param FileInfo Upon exit, points to the file's\r
751 information.\r
752\r
753 @retval EFI_SUCCESS File information was returned.\r
754 @retval EFI_INVALID_PARAMETER FileHandle does not\r
755 represent a valid file.\r
756 @retval EFI_INVALID_PARAMETER FileInfo is NULL.\r
757\r
758**/\r
759typedef\r
760EFI_STATUS\r
761(EFIAPI *EFI_PEI_FFS_GET_FILE_INFO2)(\r
762 IN EFI_PEI_FILE_HANDLE FileHandle,\r
763 OUT EFI_FV_FILE_INFO2 *FileInfo\r
764 );\r
765\r
c7c308ad 766///\r
af2dc6a7 767/// The information of the FV volume.\r
c7c308ad 768///\r
959ccb23 769typedef struct {\r
c7c308ad 770 ///\r
771 /// Attributes of the firmware volume.\r
772 ///\r
4ba967e7 773 EFI_FVB_ATTRIBUTES_2 FvAttributes;\r
c7c308ad 774 ///\r
775 /// Format of the firmware volume.\r
776 ///\r
4ba967e7 777 EFI_GUID FvFormat;\r
c7c308ad 778 ///\r
779 /// Name of the firmware volume.\r
780 ///\r
4ba967e7 781 EFI_GUID FvName;\r
c7c308ad 782 ///\r
783 /// Points to the first byte of the firmware\r
784 /// volume, if bit EFI_FVB_MEMORY_MAPPED is\r
785 /// set in FvAttributes.\r
786 ///\r
4ba967e7 787 VOID *FvStart;\r
c7c308ad 788 ///\r
789 /// Size of the firmware volume.\r
790 ///\r
4ba967e7 791 UINT64 FvSize;\r
959ccb23 792} EFI_FV_INFO;\r
793\r
794/**\r
4b503a77 795 Returns information about the specified volume.\r
c7c308ad 796\r
00edb218
A
797 This function returns information about a specific firmware\r
798 volume, including its name, type, attributes, starting address\r
959ccb23 799 and size.\r
800\r
801 @param VolumeHandle Handle of the volume.\r
5a9403b8 802 @param VolumeInfo Upon exit, points to the volume's information.\r
959ccb23 803\r
af2dc6a7 804 @retval EFI_SUCCESS The volume information returned.\r
5a9403b8 805 @retval EFI_INVALID_PARAMETER If VolumeHandle does not represent a valid volume.\r
806 @retval EFI_INVALID_PARAMETER If VolumeHandle is NULL.\r
af2dc6a7 807 @retval EFI_SUCCESS Information was successfully returned.\r
5a9403b8 808 @retval EFI_INVALID_PARAMETER The volume designated by the VolumeHandle is not available.\r
959ccb23 809\r
810**/\r
811typedef\r
812EFI_STATUS\r
6de794cd 813(EFIAPI *EFI_PEI_FFS_GET_VOLUME_INFO)(\r
1c280088 814 IN EFI_PEI_FV_HANDLE VolumeHandle,\r
815 OUT EFI_FV_INFO *VolumeInfo\r
00edb218 816 );\r
959ccb23 817\r
818/**\r
4b503a77 819 Register a PEIM so that it will be shadowed and called again.\r
c7c308ad 820\r
00edb218
A
821 This service registers a file handle so that after memory is\r
822 available, the PEIM will be re-loaded into permanent memory and\r
823 re-initialized. The PEIM registered this way will always be\r
824 initialized twice. The first time, this function call will\r
825 return EFI_SUCCESS. The second time, this function call will\r
826 return EFI_ALREADY_STARTED. Depending on the order in which\r
827 PEIMs are dispatched, the PEIM making this call may be\r
828 initialized after permanent memory is installed, even the first\r
959ccb23 829 time.\r
830\r
c7c308ad 831 @param FileHandle PEIM's file handle. Must be the currently\r
4b503a77 832 executing PEIM.\r
9095d37b 833\r
4ba967e7 834 @retval EFI_SUCCESS The PEIM was successfully registered for\r
835 shadowing.\r
00edb218 836 @retval EFI_ALREADY_STARTED The PEIM was previously\r
959ccb23 837 registered for shadowing.\r
4ba967e7 838 @retval EFI_NOT_FOUND The FileHandle does not refer to a\r
839 valid file handle.\r
959ccb23 840\r
841**/\r
842typedef\r
843EFI_STATUS\r
6de794cd 844(EFIAPI *EFI_PEI_REGISTER_FOR_SHADOW)(\r
1c280088 845 IN EFI_PEI_FILE_HANDLE FileHandle\r
00edb218 846 );\r
959ccb23 847\r
848\r
849//\r
850// PEI Specification Revision information\r
851//\r
852#define PEI_SPECIFICATION_MAJOR_REVISION 1\r
27dc016c 853#define PEI_SPECIFICATION_MINOR_REVISION 60\r
32d4a8ef 854///\r
9095d37b
LG
855/// Specification inconsistency here:\r
856/// In the PI1.0 spec, PEI_SERVICES_SIGNATURE is defined as 0x5652455320494550. But\r
af2dc6a7 857/// to pass a multiple tool chain, it appends an ULL.\r
32d4a8ef 858///\r
959ccb23 859//\r
860// PEI Services Table\r
861//\r
f490a61d 862#define PEI_SERVICES_SIGNATURE 0x5652455320494550ULL\r
32d4a8ef 863///\r
9095d37b
LG
864/// Specification inconsistency here:\r
865/// In the PI1.0 specification, there is a typo error in PEI_SERVICES_REVISION. In the specification the defintion is\r
32d4a8ef 866/// #define ((PEI_SPECIFICATION_MAJOR_REVISION<<16) |(PEI_SPECIFICATION_MINOR_REVISION))\r
af2dc6a7 867/// and it should be as follows:\r
32d4a8ef 868///\r
ef4fa1a4 869#define PEI_SERVICES_REVISION ((PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION))\r
959ccb23 870\r
9095d37b 871///\r
6de794cd 872/// EFI_PEI_SERVICES is a collection of functions whose implementation is provided by the PEI\r
873/// Foundation. These services fall into various classes, including the following:\r
874/// - Managing the boot mode\r
875/// - Allocating both early and permanent memory\r
876/// - Supporting the Firmware File System (FFS)\r
877/// - Abstracting the PPI database abstraction\r
af2dc6a7 878/// - Creating Hand-Off Blocks (HOBs).\r
6de794cd 879///\r
146332ae 880struct _EFI_PEI_SERVICES {\r
c7c308ad 881 ///\r
882 /// The table header for the PEI Services Table.\r
883 ///\r
44717a39 884 EFI_TABLE_HEADER Hdr;\r
885\r
886 //\r
887 // PPI Functions\r
888 //\r
889 EFI_PEI_INSTALL_PPI InstallPpi;\r
890 EFI_PEI_REINSTALL_PPI ReInstallPpi;\r
891 EFI_PEI_LOCATE_PPI LocatePpi;\r
892 EFI_PEI_NOTIFY_PPI NotifyPpi;\r
893\r
894 //\r
895 // Boot Mode Functions\r
896 //\r
897 EFI_PEI_GET_BOOT_MODE GetBootMode;\r
898 EFI_PEI_SET_BOOT_MODE SetBootMode;\r
899\r
900 //\r
901 // HOB Functions\r
902 //\r
903 EFI_PEI_GET_HOB_LIST GetHobList;\r
904 EFI_PEI_CREATE_HOB CreateHob;\r
905\r
906 //\r
907 // Firmware Volume Functions\r
908 //\r
00edb218
A
909 EFI_PEI_FFS_FIND_NEXT_VOLUME2 FfsFindNextVolume;\r
910 EFI_PEI_FFS_FIND_NEXT_FILE2 FfsFindNextFile;\r
911 EFI_PEI_FFS_FIND_SECTION_DATA2 FfsFindSectionData;\r
44717a39 912\r
913 //\r
914 // PEI Memory Functions\r
915 //\r
916 EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;\r
917 EFI_PEI_ALLOCATE_PAGES AllocatePages;\r
918 EFI_PEI_ALLOCATE_POOL AllocatePool;\r
919 EFI_PEI_COPY_MEM CopyMem;\r
920 EFI_PEI_SET_MEM SetMem;\r
921\r
922 //\r
923 // Status Code\r
924 //\r
925 EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;\r
926\r
927 //\r
928 // Reset\r
929 //\r
930 EFI_PEI_RESET_SYSTEM ResetSystem;\r
931\r
932 //\r
933 // (the following interfaces are installed by publishing PEIM)\r
934 // I/O Abstractions\r
935 //\r
936 EFI_PEI_CPU_IO_PPI *CpuIo;\r
937 EFI_PEI_PCI_CFG2_PPI *PciCfg;\r
938\r
939 //\r
940 // Future Installed Services\r
941 //\r
942 EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName;\r
943 EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo;\r
944 EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo;\r
945 EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow;\r
c7935105
SZ
946 EFI_PEI_FFS_FIND_SECTION_DATA3 FindSectionData3;\r
947 EFI_PEI_FFS_GET_FILE_INFO2 FfsGetFileInfo2;\r
ddcf46b2 948 EFI_PEI_RESET2_SYSTEM ResetSystem2;\r
9f43484c 949 EFI_PEI_FREE_PAGES FreePages;\r
00edb218 950};\r
959ccb23 951\r
952\r
6de794cd 953///\r
af2dc6a7 954/// EFI_SEC_PEI_HAND_OFF structure holds information about\r
6de794cd 955/// PEI core's operating environment, such as the size of location of\r
956/// temporary RAM, the stack location and BFV location.\r
9095d37b 957///\r
959ccb23 958typedef struct _EFI_SEC_PEI_HAND_OFF {\r
c7c308ad 959 ///\r
960 /// Size of the data structure.\r
9095d37b 961 ///\r
959ccb23 962 UINT16 DataSize;\r
963\r
c7c308ad 964 ///\r
9095d37b
LG
965 /// Points to the first byte of the boot firmware volume,\r
966 /// which the PEI Dispatcher should search for\r
c7c308ad 967 /// PEI modules.\r
9095d37b 968 ///\r
959ccb23 969 VOID *BootFirmwareVolumeBase;\r
970\r
c7c308ad 971 ///\r
972 /// Size of the boot firmware volume, in bytes.\r
9095d37b 973 ///\r
959ccb23 974 UINTN BootFirmwareVolumeSize;\r
975\r
c7c308ad 976 ///\r
977 /// Points to the first byte of the temporary RAM.\r
9095d37b 978 ///\r
959ccb23 979 VOID *TemporaryRamBase;\r
980\r
c7c308ad 981 ///\r
982 /// Size of the temporary RAM, in bytes.\r
9095d37b 983 ///\r
959ccb23 984 UINTN TemporaryRamSize;\r
985\r
c7c308ad 986 ///\r
9095d37b
LG
987 /// Points to the first byte of the temporary RAM\r
988 /// available for use by the PEI Foundation. The area\r
989 /// described by PeiTemporaryRamBase and PeiTemporaryRamSize\r
c7c308ad 990 /// must not extend outside beyond the area described by\r
991 /// TemporaryRamBase & TemporaryRamSize. This area should not\r
9095d37b 992 /// overlap with the area reported by StackBase and\r
c7c308ad 993 /// StackSize.\r
994 ///\r
959ccb23 995 VOID *PeiTemporaryRamBase;\r
996\r
c7c308ad 997 ///\r
9095d37b 998 /// The size of the available temporary RAM available for\r
c7c308ad 999 /// use by the PEI Foundation, in bytes.\r
9095d37b 1000 ///\r
959ccb23 1001 UINTN PeiTemporaryRamSize;\r
1002\r
c7c308ad 1003 ///\r
9095d37b
LG
1004 /// Points to the first byte of the stack.\r
1005 /// This are may be part of the memory described by\r
1006 /// TemporaryRamBase and TemporaryRamSize\r
c7c308ad 1007 /// or may be an entirely separate area.\r
9095d37b 1008 ///\r
959ccb23 1009 VOID *StackBase;\r
1010\r
c7c308ad 1011 ///\r
1012 /// Size of the stack, in bytes.\r
9095d37b 1013 ///\r
959ccb23 1014 UINTN StackSize;\r
1015} EFI_SEC_PEI_HAND_OFF;\r
1016\r
fb3df220 1017\r
1018/**\r
af2dc6a7 1019 The entry point of PEI Foundation.\r
fb3df220 1020\r
1021 This function is the entry point for the PEI Foundation, which\r
1022 allows the SEC phase to pass information about the stack,\r
1023 temporary RAM and the Boot Firmware Volume. In addition, it also\r
1024 allows the SEC phase to pass services and data forward for use\r
cc948847
SZ
1025 during the PEI phase in the form of one or more PPIs. These PPI's\r
1026 will be installed and/or immediately signaled if they are\r
1027 notification type. There is no limit to the number of additional\r
1028 PPIs that can be passed from SEC into the PEI Foundation. As part\r
1029 of its initialization phase, the PEI Foundation will add these\r
1030 SEC-hosted PPIs to its PPI database such that both the PEI\r
1031 Foundation and any modules can leverage the associated service\r
1032 calls and/or code in these early PPIs.\r
fb3df220 1033\r
1034 @param SecCoreData Points to a data structure containing\r
1035 information about the PEI core's\r
1036 operating environment, such as the size\r
1037 and location of temporary RAM, the stack\r
4b503a77 1038 location and the BFV location.\r
fb3df220 1039\r
1040 @param PpiList Points to a list of one or more PPI\r
1041 descriptors to be installed initially by\r
1042 the PEI core. An empty PPI list consists\r
1043 of a single descriptor with the end-tag\r
1044 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.\r
1045 As part of its initialization phase, the\r
1046 PEI Foundation will add these SEC-hosted\r
1047 PPIs to its PPI database such that both\r
1048 the PEI Foundation and any modules can\r
1049 leverage the associated service calls\r
1050 and/or code in these early PPIs.\r
1051\r
1052\r
1053**/\r
1054typedef\r
1055VOID\r
e5544398 1056(EFIAPI *EFI_PEI_CORE_ENTRY_POINT)(\r
fb3df220 1057 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
1058 IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList\r
1059);\r
1060\r
959ccb23 1061#endif\r