3 PI PEI master include file. This file should match the PI spec.
5 Copyright (c) 2006 - 2007, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 @par Revision Reference:
19 #ifndef __PI_PEICIS_H__
20 #define __PI_PEICIS_H__
22 #include <Pi/PiMultiPhase.h>
24 #define EFI_NOT_AVAILABLE_YET EFIERR (28)
27 // Handles of EFI FV/FFS.
29 typedef VOID
*EFI_PEI_FV_HANDLE
;
30 typedef VOID
*EFI_PEI_FILE_HANDLE
;
33 // Declare forward referenced data structures
35 typedef struct _EFI_PEI_SERVICES EFI_PEI_SERVICES
;
36 typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR
;
39 #include <Ppi/CpuIo.h>
40 #include <Ppi/PciCfg2.h>
44 The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI
45 Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header.
47 @param FfsHeader Pointer to the FFS file header.
48 @param PeiServices Describes the list of possible PEI Services.
55 (EFIAPI
*EFI_PEIM_ENTRY_POINT
)(
56 IN EFI_PEI_FILE_HANDLE
*FfsHeader
,
57 IN EFI_PEI_SERVICES
**PeiServices
61 Entry point of the notification callback function itself within the PEIM.
63 @param PeiServices Indirect reference to the PEI Services Table.
64 @param NotifyDescriptor Address of the notification descriptor data structure.
65 @param Ppi Address of the PPI that was installed.
72 (EFIAPI
*EFI_PEIM_NOTIFY_ENTRY_POINT
) (
73 IN EFI_PEI_SERVICES
**PeiServices
,
74 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyDescriptor
,
79 // PEI Ppi Services List Descriptors
81 #define EFI_PEI_PPI_DESCRIPTOR_PIC 0x00000001
82 #define EFI_PEI_PPI_DESCRIPTOR_PPI 0x00000010
83 #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK 0x00000020
84 #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH 0x00000040
85 #define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES 0x00000060
86 #define EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST 0x80000000
92 } EFI_PEI_PPI_DESCRIPTOR
;
94 struct _EFI_PEI_NOTIFY_DESCRIPTOR
{
97 EFI_PEIM_NOTIFY_ENTRY_POINT Notify
;
101 // Describes request of the module to be loaded to
102 // the permanent memory once it is available. Unlike most of the other HOBs,
103 // this HOB is produced and consumed during the HOB producer phase.
105 typedef struct _EFI_HOB_LOAD_PEIM
{
106 EFI_HOB_GENERIC_HEADER Header
;
107 EFI_PEI_FILE_HANDLE FileHandle
;
108 EFI_PEIM_ENTRY_POINT EntryPoint
;
109 EFI_PEIM_ENTRY_POINT InMemEntryPoint
;
114 This service is the first one provided by the PEI Foundation. This function
115 installs an interface in the PEI PPI database by GUID. The purpose of the
116 service is to publish an interface that other parties can use to call
119 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table
120 published by the PEI Foundation.
121 @param PpiList A pointer to the list of interfaces that the caller shall install.
123 @retval EFI_SUCCESS The interface was successfully installed.
124 @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.
125 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
130 (EFIAPI
*EFI_PEI_INSTALL_PPI
) (
131 IN EFI_PEI_SERVICES
**PeiServices
,
132 IN EFI_PEI_PPI_DESCRIPTOR
*PpiList
136 This function reinstalls an interface in the PEI PPI database by GUID.
137 The purpose of the service is to publish an interface that other parties
138 can use to replace a same-named interface in the protocol database
139 with a different interface.
141 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table
142 published by the PEI Foundation.
143 @param OldPpi A pointer to the former PPI in the database.
144 @param NewPpi A pointer to the new interfaces that the caller shall install.
146 @retval EFI_SUCCESS The interface was successfully installed.
147 @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the
148 list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
149 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
150 @retval EFI_NOT_FOUND The PPI for which the reinstallation was requested has not been installed.
155 (EFIAPI
*EFI_PEI_REINSTALL_PPI
) (
156 IN EFI_PEI_SERVICES
**PeiServices
,
157 IN EFI_PEI_PPI_DESCRIPTOR
*OldPpi
,
158 IN EFI_PEI_PPI_DESCRIPTOR
*NewPpi
162 This function locates an interface in the PEI PPI database by GUID.
164 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES published by the PEI Foundation.
165 @param Guid A pointer to the GUID whose corresponding interface needs to be found.
166 @param Instance The N-th instance of the interface that is required.
167 @param PpiDescriptor A pointer to instance of the EFI_PEI_PPI_DESCRIPTOR.
168 @param Ppi A pointer to the instance of the interface.
170 @retval EFI_SUCCESS The interface was successfully returned.
171 @retval EFI_NOT_FOUND The PPI descriptor is not found in the database.
176 (EFIAPI
*EFI_PEI_LOCATE_PPI
) (
177 IN EFI_PEI_SERVICES
**PeiServices
,
180 IN OUT EFI_PEI_PPI_DESCRIPTOR
**PpiDescriptor
,
185 This function installs a notification service to be called back when a
186 given interface is installed or reinstalled. The purpose of the service
187 is to publish an interface that other parties can use to call additional PPIs
188 that may materialize later.
190 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
191 @param NotifyList A pointer to the list of notification interfaces that the caller shall install.
193 @retval EFI_SUCCESS The interface was successfully installed.
194 @retval EFI_INVALID_PARAMETER The PpiList pointer is NULL or Any of the PEI PPI descriptors in the
195 list do not have the EFI_PEI_PPI_DESCRIPTOR_PPI bit set in the Flags field.
196 @retval EFI_OUT_OF_RESOURCES There is no additional space in the PPI database.
201 (EFIAPI
*EFI_PEI_NOTIFY_PPI
) (
202 IN EFI_PEI_SERVICES
**PeiServices
,
203 IN EFI_PEI_NOTIFY_DESCRIPTOR
*NotifyList
207 This function returns the present value of the boot mode.
209 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
210 @param BootMode A pointer to contain the value of the boot mode.
212 @retval EFI_SUCCESS The boot mode was returned successfully.
217 (EFIAPI
*EFI_PEI_GET_BOOT_MODE
) (
218 IN EFI_PEI_SERVICES
**PeiServices
,
219 OUT EFI_BOOT_MODE
*BootMode
223 This function sets the value of the boot mode.
225 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
226 @param BootMode The value of the boot mode to set.
228 @retval EFI_SUCCESS The boot mode was returned successfully.
233 (EFIAPI
*EFI_PEI_SET_BOOT_MODE
) (
234 IN EFI_PEI_SERVICES
**PeiServices
,
235 IN EFI_BOOT_MODE BootMode
239 This function returns the pointer to the list of Hand-Off Blocks (HOBs) in memory.
241 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
242 @param HobList A pointer to the list of HOBs that the PEI Foundation will initialize
244 @retval EFI_SUCCESS The list was successfully returned.
245 @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.
250 (EFIAPI
*EFI_PEI_GET_HOB_LIST
) (
251 IN EFI_PEI_SERVICES
**PeiServices
,
252 IN OUT VOID
**HobList
256 This service published by the PEI Foundation abstracts the creation of a Hand-Off Block's (HOB's) headers.
258 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
259 @param Type The type of HOB to be installed.
260 @param Length The length of the HOB to be added.
261 @param Hob The address of a pointer that will contain the HOB header.
263 @retval EFI_SUCCESS The HOB was successfully created.
264 @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.
269 (EFIAPI
*EFI_PEI_CREATE_HOB
) (
270 IN EFI_PEI_SERVICES
**PeiServices
,
277 The purpose of the service is to abstract the capability of the PEI
278 Foundation to discover instances of firmware volumes in the system.
279 Given the input file pointer, this service searches for the next
280 matching file in the Firmware File System (FFS) volume.
282 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
283 @param Instance This instance of the firmware volume to find. The value 0 is the Boot Firmware Volume (BFV).
284 @param FwVolHeader Pointer to the firmware volume header of the volume to return.
286 @retval EFI_SUCCESS The volume was found.
287 @retval EFI_NOT_FOUND The volume was not found.
288 @retval EFI_INVALID_PARAMETER FwVolHeader is NULL
293 (EFIAPI
*EFI_PEI_FFS_FIND_NEXT_VOLUME2
) (
294 IN EFI_PEI_SERVICES
**PeiServices
,
296 IN OUT EFI_FIRMWARE_VOLUME_HEADER
**FwVolHeader
300 The purpose of the service is to abstract the capability of the PEI
301 Foundation to discover instances of firmware files in the system.
302 Given the input file pointer, this service searches for the next matching
303 file in the Firmware File System (FFS) volume.
305 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
306 @param SearchType A filter to find files only of this type.
307 @param FwVolHeader Pointer to the firmware volume header of the volume to search.This parameter
308 must point to a valid FFS volume.
309 @param FileHeader Pointer to the current file from which to begin searching.This pointer will be
310 updated upon return to reflect the file found.
312 @retval EFI_SUCCESS The file was found.
313 @retval EFI_NOT_FOUND The file was not found.
314 @retval EFI_NOT_FOUND The header checksum was not zero.
319 (EFIAPI
*EFI_PEI_FFS_FIND_NEXT_FILE2
) (
320 IN EFI_PEI_SERVICES
**PeiServices
,
321 IN EFI_FV_FILETYPE SearchType
,
322 IN EFI_FIRMWARE_VOLUME_HEADER
*FwVolHeader
,
323 IN OUT EFI_FFS_FILE_HEADER
**FileHeader
327 Given the input file pointer, this service searches for the next
328 matching file in the Firmware File System (FFS) volume.
330 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
331 @param SectionType The value of the section type to find.
332 @param FfsFileHeader A pointer to the file header that contains the set of sections to be searched.
333 @param SectionData A pointer to the discovered section, if successful.
335 @retval EFI_SUCCESS The section was found.
336 @retval EFI_NOT_FOUND The section was not found.
341 (EFIAPI
*EFI_PEI_FFS_FIND_SECTION_DATA2
) (
342 IN EFI_PEI_SERVICES
**PeiServices
,
343 IN EFI_SECTION_TYPE SectionType
,
344 IN EFI_FFS_FILE_HEADER
*FfsFileHeader
,
345 IN OUT VOID
**SectionData
349 This function registers the found memory configuration with the PEI Foundation.
351 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
352 @param MemoryBegin The value of a region of installed memory
353 @param MemoryLength The corresponding length of a region of installed memory.
355 @retval EFI_SUCCESS The region was successfully installed in a HOB.
356 @retval EFI_INVALID_PARAMETER MemoryBegin and MemoryLength are illegal for this system.
357 @retval EFI_OUT_OF_RESOURCES There is no additional space for HOB creation.
362 (EFIAPI
*EFI_PEI_INSTALL_PEI_MEMORY
) (
363 IN EFI_PEI_SERVICES
**PeiServices
,
364 IN EFI_PHYSICAL_ADDRESS MemoryBegin
,
365 IN UINT64 MemoryLength
369 The purpose of the service is to publish an interface that allows
370 PEIMs to allocate memory ranges that are managed by the PEI Foundation.
372 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
373 @param MemoryType The type of memory to allocate.
374 @param Pages The number of contiguous 4 KB pages to allocate.
375 @param Memory Pointer to a physical address. On output, the address is set to the base
376 of the page range that was allocated.
378 @retval EFI_SUCCESS The memory range was successfully allocated.
379 @retval EFI_OUT_OF_RESOURCES The pages could not be allocated.
380 @retval EFI_INVALID_PARAMETER Type is not equal to AllocateAnyPages.
385 (EFIAPI
*EFI_PEI_ALLOCATE_PAGES
) (
386 IN EFI_PEI_SERVICES
**PeiServices
,
387 IN EFI_MEMORY_TYPE MemoryType
,
389 IN OUT EFI_PHYSICAL_ADDRESS
*Memory
393 The purpose of this service is to publish an interface that
394 allows PEIMs to allocate memory ranges that are managed by the PEI Foundation.
396 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
397 @param Size The number of bytes to allocate from the pool.
398 @param Buffer If the call succeeds, a pointer to a pointer to the allocated buffer; undefined otherwise.
400 @retval EFI_SUCCESS The allocation was successful.
401 @retval EFI_OUT_OF_RESOURCES There is not enough heap to allocate the requested size.
406 (EFIAPI
*EFI_PEI_ALLOCATE_POOL
) (
407 IN EFI_PEI_SERVICES
**PeiServices
,
413 This service copies the contents of one buffer to another buffer.
415 @param Destination Pointer to the destination buffer of the memory copy.
416 @param Source Pointer to the source buffer of the memory copy
417 @param Length Number of bytes to copy from Source to Destination.
424 (EFIAPI
*EFI_PEI_COPY_MEM
) (
425 IN VOID
*Destination
,
431 The service fills a buffer with a specified value.
433 @param Buffer Pointer to the buffer to fill.
434 @param Size Number of bytes in Buffer to fill.
435 @param Value Value to fill Buffer with
442 (EFIAPI
*EFI_PEI_SET_MEM
) (
449 This service publishes an interface that allows PEIMs to report status codes.
451 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
452 @param Type Indicates the type of status code being reported.
453 @param Value Describes the current status of a hardware or
454 software entity. This includes information about the class and
455 subclass that is used to classify the entity as well as an operation.
456 For progress codes, the operation is the current activity.
457 For error codes, it is the exception.For debug codes,it is not defined at this time.
458 @param Instance The enumeration of a hardware or software entity within
459 the system. A system may contain multiple entities that match a class/subclass
460 pairing. The instance differentiates between them. An instance of 0 indicates
461 that instance information is unavailable, not meaningful, or not relevant.
462 Valid instance numbers start with 1.
463 @param CallerId This optional parameter may be used to identify the caller.
464 This parameter allows the status code driver to apply different rules to
466 @param Data This optional parameter may be used to pass additional data.
468 @retval EFI_SUCCESS The function completed successfully.
469 @retval EFI_NOT_AVAILABLE_YET No progress code provider has installed an interface in the system.
474 (EFIAPI
*EFI_PEI_REPORT_STATUS_CODE
) (
475 IN EFI_PEI_SERVICES
**PeiServices
,
476 IN EFI_STATUS_CODE_TYPE Type
,
477 IN EFI_STATUS_CODE_VALUE Value
,
479 IN EFI_GUID
*CallerId OPTIONAL
,
480 IN EFI_STATUS_CODE_DATA
*Data OPTIONAL
484 Resets the entire platform.
486 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES
487 table published by the PEI Foundation.
489 @retval EFI_SUCCESS The function completed successfully.
490 @retval EFI_NOT_AVAILABLE_YET The service has not been installed yet.
495 (EFIAPI
*EFI_PEI_RESET_SYSTEM
) (
496 IN EFI_PEI_SERVICES
**PeiServices
501 This service searches for files with a specific name, within
502 either the specified firmware volume or all firmware volumes.
503 The service returns a file handle of type EFI_PEI_FILE_HANDLE,
504 which must be unique within the system.
506 @param FileName A pointer to the name of the file to
507 find within the firmware volume.
509 @param VolumeHandle The firmware volume to search FileHandle
510 Upon exit, points to the found file's
511 handle or NULL if it could not be found.
513 @retval EFI_SUCCESS File was found.
515 @retval EFI_NOT_FOUND File was not found.
517 @retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or
524 (EFIAPI
*EFI_PEI_FFS_FIND_BY_NAME
) (
525 IN CONST EFI_GUID
*FileName
,
526 IN CONST EFI_PEI_FV_HANDLE VolumeHandle
,
527 OUT EFI_PEI_FILE_HANDLE
*FileHandle
533 @param FileName Name of the file.
535 @param FileType File type. See EFI_FV_FILETYPE, which is
536 defined in the Platform Initialization
537 Firmware Storage Specification.
539 @param FileAttributes Attributes of the file. Type
540 EFI_FV_FILE_ATTRIBUTES is defined in
541 the Platform Initialization Firmware
542 Storage Specification.
544 @param Buffer Points to the file's data (not the header).
545 Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED
548 @param BufferSize Size of the file's data.
553 EFI_FV_FILETYPE FileType
;
554 EFI_FV_FILE_ATTRIBUTES FileAttributes
;
561 This function returns information about a specific file,
562 including its file name, type, attributes, starting address and
563 size. If the firmware volume is not memory mapped then the
564 Buffer member will be NULL.
566 @param FileHandle Handle of the file.
568 @param FileInfo Upon exit, points to the file¡¯s
571 @retval EFI_SUCCESS File information returned.
573 @retval EFI_INVALID_PARAMETER If FileHandle does not
574 represent a valid file.
576 @retval EFI_INVALID_PARAMETER If FileInfo is NULL.
581 (EFIAPI
*EFI_PEI_FFS_GET_FILE_INFO
) (
582 IN CONST EFI_PEI_FILE_HANDLE FileHandle
,
583 OUT EFI_FV_FILE_INFO
*FileInfo
589 @param FvAttributes Attributes of the firmware volume. Type
590 EFI_FVB_ATTRIBUTES is defined in the
591 Platform Initialization Firmware Storage
594 @param FvFormat Format of the firmware volume. For PI
595 Architecture Firmware Volumes, this can
596 be copied from FileSystemGuid in
597 EFI_FIRMWARE_VOLUME_HEADER.
599 @param FvName Name of the firmware volume. For PI
600 Architecture Firmware Volumes, this can
601 be copied from VolumeName in the
603 EFI_FIRMWARE_VOLUME_HEADER.
605 @param FvStart Points to the first byte of the firmware
606 volume, if bit EFI_FVB_MEMORY_MAPPED is
607 set in FvAttributes. FvSize Size of the
612 EFI_FVB_ATTRIBUTES FvAttributes
;
621 This function returns information about a specific firmware
622 volume, including its name, type, attributes, starting address
625 @param VolumeHandle Handle of the volume.
627 @param VolumeInfo Upon exit, points to the volume¡¯s
630 @retval EFI_SUCCESS File information returned.
632 @retval EFI_INVALID_PARAMETER If FileHandle does not
633 represent a valid file.
635 @retval EFI_INVALID_PARAMETER If FileInfo is NULL.
640 (EFIAPI
*EFI_PEI_FFS_GET_VOLUME_INFO
) (
641 IN CONST EFI_PEI_FV_HANDLE
*VolumeHandle
,
642 OUT EFI_FV_INFO
*VolumeInfo
647 This service registers a file handle so that after memory is
648 available, the PEIM will be re-loaded into permanent memory and
649 re-initialized. The PEIM registered this way will always be
650 initialized twice. The first time, this function call will
651 return EFI_SUCCESS. The second time, this function call will
652 return EFI_ALREADY_STARTED. Depending on the order in which
653 PEIMs are dispatched, the PEIM making this call may be
654 initialized after permanent memory is installed, even the first
657 @param FileHandle PEIM¡¯s file handle. Must be the currently
660 @retval EFI_SUCCESS The PEIM was successfully registered for
663 @retval EFI_ALREADY_STARTED The PEIM was previously
664 registered for shadowing.
666 @retval EFI_NOT_FOUND The FileHandle does not refer to a
672 (EFIAPI
*EFI_PEI_REGISTER_FOR_SHADOW
) (
673 IN CONST EFI_PEI_FILE_HANDLE FileHandle
678 // PEI Specification Revision information
680 #define PEI_SPECIFICATION_MAJOR_REVISION 1
681 #define PEI_SPECIFICATION_MINOR_REVISION 0
684 // PEI Services Table
686 #define PEI_SERVICES_SIGNATURE 0x5652455320494550
687 #define PEI_SERVICES_REVISION (PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION)
689 struct _EFI_PEI_SERVICES
{
690 EFI_TABLE_HEADER Hdr
;
694 EFI_PEI_INSTALL_PPI InstallPpi
;
695 EFI_PEI_REINSTALL_PPI ReInstallPpi
;
696 EFI_PEI_LOCATE_PPI LocatePpi
;
697 EFI_PEI_NOTIFY_PPI NotifyPpi
;
699 // Boot Mode Functions
701 EFI_PEI_GET_BOOT_MODE GetBootMode
;
702 EFI_PEI_SET_BOOT_MODE SetBootMode
;
706 EFI_PEI_GET_HOB_LIST GetHobList
;
707 EFI_PEI_CREATE_HOB CreateHob
;
709 // Firmware Volume Functions
711 EFI_PEI_FFS_FIND_NEXT_VOLUME2 FfsFindNextVolume
;
712 EFI_PEI_FFS_FIND_NEXT_FILE2 FfsFindNextFile
;
713 EFI_PEI_FFS_FIND_SECTION_DATA2 FfsFindSectionData
;
715 // PEI Memory Functions
717 EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory
;
718 EFI_PEI_ALLOCATE_PAGES AllocatePages
;
719 EFI_PEI_ALLOCATE_POOL AllocatePool
;
720 EFI_PEI_COPY_MEM CopyMem
;
721 EFI_PEI_SET_MEM SetMem
;
724 EFI_PEI_REPORT_STATUS_CODE ReportStatusCode
;
728 EFI_PEI_RESET_SYSTEM ResetSystem
;
730 // (the following interfaces are installed by publishing PEIM)
734 EFI_PEI_CPU_IO_PPI
*CpuIo
;
735 EFI_PEI_PCI_CFG2_PPI
*PciCfg
;
737 // Future Installed Services
738 EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName
;
739 EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo
;
740 EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo
;
741 EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow
;
745 typedef struct _EFI_SEC_PEI_HAND_OFF
{
747 // Size of the data structure.
752 // Points to the first byte of the boot firmware volume,
753 // which the PEI Dispatcher should search for
756 VOID
*BootFirmwareVolumeBase
;
759 // Size of the boot firmware volume, in bytes.
761 UINTN BootFirmwareVolumeSize
;
764 // Points to the first byte of the temporary RAM.
766 VOID
*TemporaryRamBase
;
769 // Size of the temporary RAM, in bytes.
771 UINTN TemporaryRamSize
;
774 // Points to the first byte of the temporary RAM
775 // available for use by the PEI Foundation. The area
776 // described by PeiTemporaryRamBase and PeiTemporaryRamSize
777 // must not extend outside beyond the area described by
778 // TemporaryRamBase & TemporaryRamSize. This area should not
779 // overlap with the area reported by StackBase and
782 VOID
*PeiTemporaryRamBase
;
785 // Size of the available temporary RAM available for
786 // use by the PEI Foundation, in bytes.
788 UINTN PeiTemporaryRamSize
;
791 // Points to the first byte of the stack.
792 // This are may be part of the memory described by
793 // TemporaryRamBase and TemporaryRamSize
794 // or may be an entirely separate area.
799 // Size of the stack, in bytes.
802 } EFI_SEC_PEI_HAND_OFF
;
807 This function is the entry point for the PEI Foundation, which
808 allows the SEC phase to pass information about the stack,
809 temporary RAM and the Boot Firmware Volume. In addition, it also
810 allows the SEC phase to pass services and data forward for use
811 during the PEI phase in the form of one or more PPIs. There is
812 no limit to the number of additional PPIs that can be passed
813 from SEC into the PEI Foundation. As part of its initialization
814 phase, the PEI Foundation will add these SEC-hosted PPIs to its
815 PPI database such that both the PEI Foundation and any modules
816 can leverage the associated service calls and/or code in these
819 @param SecCoreData Points to a data structure containing
820 information about the PEI core's
821 operating environment, such as the size
822 and location of temporary RAM, the stack
823 location and the BFV location. The type
824 EFI_SEC_PEI_HAND_OFF is
826 @param PpiList Points to a list of one or more PPI
827 descriptors to be installed initially by
828 the PEI core. An empty PPI list consists
829 of a single descriptor with the end-tag
830 EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
831 As part of its initialization phase, the
832 PEI Foundation will add these SEC-hosted
833 PPIs to its PPI database such that both
834 the PEI Foundation and any modules can
835 leverage the associated service calls
836 and/or code in these early PPIs.
842 (EFIAPI
*EFI_PEI_CORE_ENTRY_POINT
)(
843 IN CONST EFI_SEC_PEI_HAND_OFF
*SecCoreData
,
844 IN CONST EFI_PEI_PPI_DESCRIPTOR
*PpiList