TianoCore EDK2 master
Loading...
Searching...
No Matches
PiPeiCis.h
Go to the documentation of this file.
1
12#ifndef __PI_PEICIS_H__
13#define __PI_PEICIS_H__
14
15#include <Uefi/UefiMultiPhase.h>
16#include <Pi/PiMultiPhase.h>
17
21typedef VOID *EFI_PEI_FV_HANDLE;
22
26typedef VOID *EFI_PEI_FILE_HANDLE;
27
32
37
38#include <Ppi/CpuIo.h>
39#include <Ppi/PciCfg2.h>
40
52typedef
54(EFIAPI *EFI_PEIM_ENTRY_POINT2)(
55 IN EFI_PEI_FILE_HANDLE FileHandle,
56 IN CONST EFI_PEI_SERVICES **PeiServices
57 );
58
69typedef
72 IN EFI_PEI_SERVICES **PeiServices,
73 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
74 IN VOID *Ppi
75 );
76
77//
78// PEI Ppi Services List Descriptors
79//
80#define EFI_PEI_PPI_DESCRIPTOR_PIC 0x00000001
81#define EFI_PEI_PPI_DESCRIPTOR_PPI 0x00000010
82#define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK 0x00000020
83#define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH 0x00000040
84#define EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES 0x00000060
85#define EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST 0x80000000
86
90typedef struct {
103 VOID *Ppi;
105
123};
124
129typedef union {
139
157typedef
159(EFIAPI *EFI_PEI_INSTALL_PPI)(
160 IN CONST EFI_PEI_SERVICES **PeiServices,
162 );
163
182typedef
184(EFIAPI *EFI_PEI_REINSTALL_PPI)(
185 IN CONST EFI_PEI_SERVICES **PeiServices,
188 );
189
203typedef
205(EFIAPI *EFI_PEI_LOCATE_PPI)(
206 IN CONST EFI_PEI_SERVICES **PeiServices,
207 IN CONST EFI_GUID *Guid,
208 IN UINTN Instance,
209 IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL,
210 IN OUT VOID **Ppi
211 );
212
228typedef
230(EFIAPI *EFI_PEI_NOTIFY_PPI)(
231 IN CONST EFI_PEI_SERVICES **PeiServices,
233 );
234
244typedef
246(EFIAPI *EFI_PEI_GET_BOOT_MODE)(
247 IN CONST EFI_PEI_SERVICES **PeiServices,
248 OUT EFI_BOOT_MODE *BootMode
249 );
250
260typedef
262(EFIAPI *EFI_PEI_SET_BOOT_MODE)(
263 IN CONST EFI_PEI_SERVICES **PeiServices,
264 IN EFI_BOOT_MODE BootMode
265 );
266
277typedef
279(EFIAPI *EFI_PEI_GET_HOB_LIST)(
280 IN CONST EFI_PEI_SERVICES **PeiServices,
281 OUT VOID **HobList
282 );
283
296typedef
298(EFIAPI *EFI_PEI_CREATE_HOB)(
299 IN CONST EFI_PEI_SERVICES **PeiServices,
300 IN UINT16 Type,
301 IN UINT16 Length,
302 IN OUT VOID **Hob
303 );
304
324typedef
327 IN CONST EFI_PEI_SERVICES **PeiServices,
328 IN UINTN Instance,
329 OUT EFI_PEI_FV_HANDLE *VolumeHandle
330 );
331
353typedef
356 IN CONST EFI_PEI_SERVICES **PeiServices,
357 IN EFI_FV_FILETYPE SearchType,
358 IN CONST EFI_PEI_FV_HANDLE FvHandle,
359 IN OUT EFI_PEI_FILE_HANDLE *FileHandle
360 );
361
381typedef
384 IN CONST EFI_PEI_SERVICES **PeiServices,
385 IN EFI_SECTION_TYPE SectionType,
386 IN EFI_PEI_FILE_HANDLE FileHandle,
387 OUT VOID **SectionData
388 );
389
411typedef
414 IN CONST EFI_PEI_SERVICES **PeiServices,
415 IN EFI_SECTION_TYPE SectionType,
416 IN UINTN SectionInstance,
417 IN EFI_PEI_FILE_HANDLE FileHandle,
418 OUT VOID **SectionData,
419 OUT UINT32 *AuthenticationStatus
420 );
421
434typedef
437 IN CONST EFI_PEI_SERVICES **PeiServices,
438 IN EFI_PHYSICAL_ADDRESS MemoryBegin,
439 IN UINT64 MemoryLength
440 );
441
464typedef
466(EFIAPI *EFI_PEI_ALLOCATE_PAGES)(
467 IN CONST EFI_PEI_SERVICES **PeiServices,
468 IN EFI_MEMORY_TYPE MemoryType,
469 IN UINTN Pages,
471 );
472
486typedef
488(EFIAPI *EFI_PEI_FREE_PAGES)(
489 IN CONST EFI_PEI_SERVICES **PeiServices,
491 IN UINTN Pages
492 );
493
506typedef
508(EFIAPI *EFI_PEI_ALLOCATE_POOL)(
509 IN CONST EFI_PEI_SERVICES **PeiServices,
510 IN UINTN Size,
511 OUT VOID **Buffer
512 );
513
522typedef
523VOID
524(EFIAPI *EFI_PEI_COPY_MEM)(
525 IN VOID *Destination,
526 IN VOID *Source,
527 IN UINTN Length
528 );
529
538typedef
539VOID
540(EFIAPI *EFI_PEI_SET_MEM)(
541 IN VOID *Buffer,
542 IN UINTN Size,
543 IN UINT8 Value
544 );
545
575typedef
578 IN CONST EFI_PEI_SERVICES **PeiServices,
581 IN UINT32 Instance,
582 IN CONST EFI_GUID *CallerId OPTIONAL,
584 );
585
599typedef
601(EFIAPI *EFI_PEI_RESET_SYSTEM)(
602 IN CONST EFI_PEI_SERVICES **PeiServices
603 );
604
618typedef
619VOID
620(EFIAPI *EFI_PEI_RESET2_SYSTEM)(
621 IN EFI_RESET_TYPE ResetType,
622 IN EFI_STATUS ResetStatus,
623 IN UINTN DataSize,
624 IN VOID *ResetData OPTIONAL
625 );
626
647typedef
650 IN CONST EFI_GUID *FileName,
651 IN EFI_PEI_FV_HANDLE VolumeHandle,
652 OUT EFI_PEI_FILE_HANDLE *FileHandle
653 );
654
658typedef struct {
666 EFI_FV_FILETYPE FileType;
676 VOID *Buffer;
682
686typedef struct {
694 EFI_FV_FILETYPE FileType;
704 VOID *Buffer;
714
733typedef
736 IN EFI_PEI_FILE_HANDLE FileHandle,
738 );
739
757typedef
760 IN EFI_PEI_FILE_HANDLE FileHandle,
762 );
763
767typedef struct {
785 VOID *FvStart;
789 UINT64 FvSize;
791
809typedef
812 IN EFI_PEI_FV_HANDLE VolumeHandle,
813 OUT EFI_FV_INFO *VolumeInfo
814 );
815
840typedef
843 IN EFI_PEI_FILE_HANDLE FileHandle
844 );
845
846//
847// PEI Specification Revision information
848//
849#define PEI_SPECIFICATION_MAJOR_REVISION PI_SPECIFICATION_MAJOR_REVISION
850#define PEI_SPECIFICATION_MINOR_REVISION PI_SPECIFICATION_MINOR_REVISION
856//
857// PEI Services Table
858//
859#define PEI_SERVICES_SIGNATURE 0x5652455320494550ULL
866#define PEI_SERVICES_REVISION ((PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION))
867
882
883 //
884 // PPI Functions
885 //
886 EFI_PEI_INSTALL_PPI InstallPpi;
887 EFI_PEI_REINSTALL_PPI ReInstallPpi;
888 EFI_PEI_LOCATE_PPI LocatePpi;
889 EFI_PEI_NOTIFY_PPI NotifyPpi;
890
891 //
892 // Boot Mode Functions
893 //
894 EFI_PEI_GET_BOOT_MODE GetBootMode;
895 EFI_PEI_SET_BOOT_MODE SetBootMode;
896
897 //
898 // HOB Functions
899 //
900 EFI_PEI_GET_HOB_LIST GetHobList;
901 EFI_PEI_CREATE_HOB CreateHob;
902
903 //
904 // Firmware Volume Functions
905 //
906 EFI_PEI_FFS_FIND_NEXT_VOLUME2 FfsFindNextVolume;
907 EFI_PEI_FFS_FIND_NEXT_FILE2 FfsFindNextFile;
908 EFI_PEI_FFS_FIND_SECTION_DATA2 FfsFindSectionData;
909
910 //
911 // PEI Memory Functions
912 //
913 EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;
914 EFI_PEI_ALLOCATE_PAGES AllocatePages;
915 EFI_PEI_ALLOCATE_POOL AllocatePool;
916 EFI_PEI_COPY_MEM CopyMem;
917 EFI_PEI_SET_MEM SetMem;
918
919 //
920 // Status Code
921 //
922 EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;
923
924 //
925 // Reset
926 //
927 EFI_PEI_RESET_SYSTEM ResetSystem;
928
929 //
930 // (the following interfaces are installed by publishing PEIM)
931 // I/O Abstractions
932 //
933 EFI_PEI_CPU_IO_PPI *CpuIo;
934 EFI_PEI_PCI_CFG2_PPI *PciCfg;
935
936 //
937 // Future Installed Services
938 //
939 EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName;
940 EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo;
941 EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo;
942 EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow;
943 EFI_PEI_FFS_FIND_SECTION_DATA3 FindSectionData3;
944 EFI_PEI_FFS_GET_FILE_INFO2 FfsGetFileInfo2;
945 EFI_PEI_RESET2_SYSTEM ResetSystem2;
946 EFI_PEI_FREE_PAGES FreePages;
947};
948
954typedef struct _EFI_SEC_PEI_HAND_OFF {
958 UINT16 DataSize;
959
966
971
976
981
992
998
1006
1012
1049typedef
1050VOID
1051(EFIAPI *EFI_PEI_CORE_ENTRY_POINT)(
1052 IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
1054 );
1055
1056#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define OPTIONAL
Definition: Base.h:290
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT32 EFI_BOOT_MODE
Definition: PiBootMode.h:18
UINT32 EFI_FV_FILE_ATTRIBUTES
UINT32 EFI_FVB_ATTRIBUTES_2
VOID(EFIAPI * EFI_PEI_RESET2_SYSTEM)(IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, IN UINTN DataSize, IN VOID *ResetData OPTIONAL)
Definition: PiPeiCis.h:620
EFI_STATUS(EFIAPI * EFI_PEI_ALLOCATE_POOL)(IN CONST EFI_PEI_SERVICES **PeiServices, IN UINTN Size, OUT VOID **Buffer)
Definition: PiPeiCis.h:508
EFI_STATUS(EFIAPI * EFI_PEI_INSTALL_PEI_MEMORY)(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PHYSICAL_ADDRESS MemoryBegin, IN UINT64 MemoryLength)
Definition: PiPeiCis.h:436
VOID(EFIAPI * EFI_PEI_COPY_MEM)(IN VOID *Destination, IN VOID *Source, IN UINTN Length)
Definition: PiPeiCis.h:524
EFI_STATUS(EFIAPI * EFI_PEI_CREATE_HOB)(IN CONST EFI_PEI_SERVICES **PeiServices, IN UINT16 Type, IN UINT16 Length, IN OUT VOID **Hob)
Definition: PiPeiCis.h:298
EFI_STATUS(EFIAPI * EFI_PEI_FFS_FIND_SECTION_DATA2)(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_SECTION_TYPE SectionType, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData)
Definition: PiPeiCis.h:383
EFI_STATUS(EFIAPI * EFI_PEI_FREE_PAGES)(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN Pages)
Definition: PiPeiCis.h:488
EFI_STATUS(EFIAPI * EFI_PEI_REPORT_STATUS_CODE)(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_STATUS_CODE_TYPE Type, IN EFI_STATUS_CODE_VALUE Value, IN UINT32 Instance, IN CONST EFI_GUID *CallerId OPTIONAL, IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL)
Definition: PiPeiCis.h:577
EFI_STATUS(EFIAPI * EFI_PEI_NOTIFY_PPI)(IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList)
Definition: PiPeiCis.h:230
EFI_STATUS(EFIAPI * EFI_PEI_REGISTER_FOR_SHADOW)(IN EFI_PEI_FILE_HANDLE FileHandle)
Definition: PiPeiCis.h:842
EFI_STATUS(EFIAPI * EFI_PEIM_ENTRY_POINT2)(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
Definition: PiPeiCis.h:54
EFI_STATUS(EFIAPI * EFI_PEI_FFS_GET_FILE_INFO2)(IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo)
Definition: PiPeiCis.h:759
EFI_STATUS(EFIAPI * EFI_PEI_GET_HOB_LIST)(IN CONST EFI_PEI_SERVICES **PeiServices, OUT VOID **HobList)
Definition: PiPeiCis.h:279
EFI_STATUS(EFIAPI * EFI_PEI_FFS_FIND_BY_NAME)(IN CONST EFI_GUID *FileName, IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_PEI_FILE_HANDLE *FileHandle)
Definition: PiPeiCis.h:649
EFI_STATUS(EFIAPI * EFI_PEI_INSTALL_PPI)(IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
Definition: PiPeiCis.h:159
EFI_STATUS(EFIAPI * EFI_PEI_LOCATE_PPI)(IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL, IN OUT VOID **Ppi)
Definition: PiPeiCis.h:205
EFI_STATUS(EFIAPI * EFI_PEI_REINSTALL_PPI)(IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi)
Definition: PiPeiCis.h:184
VOID * EFI_PEI_FILE_HANDLE
Definition: PiPeiCis.h:26
EFI_STATUS(EFIAPI * EFI_PEI_FFS_FIND_NEXT_FILE2)(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_FV_FILETYPE SearchType, IN CONST EFI_PEI_FV_HANDLE FvHandle, IN OUT EFI_PEI_FILE_HANDLE *FileHandle)
Definition: PiPeiCis.h:355
EFI_STATUS(EFIAPI * EFI_PEIM_NOTIFY_ENTRY_POINT)(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
Definition: PiPeiCis.h:71
VOID * EFI_PEI_FV_HANDLE
Definition: PiPeiCis.h:21
VOID(EFIAPI * EFI_PEI_SET_MEM)(IN VOID *Buffer, IN UINTN Size, IN UINT8 Value)
Definition: PiPeiCis.h:540
EFI_STATUS(EFIAPI * EFI_PEI_FFS_GET_VOLUME_INFO)(IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_FV_INFO *VolumeInfo)
Definition: PiPeiCis.h:811
EFI_STATUS(EFIAPI * EFI_PEI_FFS_FIND_NEXT_VOLUME2)(IN CONST EFI_PEI_SERVICES **PeiServices, IN UINTN Instance, OUT EFI_PEI_FV_HANDLE *VolumeHandle)
Definition: PiPeiCis.h:326
EFI_STATUS(EFIAPI * EFI_PEI_ALLOCATE_PAGES)(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, OUT EFI_PHYSICAL_ADDRESS *Memory)
Definition: PiPeiCis.h:466
EFI_STATUS(EFIAPI * EFI_PEI_FFS_FIND_SECTION_DATA3)(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_SECTION_TYPE SectionType, IN UINTN SectionInstance, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData, OUT UINT32 *AuthenticationStatus)
Definition: PiPeiCis.h:413
EFI_STATUS(EFIAPI * EFI_PEI_SET_BOOT_MODE)(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_BOOT_MODE BootMode)
Definition: PiPeiCis.h:262
VOID(EFIAPI * EFI_PEI_CORE_ENTRY_POINT)(IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
Definition: PiPeiCis.h:1051
EFI_STATUS(EFIAPI * EFI_PEI_RESET_SYSTEM)(IN CONST EFI_PEI_SERVICES **PeiServices)
Definition: PiPeiCis.h:601
EFI_STATUS(EFIAPI * EFI_PEI_FFS_GET_FILE_INFO)(IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO *FileInfo)
Definition: PiPeiCis.h:735
struct _EFI_SEC_PEI_HAND_OFF EFI_SEC_PEI_HAND_OFF
EFI_STATUS(EFIAPI * EFI_PEI_GET_BOOT_MODE)(IN CONST EFI_PEI_SERVICES **PeiServices, OUT EFI_BOOT_MODE *BootMode)
Definition: PiPeiCis.h:246
UINT32 EFI_STATUS_CODE_VALUE
Definition: PiStatusCode.h:67
UINT32 EFI_STATUS_CODE_TYPE
Definition: PiStatusCode.h:24
EFI_FILE_INFO * FileInfo(IN EFI_FILE_HANDLE FHand)
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
EFI_MEMORY_TYPE
EFI_RESET_TYPE
EFI_PEIM_NOTIFY_ENTRY_POINT Notify
Definition: PiPeiCis.h:122
EFI_TABLE_HEADER Hdr
Definition: PiPeiCis.h:881
VOID * BootFirmwareVolumeBase
Definition: PiPeiCis.h:965
UINTN BootFirmwareVolumeSize
Definition: PiPeiCis.h:970
VOID * PeiTemporaryRamBase
Definition: PiPeiCis.h:991
UINT32 BufferSize
Definition: PiPeiCis.h:708
UINT32 AuthenticationStatus
Definition: PiPeiCis.h:712
EFI_GUID FileName
Definition: PiPeiCis.h:690
EFI_FV_FILETYPE FileType
Definition: PiPeiCis.h:694
EFI_FV_FILE_ATTRIBUTES FileAttributes
Definition: PiPeiCis.h:698
EFI_GUID FileName
Definition: PiPeiCis.h:662
EFI_FV_FILE_ATTRIBUTES FileAttributes
Definition: PiPeiCis.h:670
UINT32 BufferSize
Definition: PiPeiCis.h:680
EFI_FV_FILETYPE FileType
Definition: PiPeiCis.h:666
EFI_GUID FvFormat
Definition: PiPeiCis.h:775
UINT64 FvSize
Definition: PiPeiCis.h:789
EFI_GUID FvName
Definition: PiPeiCis.h:779
EFI_FVB_ATTRIBUTES_2 FvAttributes
Definition: PiPeiCis.h:771
VOID * FvStart
Definition: PiPeiCis.h:785
Definition: Base.h:213
EFI_PEI_PPI_DESCRIPTOR Ppi
Definition: PiPeiCis.h:137
EFI_PEI_NOTIFY_DESCRIPTOR Notify
Definition: PiPeiCis.h:133