TianoCore EDK2 master
Loading...
Searching...
No Matches
PeiMain.h File Reference

Go to the source code of this file.

Data Structures

union  PEI_PPI_LIST_POINTERS
 
struct  PEI_PPI_LIST
 
struct  PEI_CALLBACK_NOTIFY_LIST
 
struct  PEI_DISPATCH_NOTIFY_LIST
 
struct  PEI_PPI_DATABASE
 
struct  PEI_CORE_FV_HANDLE
 
struct  PEI_CORE_UNKNOW_FORMAT_FV_INFO
 
struct  CACHE_SECTION_DATA
 
struct  HOLE_MEMORY_DATA
 
struct  _PEI_CORE_INSTANCE
 
union  PEI_CORE_TEMP_POINTERS
 
struct  PEI_CORE_PARAMETERS
 

Macros

#define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE   0xff
 
#define PPI_GROWTH_STEP   64
 
#define CALLBACK_NOTIFY_GROWTH_STEP   32
 
#define DISPATCH_NOTIFY_GROWTH_STEP   8
 
#define PEIM_STATE_NOT_DISPATCHED   0x00
 
#define PEIM_STATE_DISPATCHED   0x01
 
#define PEIM_STATE_REGISTER_FOR_SHADOW   0x02
 
#define PEIM_STATE_DONE   0x03
 
#define FV_GROWTH_STEP   8
 
#define CACHE_SETION_MAX_NUMBER   0x10
 
#define HOLE_MAX_NUMBER   0x3
 
#define TEMP_FILE_GROWTH_STEP   32
 
#define PEI_CORE_HANDLE_SIGNATURE   SIGNATURE_32('P','e','i','C')
 
#define GET_TIME_IN_US()   ((UINT32)DivU64x32(GetTimeInNanoSecond(GetPerformanceCounter ()), 1000))
 
#define PEI_CORE_INSTANCE_FROM_PS_THIS(a)    CR(a, PEI_CORE_INSTANCE, Ps, PEI_CORE_HANDLE_SIGNATURE)
 

Typedefs

typedef struct _PEI_CORE_INSTANCE PEI_CORE_INSTANCE
 
typedef EFI_STATUS(EFIAPI * PEICORE_FUNCTION_POINTER) (IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList, IN PEI_CORE_INSTANCE *OldCoreData)
 

Functions

VOID EFIAPI PeiCore (IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList, IN VOID *Data)
 
BOOLEAN PeimDispatchReadiness (IN EFI_PEI_SERVICES **PeiServices, IN VOID *DependencyExpression)
 
EFI_STATUS EFIAPI MigratePeim (IN EFI_PEI_FILE_HANDLE FileHandle, IN EFI_PEI_FILE_HANDLE MigratedFileHandle)
 
EFI_STATUS EFIAPI EvacuateTempRam (IN PEI_CORE_INSTANCE *Private, IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData)
 
VOID PeiDispatcher (IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN PEI_CORE_INSTANCE *PrivateData)
 
VOID InitializeDispatcherData (IN PEI_CORE_INSTANCE *PrivateData, IN PEI_CORE_INSTANCE *OldCoreData, IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData)
 
BOOLEAN DepexSatisfied (IN PEI_CORE_INSTANCE *Private, IN EFI_PEI_FILE_HANDLE FileHandle, IN UINTN PeimCount)
 
VOID InitializePpiServices (IN PEI_CORE_INSTANCE *PrivateData, IN PEI_CORE_INSTANCE *OldCoreData)
 
VOID ConvertPpiPointers (IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN PEI_CORE_INSTANCE *PrivateData)
 
VOID ConvertPpiPointersFv (IN PEI_CORE_INSTANCE *PrivateData, IN UINTN OrgFvHandle, IN UINTN FvHandle, IN UINTN FvSize)
 
VOID ConvertPeiCorePpiPointers (IN PEI_CORE_INSTANCE *PrivateData, IN PEI_CORE_FV_HANDLE *CoreFvHandle)
 
VOID DumpPpiList (IN PEI_CORE_INSTANCE *PrivateData)
 
EFI_STATUS EFIAPI PeiInstallPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
 
EFI_STATUS EFIAPI PeiReInstallPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi)
 
EFI_STATUS EFIAPI PeiLocatePpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_GUID *Guid, IN UINTN Instance, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT VOID **Ppi)
 
EFI_STATUS EFIAPI PeiNotifyPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList)
 
VOID ProcessDispatchNotifyList (IN PEI_CORE_INSTANCE *PrivateData)
 
VOID ProcessNotify (IN PEI_CORE_INSTANCE *PrivateData, IN UINTN NotifyType, IN INTN InstallStartIndex, IN INTN InstallStopIndex, IN INTN NotifyStartIndex, IN INTN NotifyStopIndex)
 
VOID ProcessPpiListFromSec (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
 
EFI_STATUS EFIAPI PeiGetBootMode (IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT EFI_BOOT_MODE *BootMode)
 
EFI_STATUS EFIAPI PeiSetBootMode (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_BOOT_MODE BootMode)
 
VOID InitializeSecurityServices (IN EFI_PEI_SERVICES **PeiServices, IN PEI_CORE_INSTANCE *OldCoreData)
 
EFI_STATUS VerifyFv (IN EFI_FIRMWARE_VOLUME_HEADER *CurrentFvAddress)
 
EFI_STATUS VerifyPeim (IN PEI_CORE_INSTANCE *PrivateData, IN EFI_PEI_FV_HANDLE VolumeHandle, IN EFI_PEI_FILE_HANDLE FileHandle, IN UINT32 AuthenticationStatus)
 
EFI_STATUS EFIAPI PeiGetHobList (IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT VOID **HobList)
 
EFI_STATUS EFIAPI PeiCreateHob (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINT16 Type, IN UINT16 Length, IN OUT VOID **Hob)
 
EFI_STATUS PeiCoreBuildHobHandoffInfoTable (IN EFI_BOOT_MODE BootMode, IN EFI_PHYSICAL_ADDRESS MemoryBegin, IN UINT64 MemoryLength)
 
EFI_STATUS PeiInstallSecHobData (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_HOB_GENERIC_HEADER *SecHobList)
 
EFI_STATUS EFIAPI PeiFfsFindNextFile (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINT8 SearchType, IN EFI_PEI_FV_HANDLE FvHandle, IN OUT EFI_PEI_FILE_HANDLE *FileHandle)
 
EFI_STATUS ProcessSection (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_SECTION_TYPE SectionType, IN OUT UINTN *SectionInstance, IN EFI_COMMON_SECTION_HEADER *Section, IN UINTN SectionSize, OUT VOID **OutputBuffer, OUT UINT32 *AuthenticationStatus, IN BOOLEAN IsFfs3Fv)
 
EFI_STATUS EFIAPI PeiFfsFindSectionData (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_SECTION_TYPE SectionType, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData)
 
EFI_STATUS EFIAPI PeiFfsFindSectionData3 (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)
 
EFI_STATUS EFIAPI PeiFfsFindNextVolume (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINTN Instance, IN OUT EFI_PEI_FV_HANDLE *VolumeHandle)
 
VOID InitializeMemoryServices (IN PEI_CORE_INSTANCE *PrivateData, IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN PEI_CORE_INSTANCE *OldCoreData)
 
EFI_STATUS EFIAPI PeiInstallPeiMemory (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PHYSICAL_ADDRESS MemoryBegin, IN UINT64 MemoryLength)
 
VOID MigrateMemoryPages (IN PEI_CORE_INSTANCE *Private, IN BOOLEAN TemporaryRamMigrated)
 
VOID ConvertFvHob (IN PEI_CORE_INSTANCE *PrivateData, IN UINTN OrgFvHandle, IN UINTN FvHandle)
 
VOID ConvertMemoryAllocationHobs (IN PEI_CORE_INSTANCE *PrivateData)
 
EFI_STATUS EFIAPI PeiAllocatePages (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, OUT EFI_PHYSICAL_ADDRESS *Memory)
 
EFI_STATUS EFIAPI PeiFreePages (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN Pages)
 
EFI_STATUS EFIAPI PeiAllocatePool (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINTN Size, OUT VOID **Buffer)
 
EFI_STATUS PeiLoadImage (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_FILE_HANDLE FileHandle, IN UINT8 PeimState, OUT EFI_PHYSICAL_ADDRESS *EntryPoint, OUT UINT32 *AuthenticationState)
 
EFI_STATUS EFIAPI PeiReportStatusCode (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_STATUS_CODE_TYPE CodeType, IN EFI_STATUS_CODE_VALUE Value, IN UINT32 Instance, IN CONST EFI_GUID *CallerId, IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL)
 
EFI_STATUS EFIAPI PeiResetSystem (IN CONST EFI_PEI_SERVICES **PeiServices)
 
VOID EFIAPI PeiResetSystem2 (IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, IN UINTN DataSize, IN VOID *ResetData OPTIONAL)
 
VOID PeiInitializeFv (IN PEI_CORE_INSTANCE *PrivateData, IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData)
 
EFI_STATUS EFIAPI FirmwareVolumeInfoPpiNotifyCallback (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
 
EFI_STATUS EFIAPI PeiFfsFindFileByName (IN CONST EFI_GUID *FileName, IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_PEI_FILE_HANDLE *FileHandle)
 
EFI_STATUS EFIAPI PeiFfsGetFileInfo (IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO *FileInfo)
 
EFI_STATUS EFIAPI PeiFfsGetFileInfo2 (IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo)
 
EFI_STATUS EFIAPI PeiFfsGetVolumeInfo (IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_FV_INFO *VolumeInfo)
 
EFI_STATUS EFIAPI PeiRegisterForShadow (IN EFI_PEI_FILE_HANDLE FileHandle)
 
VOID InitializeImageServices (IN PEI_CORE_INSTANCE *PrivateData, IN PEI_CORE_INSTANCE *OldCoreData)
 
EFI_STATUS LoadAndRelocatePeCoffImageInPlace (IN VOID *Pe32Data, IN VOID *ImageAddress)
 
EFI_STATUS PeiGetPe32Data (IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **Pe32Data)
 
EFI_STATUS EFIAPI PeiLoadImageLoadImageWrapper (IN CONST EFI_PEI_LOAD_FILE_PPI *This, IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_PHYSICAL_ADDRESS *ImageAddressArg OPTIONAL, OUT UINT64 *ImageSizeArg OPTIONAL, OUT EFI_PHYSICAL_ADDRESS *EntryPoint, OUT UINT32 *AuthenticationState)
 
EFI_STATUS EFIAPI SecurityPpiNotifyCallback (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
 
EFI_STATUS ProcessFvFile (IN PEI_CORE_INSTANCE *PrivateData, IN PEI_CORE_FV_HANDLE *ParentFvCoreHandle, IN EFI_PEI_FILE_HANDLE ParentFvFileHandle)
 
PEI_CORE_FV_HANDLEFindNextCoreFvHandle (IN PEI_CORE_INSTANCE *Private, IN UINTN Instance)
 
EFI_STATUS EFIAPI PeiDefaultMemRead (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN EFI_PEI_CPU_IO_PPI_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
 
EFI_STATUS EFIAPI PeiDefaultMemWrite (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN EFI_PEI_CPU_IO_PPI_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
 
EFI_STATUS EFIAPI PeiDefaultIoRead (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN EFI_PEI_CPU_IO_PPI_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
 
EFI_STATUS EFIAPI PeiDefaultIoWrite (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN EFI_PEI_CPU_IO_PPI_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN OUT VOID *Buffer)
 
UINT8 EFIAPI PeiDefaultIoRead8 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT16 EFIAPI PeiDefaultIoRead16 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT32 EFIAPI PeiDefaultIoRead32 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT64 EFIAPI PeiDefaultIoRead64 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
VOID EFIAPI PeiDefaultIoWrite8 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT8 Data)
 
VOID EFIAPI PeiDefaultIoWrite16 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT16 Data)
 
VOID EFIAPI PeiDefaultIoWrite32 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT32 Data)
 
VOID EFIAPI PeiDefaultIoWrite64 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT64 Data)
 
UINT8 EFIAPI PeiDefaultMemRead8 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT16 EFIAPI PeiDefaultMemRead16 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT32 EFIAPI PeiDefaultMemRead32 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT64 EFIAPI PeiDefaultMemRead64 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
VOID EFIAPI PeiDefaultMemWrite8 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT8 Data)
 
VOID EFIAPI PeiDefaultMemWrite16 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT16 Data)
 
VOID EFIAPI PeiDefaultMemWrite32 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT32 Data)
 
VOID EFIAPI PeiDefaultMemWrite64 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT64 Data)
 
EFI_STATUS EFIAPI PeiDefaultPciCfg2Read (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN OUT VOID *Buffer)
 
EFI_STATUS EFIAPI PeiDefaultPciCfg2Write (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN OUT VOID *Buffer)
 
EFI_STATUS EFIAPI PeiDefaultPciCfg2Modify (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN VOID *SetBits, IN VOID *ClearBits)
 
VOID PeiReinitializeFv (IN PEI_CORE_INSTANCE *PrivateData)
 
EFI_STATUS EFIAPI PeiDelayedDispatchRegister (IN EFI_DELAYED_DISPATCH_PPI *This, IN EFI_DELAYED_DISPATCH_FUNCTION Function, IN UINT64 Context, IN EFI_GUID *DelayedGroupId OPTIONAL, IN UINT32 Delay)
 
EFI_STATUS EFIAPI PeiDelayedDispatchWaitOnEvent (IN EFI_DELAYED_DISPATCH_PPI *This, IN EFI_GUID DelayedGroupId)
 

Variables

EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi
 
EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi
 

Detailed Description

Definition of Pei Core Structures and Services

Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PeiMain.h.

Macro Definition Documentation

◆ CACHE_SETION_MAX_NUMBER

#define CACHE_SETION_MAX_NUMBER   0x10

Definition at line 165 of file PeiMain.h.

◆ CALLBACK_NOTIFY_GROWTH_STEP

#define CALLBACK_NOTIFY_GROWTH_STEP   32

Definition at line 74 of file PeiMain.h.

◆ DISPATCH_NOTIFY_GROWTH_STEP

#define DISPATCH_NOTIFY_GROWTH_STEP   8

Definition at line 75 of file PeiMain.h.

◆ FV_GROWTH_STEP

#define FV_GROWTH_STEP   8

Definition at line 138 of file PeiMain.h.

◆ GET_TIME_IN_US

#define GET_TIME_IN_US ( )    ((UINT32)DivU64x32(GetTimeInNanoSecond(GetPerformanceCounter ()), 1000))

Definition at line 231 of file PeiMain.h.

◆ HOLE_MAX_NUMBER

#define HOLE_MAX_NUMBER   0x3

Definition at line 175 of file PeiMain.h.

◆ PEI_CORE_HANDLE_SIGNATURE

#define PEI_CORE_HANDLE_SIGNATURE   SIGNATURE_32('P','e','i','C')

Definition at line 214 of file PeiMain.h.

◆ PEI_CORE_INSTANCE_FROM_PS_THIS

#define PEI_CORE_INSTANCE_FROM_PS_THIS (   a)     CR(a, PEI_CORE_INSTANCE, Ps, PEI_CORE_HANDLE_SIGNATURE)

Pei Core Instance Data Macros

Definition at line 343 of file PeiMain.h.

◆ PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE

#define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE   0xff

It is an FFS type extension used for PeiFindFileEx. It indicates current FFS searching is for all PEIMs can be dispatched by PeiCore.

Definition at line 59 of file PeiMain.h.

◆ PEIM_STATE_DISPATCHED

#define PEIM_STATE_DISPATCHED   0x01

Definition at line 131 of file PeiMain.h.

◆ PEIM_STATE_DONE

#define PEIM_STATE_DONE   0x03

Definition at line 133 of file PeiMain.h.

◆ PEIM_STATE_NOT_DISPATCHED

#define PEIM_STATE_NOT_DISPATCHED   0x00

Definition at line 130 of file PeiMain.h.

◆ PEIM_STATE_REGISTER_FOR_SHADOW

#define PEIM_STATE_REGISTER_FOR_SHADOW   0x02

Definition at line 132 of file PeiMain.h.

◆ PPI_GROWTH_STEP

#define PPI_GROWTH_STEP   64

Number of PEI_PPI_LIST_POINTERS to grow by each time we run out of room

Definition at line 73 of file PeiMain.h.

◆ TEMP_FILE_GROWTH_STEP

#define TEMP_FILE_GROWTH_STEP   32

Definition at line 212 of file PeiMain.h.

Typedef Documentation

◆ PEI_CORE_INSTANCE

Forward declaration for PEI_CORE_INSTANCE

Definition at line 186 of file PeiMain.h.

◆ PEICORE_FUNCTION_POINTER

typedef EFI_STATUS(EFIAPI * PEICORE_FUNCTION_POINTER) (IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList, IN PEI_CORE_INSTANCE *OldCoreData)

Function Pointer type for PeiCore function.

Parameters
SecCoreDataPoints to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location.
PpiListPoints to a list of one or more PPI descriptors to be installed initially by the PEI core. An empty PPI list consists of a single descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such that both the PEI Foundation and any modules can leverage the associated service calls and/or code in these early PPIs
OldCoreDataPointer to old core data that is used to initialize the core's data areas.

Definition at line 202 of file PeiMain.h.

Function Documentation

◆ ConvertFvHob()

VOID ConvertFvHob ( IN PEI_CORE_INSTANCE PrivateData,
IN UINTN  OrgFvHandle,
IN UINTN  FvHandle 
)

Migrate the base address in firmware volume allocation HOBs from temporary memory to PEI installed memory.

Parameters
[in]PrivateDataPointer to PeiCore's private data structure.
[in]OrgFvHandleAddress of FV Handle in temporary memory.
[in]FvHandleAddress of FV Handle in permanent memory.

Definition at line 179 of file MemoryServices.c.

◆ ConvertMemoryAllocationHobs()

VOID ConvertMemoryAllocationHobs ( IN PEI_CORE_INSTANCE PrivateData)

Migrate MemoryBaseAddress in memory allocation HOBs from the temporary memory to PEI installed memory.

Parameters
[in]PrivateDataPointer to PeiCore's private data structure.

Definition at line 220 of file MemoryServices.c.

◆ ConvertPeiCorePpiPointers()

VOID ConvertPeiCorePpiPointers ( IN PEI_CORE_INSTANCE PrivateData,
IN PEI_CORE_FV_HANDLE CoreFvHandle 
)

Migrate PPI Pointers of PEI_CORE from temporary memory to permanent memory.

Parameters
PrivateDataPointer to PeiCore's private data structure.
CoreFvHandleAddress of PEI_CORE FV Handle in temporary memory.

Definition at line 1080 of file Ppi.c.

◆ ConvertPpiPointers()

VOID ConvertPpiPointers ( IN CONST EFI_SEC_PEI_HAND_OFF SecCoreData,
IN PEI_CORE_INSTANCE PrivateData 
)

Migrate the Hob list from the temporary memory to PEI installed memory.

Parameters
SecCoreDataPoints to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location.
PrivateDataPointer to PeiCore's private data structure.

Migrate PPI Pointers from the temporary memory to PEI installed memory.

Parameters
SecCoreDataPoints to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location.
PrivateDataPointer to PeiCore's private data structure.

Definition at line 161 of file Ppi.c.

◆ ConvertPpiPointersFv()

VOID ConvertPpiPointersFv ( IN PEI_CORE_INSTANCE PrivateData,
IN UINTN  OrgFvHandle,
IN UINTN  FvHandle,
IN UINTN  FvSize 
)

Migrate Notify Pointers inside an FV from temporary memory to permanent memory.

Parameters
PrivateDataPointer to PeiCore's private data structure.
OrgFvHandleAddress of FV Handle in temporary memory.
FvHandleAddress of FV Handle in permanent memory.
FvSizeSize of the FV.

Definition at line 213 of file Ppi.c.

◆ DepexSatisfied()

BOOLEAN DepexSatisfied ( IN PEI_CORE_INSTANCE Private,
IN EFI_PEI_FILE_HANDLE  FileHandle,
IN UINTN  PeimCount 
)

This routine parses the Dependency Expression, if available, and decides if the module can be executed.

Parameters
PrivatePeiCore's private data structure
FileHandlePEIM's file handle
PeimCountThe index of last dispatched PEIM.
Return values
TRUECan be dispatched
FALSECannot be dispatched

This routine parses the Dependency Expression, if available, and decides if the module can be executed.

Parameters
PrivatePeiCore's private data structure
FileHandlePEIM's file handle
PeimCountPeim count in all dispatched PEIMs.
Return values
TRUECan be dispatched
FALSECannot be dispatched

Definition at line 2162 of file Dispatcher.c.

◆ DumpPpiList()

VOID DumpPpiList ( IN PEI_CORE_INSTANCE PrivateData)

Dumps the PPI lists to debug output.

Parameters
PrivateDataPoints to PeiCore's private instance data.

Definition at line 365 of file Ppi.c.

◆ EvacuateTempRam()

EFI_STATUS EFIAPI EvacuateTempRam ( IN PEI_CORE_INSTANCE Private,
IN CONST EFI_SEC_PEI_HAND_OFF SecCoreData 
)

Migrate FVs out of temporary RAM before the cache is flushed.

Parameters
PrivatePeiCore's private data structure
SecCoreDataPoints to a data structure containing information about the PEI core's operating environment, such as the size and location of temporary RAM, the stack location and the BFV location.
Return values
EFI_SUCCESSSuccessfully migrated installed FVs from temporary RAM to permanent memory.
EFI_OUT_OF_RESOURCESInsufficient memory exists to allocate needed pages.

Definition at line 1537 of file Dispatcher.c.

◆ FindNextCoreFvHandle()

PEI_CORE_FV_HANDLE * FindNextCoreFvHandle ( IN PEI_CORE_INSTANCE Private,
IN UINTN  Instance 
)

Gets a PEI_CORE_FV_HANDLE instance for the next volume according to the given index.

This routine also will install an instance of the FvInfo PPI for the FV HOB as defined in the PI specification.

Parameters
PrivatePointer of PEI_CORE_INSTANCE
InstanceIndex of the FV to search
Returns
Instance of PEI_CORE_FV_HANDLE.

Definition at line 2143 of file FwVol.c.

◆ FirmwareVolumeInfoPpiNotifyCallback()

EFI_STATUS EFIAPI FirmwareVolumeInfoPpiNotifyCallback ( IN EFI_PEI_SERVICES **  PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR NotifyDescriptor,
IN VOID *  Ppi 
)

Process Firmware Volume Information once FvInfoPPI install.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
NotifyDescriptorAddress of the notification descriptor data structure.
PpiAddress of the PPI that was installed.
Return values
EFI_SUCCESSif the interface could be successfully installed

Process Firmware Volume Information once FvInfoPPI or FvInfo2PPI install. The FV Info will be registered into PeiCore private data structure. And search the inside FV image, if found, the new FV INFO(2) PPI will be installed.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
NotifyDescriptorAddress of the notification descriptor data structure.
PpiAddress of the PPI that was installed.
Return values
EFI_SUCCESSThe FV Info is registered into PeiCore private data structure.
Returns
if not EFI_SUCCESS, fail to verify FV.

Measure and record the Firmware Volume Information once FvInfoPPI install.

Parameters
[in]PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
[in]NotifyDescriptorAddress of the notification descriptor data structure.
[in]PpiAddress of the PPI that was installed.
Return values
EFI_SUCCESSThe FV Info is measured and recorded to TPM.
Returns
Others Fail to measure FV.

Measure and record the Firmware Volume Information once FvInfoPPI install.

Parameters
[in]PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
[in]NotifyDescriptorAddress of the notification descriptor data structure.
[in]PpiAddress of the PPI that was installed.
Return values
EFI_SUCCESSThe FV Info is measured and recorded to TPM.
Returns
Others Fail to measure FV.

Definition at line 553 of file FwVol.c.

◆ InitializeDispatcherData()

VOID InitializeDispatcherData ( IN PEI_CORE_INSTANCE PrivateData,
IN PEI_CORE_INSTANCE OldCoreData,
IN CONST EFI_SEC_PEI_HAND_OFF SecCoreData 
)

Initialize the Dispatcher's data members

Parameters
PrivateDataPeiCore's private data structure
OldCoreDataOld data from SecCore NULL if being run in non-permanent memory mode.
SecCoreDataPoints to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location.

Initialize the Dispatcher's data members

Parameters
PrivateDataPeiCore's private data structure
OldCoreDataOld data from SecCore NULL if being run in non-permanent memory mode.
SecCoreDataPoints to a data structure containing information about the PEI core's operating environment, such as the size and location of temporary RAM, the stack location and the BFV location.
Returns
None.

Definition at line 2132 of file Dispatcher.c.

◆ InitializeImageServices()

VOID InitializeImageServices ( IN PEI_CORE_INSTANCE PrivateData,
IN PEI_CORE_INSTANCE OldCoreData 
)

Initialize image service that install PeiLoadFilePpi.

Parameters
PrivateDataPointer to PeiCore's private data structure PEI_CORE_INSTANCE.
OldCoreDataPointer to Old PeiCore's private data. If NULL, PeiCore is entered at first time, stack/heap in temporary memory. If not NULL, PeiCore is entered at second time, stack/heap has been moved to permanent memory.

Install Pei Load File PPI.

Parameters
PrivateData- Pointer to PEI_CORE_INSTANCE.
OldCoreData- Pointer to PEI_CORE_INSTANCE.

Definition at line 963 of file Image.c.

◆ InitializeMemoryServices()

VOID InitializeMemoryServices ( IN PEI_CORE_INSTANCE PrivateData,
IN CONST EFI_SEC_PEI_HAND_OFF SecCoreData,
IN PEI_CORE_INSTANCE OldCoreData 
)

Initialize the memory services.

Parameters
PrivateDataPeiCore's private data structure
SecCoreDataPoints to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location.
OldCoreDataPointer to the PEI Core data. NULL if being run in non-permanent memory mode.

Initialize the memory services.

Parameters
PrivateDataPoints to PeiCore's private instance data.
SecCoreDataPoints to a data structure containing information about the PEI core's operating environment, such as the size and location of temporary RAM, the stack location and the BFV location.
OldCoreDataPointer to the PEI Core data. NULL if being run in non-permanent memory mode.

Definition at line 24 of file MemoryServices.c.

◆ InitializePpiServices()

VOID InitializePpiServices ( IN PEI_CORE_INSTANCE PrivateData,
IN PEI_CORE_INSTANCE OldCoreData 
)

Initialize PPI services.

Parameters
PrivateDataPointer to the PEI Core data.
OldCoreDataPointer to old PEI Core data. NULL if being run in non-permanent memory mode.

◆ InitializeSecurityServices()

VOID InitializeSecurityServices ( IN EFI_PEI_SERVICES **  PeiServices,
IN PEI_CORE_INSTANCE OldCoreData 
)

Initialize the security services.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
OldCoreDataPointer to the old core data. NULL if being run in non-permanent memory mode.

Definition at line 26 of file Security.c.

◆ LoadAndRelocatePeCoffImageInPlace()

EFI_STATUS LoadAndRelocatePeCoffImageInPlace ( IN VOID *  Pe32Data,
IN VOID *  ImageAddress 
)

Loads and relocates a PE/COFF image in place.

Parameters
Pe32DataThe base address of the PE/COFF file that is to be loaded and relocated
ImageAddressThe base address of the relocated PE/COFF image
Return values
EFI_SUCCESSThe file was loaded and relocated
OthersThe file not be loaded and error occurred.

Loads and relocates a PE/COFF image in place.

Parameters
Pe32DataThe base address of the PE/COFF file that is to be loaded and relocated
ImageAddressThe base address of the relocated PE/COFF image
Return values
EFI_SUCCESSThe file was loaded and relocated.
OthersThe file not be loaded and error occurred.

Definition at line 482 of file Image.c.

◆ MigrateMemoryPages()

VOID MigrateMemoryPages ( IN PEI_CORE_INSTANCE Private,
IN BOOLEAN  TemporaryRamMigrated 
)

Migrate memory pages allocated in pre-memory phase. Copy memory pages at temporary heap top to permanent heap top.

Parameters
[in]PrivatePointer to the private data passed in from caller.
[in]TemporaryRamMigratedTemporary memory has been migrated to permanent memory.

Definition at line 113 of file MemoryServices.c.

◆ MigratePeim()

EFI_STATUS EFIAPI MigratePeim ( IN EFI_PEI_FILE_HANDLE  FileHandle,
IN EFI_PEI_FILE_HANDLE  MigratedFileHandle 
)

Migrate a PEIM from temporary RAM to permanent memory.

Parameters
PeimFileHandlePointer to the FFS file header of the image.
MigratedFileHandlePointer to the FFS file header of the migrated image.
Return values
EFI_SUCCESSSucessfully migrated the PEIM to permanent memory.

Migrate a PEIM from temporary RAM to permanent memory.

Parameters
PeimFileHandlePointer to the FFS file header of the image.
MigratedFileHandlePointer to the FFS file header of the migrated image.
Return values
EFI_SUCCESSSuccessfully migrated the PEIM to permanent memory.

Definition at line 1371 of file Dispatcher.c.

◆ PeiAllocatePages()

EFI_STATUS EFIAPI PeiAllocatePages ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN EFI_MEMORY_TYPE  MemoryType,
IN UINTN  Pages,
OUT EFI_PHYSICAL_ADDRESS Memory 
)

The purpose of the service is to publish an interface that allows PEIMs to allocate memory ranges that are managed by the PEI Foundation.

Prior to InstallPeiMemory() being called, PEI will allocate pages from the heap. After InstallPeiMemory() is called, PEI will allocate pages within the region of memory provided by InstallPeiMemory() service in a best-effort fashion. Location-specific allocations are not managed by the PEI foundation code.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
MemoryTypeThe type of memory to allocate.
PagesThe number of contiguous 4 KB pages to allocate.
MemoryPointer to a physical address. On output, the address is set to the base of the page range that was allocated.
Return values
EFI_SUCCESSThe memory range was successfully allocated.
EFI_OUT_OF_RESOURCESThe pages could not be allocated.
EFI_INVALID_PARAMETERType is not equal to EfiLoaderCode, EfiLoaderData, EfiRuntimeServicesCode, EfiRuntimeServicesData, EfiBootServicesCode, EfiBootServicesData, EfiACPIReclaimMemory, EfiReservedMemoryType, or EfiACPIMemoryNVS.

Definition at line 545 of file MemoryServices.c.

◆ PeiAllocatePool()

EFI_STATUS EFIAPI PeiAllocatePool ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN UINTN  Size,
OUT VOID **  Buffer 
)

Memory allocation service on the temporary memory.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
SizeAmount of memory required
BufferAddress of pointer to the buffer
Return values
EFI_SUCCESSThe allocation was successful
EFI_OUT_OF_RESOURCESThere is not enough heap to satisfy the requirement to allocate the requested size.

Pool allocation service. Before permanent memory is discovered, the pool will be allocated in the heap in temporary memory. Generally, the size of the heap in temporary memory does not exceed 64K, so the biggest pool size could be allocated is 64K.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
SizeAmount of memory required
BufferAddress of pointer to the buffer
Return values
EFI_SUCCESSThe allocation was successful
EFI_OUT_OF_RESOURCESThere is not enough heap to satisfy the requirement to allocate the requested size.

Definition at line 845 of file MemoryServices.c.

◆ PeiCore()

VOID EFIAPI PeiCore ( IN CONST EFI_SEC_PEI_HAND_OFF SecCoreDataPtr,
IN CONST EFI_PEI_PPI_DESCRIPTOR PpiList,
IN VOID *  Data 
)

The entry routine to Pei Core, invoked by PeiMain during transition from SEC to PEI. After switching stack in the PEI core, it will restart with the old core data.

Parameters
SecCoreDataPoints to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location.
PpiListPoints to a list of one or more PPI descriptors to be installed initially by the PEI core. An empty PPI list consists of a single descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such that both the PEI Foundation and any modules can leverage the associated service calls and/or code in these early PPIs
DataPointer to old core data that is used to initialize the core's data areas.

This routine is invoked by main entry of PeiMain module during transition from SEC to PEI. After switching stack in the PEI core, it will restart with the old core data.

Parameters
SecCoreDataPtrPoints to a data structure containing information about the PEI core's operating environment, such as the size and location of temporary RAM, the stack location and the BFV location.
PpiListPoints to a list of one or more PPI descriptors to be installed initially by the PEI core. An empty PPI list consists of a single descriptor with the end-tag EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such that both the PEI Foundation and any modules can leverage the associated service calls and/or code in these early PPIs
DataPointer to old core data that is used to initialize the core's data areas. If NULL, it is first PeiCore entering.

Definition at line 169 of file PeiMain.c.

◆ PeiCoreBuildHobHandoffInfoTable()

EFI_STATUS PeiCoreBuildHobHandoffInfoTable ( IN EFI_BOOT_MODE  BootMode,
IN EFI_PHYSICAL_ADDRESS  MemoryBegin,
IN UINT64  MemoryLength 
)

Builds a Handoff Information Table HOB

Parameters
BootMode- Current Bootmode
MemoryBegin- Start Memory Address.
MemoryLength- Length of Memory.
Returns
EFI_SUCCESS Always success to initialize HOB.

Definition at line 208 of file Hob.c.

◆ PeiCreateHob()

EFI_STATUS EFIAPI PeiCreateHob ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN UINT16  Type,
IN UINT16  Length,
IN OUT VOID **  Hob 
)

Add a new HOB to the HOB List.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
TypeType of the new HOB.
LengthLength of the new HOB to allocate.
HobPointer to the new HOB.
Returns
EFI_SUCCESS Success to create HOB.
Return values
EFI_INVALID_PARAMETERif Hob is NULL
EFI_NOT_AVAILABLE_YETif HobList is still not available.
EFI_OUT_OF_RESOURCESif there is no more memory to grow the Hoblist.

Definition at line 66 of file Hob.c.

◆ PeiDefaultIoRead()

EFI_STATUS EFIAPI PeiDefaultIoRead ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
IN OUT VOID *  Buffer 
)

IO-based read services.

This function is to perform the IO-base read service for the EFI_PEI_CPU_IO_PPI. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes.
AddressThe physical address of the access.
CountThe number of accesses to perform.
BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_NOT_YET_AVAILABLEThe service has not been installed.

Definition at line 133 of file CpuIo.c.

◆ PeiDefaultIoRead16()

UINT16 EFIAPI PeiDefaultIoRead16 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

Reads an 16-bit I/O port.

If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
Returns
A 16-bit value returned from the I/O space.

Definition at line 214 of file CpuIo.c.

◆ PeiDefaultIoRead32()

UINT32 EFIAPI PeiDefaultIoRead32 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

Reads an 32-bit I/O port.

If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
Returns
A 32-bit value returned from the I/O space.

Definition at line 237 of file CpuIo.c.

◆ PeiDefaultIoRead64()

UINT64 EFIAPI PeiDefaultIoRead64 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

Reads an 64-bit I/O port.

If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
Returns
A 64-bit value returned from the I/O space.

Definition at line 260 of file CpuIo.c.

◆ PeiDefaultIoRead8()

UINT8 EFIAPI PeiDefaultIoRead8 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

8-bit I/O read operations.

If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
Returns
An 8-bit value returned from the I/O space.

Definition at line 191 of file CpuIo.c.

◆ PeiDefaultIoWrite()

EFI_STATUS EFIAPI PeiDefaultIoWrite ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
IN OUT VOID *  Buffer 
)

IO-based write services.

This function is to perform the IO-base write service for the EFI_PEI_CPU_IO_PPI. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes.
AddressThe physical address of the access.
CountThe number of accesses to perform.
BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_NOT_YET_AVAILABLEThe service has not been installed.

Definition at line 165 of file CpuIo.c.

◆ PeiDefaultIoWrite16()

VOID EFIAPI PeiDefaultIoWrite16 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT16  Data 
)

16-bit I/O write operations.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

16-bit I/O write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

Definition at line 302 of file CpuIo.c.

◆ PeiDefaultIoWrite32()

VOID EFIAPI PeiDefaultIoWrite32 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT32  Data 
)

32-bit I/O write operations.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

32-bit I/O write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

Definition at line 323 of file CpuIo.c.

◆ PeiDefaultIoWrite64()

VOID EFIAPI PeiDefaultIoWrite64 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT64  Data 
)

64-bit I/O write operations.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

64-bit I/O write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

Definition at line 344 of file CpuIo.c.

◆ PeiDefaultIoWrite8()

VOID EFIAPI PeiDefaultIoWrite8 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT8  Data 
)

8-bit I/O write operations.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

8-bit I/O write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

Definition at line 281 of file CpuIo.c.

◆ PeiDefaultMemRead()

EFI_STATUS EFIAPI PeiDefaultMemRead ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
IN OUT VOID *  Buffer 
)

Memory-based read services.

This function is to perform the Memory Access Read service based on installed instance of the EFI_PEI_CPU_IO_PPI. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes.
AddressThe physical address of the access.
CountThe number of accesses to perform.
BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_NOT_YET_AVAILABLEThe service has not been installed.

Definition at line 68 of file CpuIo.c.

◆ PeiDefaultMemRead16()

UINT16 EFIAPI PeiDefaultMemRead16 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

16-bit memory read operations.

If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
Returns
An 16-bit value returned from the memory space.

Definition at line 392 of file CpuIo.c.

◆ PeiDefaultMemRead32()

UINT32 EFIAPI PeiDefaultMemRead32 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

32-bit memory read operations.

If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
Returns
An 32-bit value returned from the memory space.

Definition at line 416 of file CpuIo.c.

◆ PeiDefaultMemRead64()

UINT64 EFIAPI PeiDefaultMemRead64 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

64-bit memory read operations.

If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
Returns
An 64-bit value returned from the memory space.

Definition at line 440 of file CpuIo.c.

◆ PeiDefaultMemRead8()

UINT8 EFIAPI PeiDefaultMemRead8 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

8-bit memory read operations.

If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
Returns
An 8-bit value returned from the memory space.

Definition at line 368 of file CpuIo.c.

◆ PeiDefaultMemWrite()

EFI_STATUS EFIAPI PeiDefaultMemWrite ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
IN OUT VOID *  Buffer 
)

Memory-based write services.

This function is to perform the Memory Access Write service based on installed instance of the EFI_PEI_CPU_IO_PPI. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes.
AddressThe physical address of the access.
CountThe number of accesses to perform.
BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_NOT_YET_AVAILABLEThe service has not been installed.

Definition at line 101 of file CpuIo.c.

◆ PeiDefaultMemWrite16()

VOID EFIAPI PeiDefaultMemWrite16 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT16  Data 
)

16-bit memory write operations.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

16-bit memory write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

Definition at line 484 of file CpuIo.c.

◆ PeiDefaultMemWrite32()

VOID EFIAPI PeiDefaultMemWrite32 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT32  Data 
)

32-bit memory write operations.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

32-bit memory write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

Definition at line 506 of file CpuIo.c.

◆ PeiDefaultMemWrite64()

VOID EFIAPI PeiDefaultMemWrite64 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT64  Data 
)

64-bit memory write operations.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

64-bit memory write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

Definition at line 528 of file CpuIo.c.

◆ PeiDefaultMemWrite8()

VOID EFIAPI PeiDefaultMemWrite8 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT8  Data 
)

8-bit memory write operations.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

8-bit memory write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
AddressThe physical address of the access.
DataThe data to write.

Definition at line 462 of file CpuIo.c.

◆ PeiDefaultPciCfg2Modify()

EFI_STATUS EFIAPI PeiDefaultPciCfg2Modify ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PCI_CFG2_PPI This,
IN EFI_PEI_PCI_CFG_PPI_WIDTH  Width,
IN UINT64  Address,
IN VOID *  SetBits,
IN VOID *  ClearBits 
)

This function performs a read-modify-write operation on the contents from a given location in the PCI configuration space.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes. Type EFI_PEI_PCI_CFG_PPI_WIDTH is defined in Read().
AddressThe physical address of the access.
SetBitsPoints to value to bitwise-OR with the read configuration value. The size of the value is determined by Width.
ClearBitsPoints to the value to negate and bitwise-AND with the read configuration value. The size of the value is determined by Width.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERThe invalid access width.
EFI_NOT_YET_AVAILABLEIf the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.

This function performs a read-modify-write operation on the contents from a given location in the PCI configuration space. If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes. Type EFI_PEI_PCI_CFG_PPI_WIDTH is defined in Read().
AddressThe physical address of the access.
SetBitsPoints to value to bitwise-OR with the read configuration value. The size of the value is determined by Width.
ClearBitsPoints to the value to negate and bitwise-AND with the read configuration value. The size of the value is determined by Width.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERThe invalid access width.
EFI_NOT_YET_AVAILABLEIf the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.

Definition at line 112 of file PciCfg2.c.

◆ PeiDefaultPciCfg2Read()

EFI_STATUS EFIAPI PeiDefaultPciCfg2Read ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PCI_CFG2_PPI This,
IN EFI_PEI_PCI_CFG_PPI_WIDTH  Width,
IN UINT64  Address,
IN OUT VOID *  Buffer 
)

Reads from a given location in the PCI configuration space.

If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes. See EFI_PEI_PCI_CFG_PPI_WIDTH above.
AddressThe physical address of the access. The format of the address is described by EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS.
BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERThe invalid access width.
EFI_NOT_YET_AVAILABLEIf the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.

Definition at line 47 of file PciCfg2.c.

◆ PeiDefaultPciCfg2Write()

EFI_STATUS EFIAPI PeiDefaultPciCfg2Write ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PCI_CFG2_PPI This,
IN EFI_PEI_PCI_CFG_PPI_WIDTH  Width,
IN UINT64  Address,
IN OUT VOID *  Buffer 
)

Write to a given location in the PCI configuration space.

If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes. See EFI_PEI_PCI_CFG_PPI_WIDTH above.
AddressThe physical address of the access. The format of the address is described by EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS.
BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERThe invalid access width.
EFI_NOT_YET_AVAILABLEIf the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.

Definition at line 78 of file PciCfg2.c.

◆ PeiDelayedDispatchRegister()

EFI_STATUS EFIAPI PeiDelayedDispatchRegister ( IN EFI_DELAYED_DISPATCH_PPI This,
IN EFI_DELAYED_DISPATCH_FUNCTION  Function,
IN UINT64  Context,
IN EFI_GUID *DelayedGroupId  OPTIONAL,
IN UINT32  Delay 
)

Register a callback to be called after a minimum delay has occurred.

Parameters
[in]ThisPointer to the EFI_DELAYED_DISPATCH_PPI instance
[in]FunctionFunction to call back
[in]ContextContext data
[in]DelayedGroupIdDelayed dispatch request ID the caller will wait on
[in]DelayDelay interval
Return values
EFI_SUCCESSFunction successfully loaded
EFI_INVALID_PARAMETEROne of the Arguments is not supported
EFI_OUT_OF_RESOURCESNo more entries

Register a callback to be called after a minimum delay has occurred.

This service is the single member function of the EFI_DELAYED_DISPATCH_PPI

Parameters
[in]ThisPointer to the EFI_DELAYED_DISPATCH_PPI instance
[in]FunctionFunction to call back
[in]ContextContext data
[in]DelayedGroupIdGUID for this Delayed Dispatch request.
[in]DelayDelay interval
Return values
EFI_SUCCESSFunction successfully loaded
EFI_INVALID_PARAMETEROne of the Arguments is not supported
EFI_OUT_OF_RESOURCESNo more entries

Definition at line 109 of file Dispatcher.c.

◆ PeiDelayedDispatchWaitOnEvent()

EFI_STATUS EFIAPI PeiDelayedDispatchWaitOnEvent ( IN EFI_DELAYED_DISPATCH_PPI This,
IN EFI_GUID  DelayedGroupId 
)

Wait on a registered Delayed Dispatch unit that has a DelayedGroupId. Continue to dispatch all registered delayed dispatch entries until ALL entries with DelayedGroupId have completed.

Parameters
[in]ThisThe Delayed Dispatch PPI pointer.
[in]DelayedGroupIdDelayed dispatch request ID the caller will wait on
Return values
EFI_SUCCESSFunction successfully invoked
EFI_INVALID_PARAMETEROne of the Arguments is not supported

Wait on a registered Delayed Dispatch unit that has a DelayedGroupId. Continue to dispatch all registered delayed dispatch entries until ALL entries with DelayedGroupId have completed.

Example usage:

  1. Register a Delayed Dispatch entry with a DelayedGroupId.
  2. Call this function with the DelayedGroupId
  3. The registered function in #1 will be called after the specified delay.
  4. This function will wait until all entries with the DelayedGroupId have completed.
Parameters
[in]ThisThe Delayed Dispatch PPI pointer.
[in]DelayedGroupIdDelayed dispatch request ID the caller will wait on
Return values
EFI_SUCCESSThe operation succeeds.
EFI_INVALID_PARAMETERThe parameters are invalid.

Definition at line 307 of file Dispatcher.c.

◆ PeiDispatcher()

VOID PeiDispatcher ( IN CONST EFI_SEC_PEI_HAND_OFF SecCoreData,
IN PEI_CORE_INSTANCE Private 
)

Conduct PEIM dispatch.

Parameters
SecCoreDataPointer to the data structure containing SEC to PEI handoff data
PrivateDataPointer to the private data passed in from caller

Conduct PEIM dispatch.

Parameters
SecCoreDataPoints to a data structure containing information about the PEI core's operating environment, such as the size and location of temporary RAM, the stack location and the BFV location.
PrivatePointer to the private data passed in from caller

Definition at line 1777 of file Dispatcher.c.

◆ PeiFfsFindFileByName()

EFI_STATUS EFIAPI PeiFfsFindFileByName ( IN CONST EFI_GUID FileName,
IN EFI_PEI_FV_HANDLE  VolumeHandle,
OUT EFI_PEI_FILE_HANDLE FileHandle 
)

Given the input VolumeHandle, search for the next matching name file.

Parameters
FileNameFile name to search.
VolumeHandleThe current FV to search.
FileHandlePointer to the file matching name in VolumeHandle. NULL if file not found
Return values
EFI_NOT_FOUNDNo files matching the search criteria were found
EFI_SUCCESSSuccess to search given file

Find a file within a volume by its name.

Parameters
FileNameA pointer to the name of the file to find within the firmware volume.
VolumeHandleThe firmware volume to search
FileHandleUpon exit, points to the found file's handle or NULL if it could not be found.
Return values
EFI_SUCCESSFile was found.
EFI_NOT_FOUNDFile was not found.
EFI_INVALID_PARAMETERVolumeHandle or FileHandle or FileName was NULL.

Definition at line 1188 of file FwVol.c.

◆ PeiFfsFindNextFile()

EFI_STATUS EFIAPI PeiFfsFindNextFile ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN UINT8  SearchType,
IN EFI_PEI_FV_HANDLE  FvHandle,
IN OUT EFI_PEI_FILE_HANDLE FileHandle 
)

Searches for the next matching file in the firmware volume.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
SearchTypeFilter to find only files of this type. Type EFI_FV_FILETYPE_ALL causes no filtering to be done.
FvHandleHandle of firmware volume in which to search.
FileHandleOn entry, points to the current handle from which to begin searching or NULL to start at the beginning of the firmware volume. On exit, points the file handle of the next file in the volume or NULL if there are no more files.
Return values
EFI_NOT_FOUNDThe file was not found.
EFI_NOT_FOUNDThe header checksum was not zero.
EFI_SUCCESSThe file was found.

Definition at line 1114 of file FwVol.c.

◆ PeiFfsFindNextVolume()

EFI_STATUS EFIAPI PeiFfsFindNextVolume ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN UINTN  Instance,
IN OUT EFI_PEI_FV_HANDLE VolumeHandle 
)

Search the firmware volumes by index

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
InstanceThis instance of the firmware volume to find. The value 0 is the Boot Firmware Volume (BFV).
VolumeHandleOn exit, points to the next volume handle or NULL if it does not exist.
Return values
EFI_INVALID_PARAMETERVolumeHandle is NULL
EFI_NOT_FOUNDThe volume was not found.
EFI_SUCCESSThe volume was found.

Definition at line 1147 of file FwVol.c.

◆ PeiFfsFindSectionData()

EFI_STATUS EFIAPI PeiFfsFindSectionData ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN EFI_SECTION_TYPE  SectionType,
IN EFI_PEI_FILE_HANDLE  FileHandle,
OUT VOID **  SectionData 
)

Searches for the next matching section within the specified file.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
SectionTypeFilter to find only sections of this type.
FileHandlePointer to the current file to search.
SectionDataA pointer to the discovered section, if successful. NULL if section not found
Return values
EFI_NOT_FOUNDThe section was not found.
EFI_SUCCESSThe section was found.

Definition at line 1034 of file FwVol.c.

◆ PeiFfsFindSectionData3()

EFI_STATUS EFIAPI PeiFfsFindSectionData3 ( 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 
)

Searches for the next matching section within the specified file.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
SectionTypeThe value of the section type to find.
SectionInstanceSection instance to find.
FileHandleHandle of the firmware file to search.
SectionDataA pointer to the discovered section, if successful.
AuthenticationStatusA pointer to the authentication status for this section.
Return values
EFI_SUCCESSThe section was found.
EFI_NOT_FOUNDThe section was not found.

Definition at line 1067 of file FwVol.c.

◆ PeiFfsGetFileInfo()

EFI_STATUS EFIAPI PeiFfsGetFileInfo ( IN EFI_PEI_FILE_HANDLE  FileHandle,
OUT EFI_FV_FILE_INFO FileInfo 
)

Returns information about a specific file.

Parameters
FileHandleHandle of the file.
FileInfoUpon exit, points to the file's information.
Return values
EFI_INVALID_PARAMETERIf FileInfo is NULL.
EFI_INVALID_PARAMETERIf FileHandle does not represent a valid file.
EFI_SUCCESSFile information returned.

Definition at line 1221 of file FwVol.c.

◆ PeiFfsGetFileInfo2()

EFI_STATUS EFIAPI PeiFfsGetFileInfo2 ( IN EFI_PEI_FILE_HANDLE  FileHandle,
OUT EFI_FV_FILE_INFO2 FileInfo 
)

Returns information about a specific file.

Parameters
FileHandleHandle of the file.
FileInfoUpon exit, points to the file's information.
Return values
EFI_INVALID_PARAMETERIf FileInfo is NULL.
EFI_INVALID_PARAMETERIf FileHandle does not represent a valid file.
EFI_SUCCESSFile information returned.

Definition at line 1256 of file FwVol.c.

◆ PeiFfsGetVolumeInfo()

EFI_STATUS EFIAPI PeiFfsGetVolumeInfo ( IN EFI_PEI_FV_HANDLE  VolumeHandle,
OUT EFI_FV_INFO VolumeInfo 
)

Returns information about the specified volume.

Parameters
VolumeHandleHandle of the volume.
VolumeInfoUpon exit, points to the volume's information.
Return values
EFI_INVALID_PARAMETERIf VolumeHandle does not represent a valid volume.
EFI_INVALID_PARAMETERIf VolumeInfo is NULL.
EFI_SUCCESSVolume information returned.

Returns information about the specified volume.

This function returns information about a specific firmware volume, including its name, type, attributes, starting address and size.

Parameters
VolumeHandleHandle of the volume.
VolumeInfoUpon exit, points to the volume's information.
Return values
EFI_SUCCESSVolume information returned.
EFI_INVALID_PARAMETERIf VolumeHandle does not represent a valid volume.
EFI_INVALID_PARAMETERIf VolumeHandle is NULL.
EFI_SUCCESSInformation successfully returned.
EFI_INVALID_PARAMETERThe volume designated by the VolumeHandle is not available.

Definition at line 1307 of file FwVol.c.

◆ PeiFreePages()

EFI_STATUS EFIAPI PeiFreePages ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN EFI_PHYSICAL_ADDRESS  Memory,
IN UINTN  Pages 
)

Frees memory pages.

Parameters
[in]PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
[in]MemoryThe base physical address of the pages to be freed.
[in]PagesThe number of contiguous 4 KB pages to free.
Return values
EFI_SUCCESSThe requested pages were freed.
EFI_INVALID_PARAMETERMemory is not a page-aligned address or Pages is invalid.
EFI_NOT_FOUNDThe requested memory pages were not allocated with AllocatePages().

Definition at line 769 of file MemoryServices.c.

◆ PeiGetBootMode()

EFI_STATUS EFIAPI PeiGetBootMode ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN OUT EFI_BOOT_MODE BootMode 
)

This service enables PEIMs to ascertain the present value of the boot mode.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
BootModeA pointer to contain the value of the boot mode.
Return values
EFI_SUCCESSThe boot mode was returned successfully.
EFI_INVALID_PARAMETERBootMode is NULL.

Definition at line 27 of file BootMode.c.

◆ PeiGetHobList()

EFI_STATUS EFIAPI PeiGetHobList ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN OUT VOID **  HobList 
)

Gets the pointer to the HOB List.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
HobListPointer to the HOB List.
Return values
EFI_SUCCESSGet the pointer of HOB List
EFI_NOT_AVAILABLE_YETthe HOB List is not yet published
EFI_INVALID_PARAMETERHobList is NULL (in debug mode)

Definition at line 25 of file Hob.c.

◆ PeiGetPe32Data()

EFI_STATUS PeiGetPe32Data ( IN EFI_PEI_FILE_HANDLE  FileHandle,
OUT VOID **  Pe32Data 
)

Find the PE32 Data for an FFS file.

Parameters
FileHandlePointer to the FFS file header of the image.
Pe32DataPointer to a (VOID *) PE32 Data pointer.
Return values
EFI_SUCCESSImage is successfully loaded.
EFI_NOT_FOUNDFail to locate PE32 Data.

Definition at line 541 of file Image.c.

◆ PeiInitializeFv()

VOID PeiInitializeFv ( IN PEI_CORE_INSTANCE PrivateData,
IN CONST EFI_SEC_PEI_HAND_OFF SecCoreData 
)

Initialize PeiCore FV List.

Parameters
PrivateData- Pointer to PEI_CORE_INSTANCE.
SecCoreData- Pointer to EFI_SEC_PEI_HAND_OFF.

Definition at line 465 of file FwVol.c.

◆ PeiInstallPeiMemory()

EFI_STATUS EFIAPI PeiInstallPeiMemory ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN EFI_PHYSICAL_ADDRESS  MemoryBegin,
IN UINT64  MemoryLength 
)

Install the permanent memory is now available. Creates HOB (PHIT and Stack).

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
MemoryBeginStart of memory address.
MemoryLengthLength of memory.
Returns
EFI_SUCCESS Always success.

This function registers the found memory configuration with the PEI Foundation.

The usage model is that the PEIM that discovers the permanent memory shall invoke this service. This routine will hold discoveried memory information into PeiCore's private data, and set SwitchStackSignal flag. After PEIM who discovery memory is dispatched, PeiDispatcher will migrate temporary memory to permanent memory.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
MemoryBeginStart of memory address.
MemoryLengthLength of memory.
Returns
EFI_SUCCESS Always success.

Definition at line 73 of file MemoryServices.c.

◆ PeiInstallPpi()

EFI_STATUS EFIAPI PeiInstallPpi ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PPI_DESCRIPTOR PpiList 
)

Install PPI services. It is implementation of EFI_PEI_SERVICE.InstallPpi.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
PpiListPointer to PPI array that want to be installed.
Return values
EFI_SUCCESSif all PPIs in PpiList are successfully installed.
EFI_INVALID_PARAMETERif PpiList is NULL pointer if any PPI in PpiList is not valid
EFI_OUT_OF_RESOURCESif there is no more memory resource to install PPI

This function installs an interface in the PEI PPI database by GUID. The purpose of the service is to publish an interface that other parties can use to call additional PEIMs.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
PpiListPointer to a list of PEI PPI Descriptors.
Return values
EFI_SUCCESSif all PPIs in PpiList are successfully installed.
EFI_INVALID_PARAMETERif PpiList is NULL pointer if any PPI in PpiList is not valid
EFI_OUT_OF_RESOURCESif there is no more memory resource to install PPI

Definition at line 563 of file Ppi.c.

◆ PeiInstallSecHobData()

EFI_STATUS PeiInstallSecHobData ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN EFI_HOB_GENERIC_HEADER SecHobList 
)

Install SEC HOB data to the HOB List.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
SecHobListPointer to SEC HOB List.
Returns
EFI_SUCCESS Success to install SEC HOB data.
Return values
EFI_OUT_OF_RESOURCESIf there is no more memory to grow the Hoblist.

Definition at line 132 of file Hob.c.

◆ PeiLoadImage()

EFI_STATUS PeiLoadImage ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN EFI_PEI_FILE_HANDLE  FileHandle,
IN UINT8  PeimState,
OUT EFI_PHYSICAL_ADDRESS EntryPoint,
OUT UINT32 *  AuthenticationState 
)

Routine for load image file.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
FileHandlePointer to the FFS file header of the image.
PeimStateThe dispatch state of the input PEIM handle.
EntryPointPointer to entry point of specified image file for output.
AuthenticationStatePointer to attestation authentication state of image.
Return values
EFI_SUCCESSImage is successfully loaded.
EFI_NOT_FOUNDFail to locate necessary PPI
OthersFail to load file.

Routine to load image file for subsequent execution by LoadFile Ppi. If any LoadFile Ppi is not found, the build-in support function for the PE32+/TE XIP image format is used.

Parameters
PeiServices- An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
FileHandle- Pointer to the FFS file header of the image.
PeimState- The dispatch state of the input PEIM handle.
EntryPoint- Pointer to entry point of specified image file for output.
AuthenticationState- Pointer to attestation authentication state of image.
Return values
EFI_SUCCESS- Image is successfully loaded.
EFI_NOT_FOUND- Fail to locate necessary PPI
Others- Fail to load file.

Definition at line 885 of file Image.c.

◆ PeiLoadImageLoadImageWrapper()

EFI_STATUS EFIAPI PeiLoadImageLoadImageWrapper ( IN CONST EFI_PEI_LOAD_FILE_PPI This,
IN EFI_PEI_FILE_HANDLE  FileHandle,
OUT EFI_PHYSICAL_ADDRESS *ImageAddressArg  OPTIONAL,
OUT UINT64 *ImageSizeArg  OPTIONAL,
OUT EFI_PHYSICAL_ADDRESS EntryPoint,
OUT UINT32 *  AuthenticationState 
)

The wrapper function of PeiLoadImageLoadImage().

Parameters
ThisPointer to EFI_PEI_LOAD_FILE_PPI.
FileHandlePointer to the FFS file header of the image.
ImageAddressArgPointer to PE/TE image.
ImageSizeArgSize of PE/TE image.
EntryPointPointer to entry point of specified image file for output.
AuthenticationStatePointer to attestation authentication state of image.
Returns
Status of PeiLoadImageLoadImage().

The wrapper function of PeiLoadImageLoadImage().

Parameters
This- Pointer to EFI_PEI_LOAD_FILE_PPI.
FileHandle- Pointer to the FFS file header of the image.
ImageAddressArg- Pointer to PE/TE image.
ImageSizeArg- Size of PE/TE image.
EntryPoint- Pointer to entry point of specified image file for output.
AuthenticationState- Pointer to attestation authentication state of image.
Returns
Status of PeiLoadImageLoadImage().

Definition at line 789 of file Image.c.

◆ PeiLocatePpi()

EFI_STATUS EFIAPI PeiLocatePpi ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_GUID Guid,
IN UINTN  Instance,
IN OUT EFI_PEI_PPI_DESCRIPTOR **  PpiDescriptor,
IN OUT VOID **  Ppi 
)

Locate a given named PPI.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
GuidPointer to GUID of the PPI.
InstanceInstance Number to discover.
PpiDescriptorPointer to reference the found descriptor. If not NULL, returns a pointer to the descriptor (includes flags, etc)
PpiPointer to reference the found PPI
Return values
EFI_SUCCESSif the PPI is in the database
EFI_NOT_FOUNDif the PPI is not in the database

Definition at line 662 of file Ppi.c.

◆ PeimDispatchReadiness()

BOOLEAN PeimDispatchReadiness ( IN EFI_PEI_SERVICES **  PeiServices,
IN VOID *  DependencyExpression 
)

This is the POSTFIX version of the dependency evaluator. When a PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on the evaluation stack. When that entry is popped from the evaluation stack, the PPI is checked if it is installed. This method allows some time savings as not all PPIs must be checked for certain operation types (AND, OR).

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
DependencyExpressionPointer to a dependency expression. The Grammar adheres to the BNF described above and is stored in postfix notation.
Return values
TRUEif it is a well-formed Grammar
FALSEif the dependency expression overflows the evaluation stack if the dependency expression underflows the evaluation stack if the dependency expression is not a well-formed Grammar.

This is the POSTFIX version of the dependency evaluator. When a PUSH [PPI GUID] is encountered, a pointer to the GUID is stored on the evaluation stack. When that entry is popped from the evaluation stack, the PPI is checked if it is installed. This method allows some time savings as not all PPIs must be checked for certain operation types (AND, OR).

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation
DependencyExpressionPointer to a dependency expression. The Grammar adheres to the BNF described above and is stored in postfix notation.
Return values
TRUEif it is a well-formed Grammar
FALSEif the dependency expression overflows the evaluation stack if the dependency expression underflows the evaluation stack if the dependency expression is not a well-formed Grammar.

Definition at line 92 of file Dependency.c.

◆ PeiNotifyPpi()

EFI_STATUS EFIAPI PeiNotifyPpi ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_NOTIFY_DESCRIPTOR NotifyList 
)

Install a notification for a given PPI.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
NotifyListPointer to list of Descriptors to notify upon.
Return values
EFI_SUCCESSif successful
EFI_OUT_OF_RESOURCESif no space in the database
EFI_INVALID_PARAMETERif not a good descriptor

This function installs a notification service to be called back when a given interface is installed or reinstalled. The purpose of the service is to publish an interface that other parties can use to call additional PPIs that may materialize later.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
NotifyListPointer to list of Descriptors to notify upon.
Return values
EFI_SUCCESSif successful
EFI_OUT_OF_RESOURCESif no space in the database
EFI_INVALID_PARAMETERif not a good descriptor

Definition at line 874 of file Ppi.c.

◆ PeiRegisterForShadow()

EFI_STATUS EFIAPI PeiRegisterForShadow ( IN EFI_PEI_FILE_HANDLE  FileHandle)

This routine enables a PEIM to register itself for shadow when the PEI Foundation discovers permanent memory.

Parameters
FileHandleFile handle of a PEIM.
Return values
EFI_NOT_FOUNDThe file handle doesn't point to PEIM itself.
EFI_ALREADY_STARTEDIndicate that the PEIM has been registered itself.
EFI_SUCCESSSuccessfully to register itself.

Definition at line 2223 of file Dispatcher.c.

◆ PeiReinitializeFv()

VOID PeiReinitializeFv ( IN PEI_CORE_INSTANCE PrivateData)

After PeiCore image is shadowed into permanent memory, all build-in FvPpi should be re-installed with the instance in permanent memory and all cached FvPpi pointers in PrivateData->Fv[] array should be fixed up to be pointed to the one in permanent memory.

Parameters
PrivateDataPointer to PEI_CORE_INSTANCE.

Definition at line 2164 of file FwVol.c.

◆ PeiReInstallPpi()

EFI_STATUS EFIAPI PeiReInstallPpi ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PPI_DESCRIPTOR OldPpi,
IN CONST EFI_PEI_PPI_DESCRIPTOR NewPpi 
)

Re-Install PPI services.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
OldPpiPointer to the old PEI PPI Descriptors.
NewPpiPointer to the new PEI PPI Descriptors.
Return values
EFI_SUCCESSif the operation was successful
EFI_INVALID_PARAMETERif OldPpi or NewPpi is NULL if NewPpi is not valid
EFI_NOT_FOUNDif the PPI was not in the database

This function reinstalls an interface in the PEI PPI database by GUID. The purpose of the service is to publish an interface that other parties can use to replace an interface of the same name in the protocol database with a different interface.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
OldPpiPointer to the old PEI PPI Descriptors.
NewPpiPointer to the new PEI PPI Descriptors.
Return values
EFI_SUCCESSif the operation was successful
EFI_INVALID_PARAMETERif OldPpi or NewPpi is NULL
EFI_INVALID_PARAMETERif NewPpi is not valid
EFI_NOT_FOUNDif the PPI was not in the database

Definition at line 590 of file Ppi.c.

◆ PeiReportStatusCode()

EFI_STATUS EFIAPI PeiReportStatusCode ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN EFI_STATUS_CODE_TYPE  CodeType,
IN EFI_STATUS_CODE_VALUE  Value,
IN UINT32  Instance,
IN CONST EFI_GUID CallerId,
IN CONST EFI_STATUS_CODE_DATA *Data  OPTIONAL 
)

Core version of the Status Code reporter

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
CodeTypeType of Status Code.
ValueValue to output for Status Code.
InstanceInstance Number of this status code.
CallerIdID of the caller of this status code.
DataOptional data associated with this status code.
Return values
EFI_SUCCESSif status code is successfully reported
EFI_NOT_AVAILABLE_YETif StatusCodePpi has not been installed

Definition at line 29 of file StatusCode.c.

◆ PeiResetSystem()

EFI_STATUS EFIAPI PeiResetSystem ( IN CONST EFI_PEI_SERVICES **  PeiServices)

Core version of the Reset System

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
Return values
EFI_NOT_AVAILABLE_YETPPI not available yet.
EFI_DEVICE_ERRORDid not reset system. Otherwise, resets the system.

Definition at line 25 of file Reset.c.

◆ PeiResetSystem2()

VOID EFIAPI PeiResetSystem2 ( IN EFI_RESET_TYPE  ResetType,
IN EFI_STATUS  ResetStatus,
IN UINTN  DataSize,
IN VOID *ResetData  OPTIONAL 
)

Resets the entire platform.

Parameters
[in]ResetTypeThe type of reset to perform.
[in]ResetStatusThe status code for the reset.
[in]DataSizeThe size, in bytes, of ResetData.
[in]ResetDataFor a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown the data buffer starts with a Null-terminated string, optionally followed by additional binary data. The string is a description that the caller may use to further indicate the reason for the system reset.

Definition at line 80 of file Reset.c.

◆ PeiSetBootMode()

EFI_STATUS EFIAPI PeiSetBootMode ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN EFI_BOOT_MODE  BootMode 
)

This service enables PEIMs to update the boot mode variable.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
BootModeThe value of the boot mode to set.
Returns
EFI_SUCCESS The value was successfully updated

Definition at line 60 of file BootMode.c.

◆ ProcessDispatchNotifyList()

VOID ProcessDispatchNotifyList ( IN PEI_CORE_INSTANCE PrivateData)

Process the Notify List at dispatch level.

Parameters
PrivateDataPeiCore's private data structure.

Definition at line 890 of file Ppi.c.

◆ ProcessFvFile()

EFI_STATUS ProcessFvFile ( IN PEI_CORE_INSTANCE PrivateData,
IN PEI_CORE_FV_HANDLE ParentFvCoreHandle,
IN EFI_PEI_FILE_HANDLE  ParentFvFileHandle 
)

Get FV image(s) from the FV type file, then install FV INFO(2) PPI, Build FV(2, 3) HOB.

Parameters
PrivateDataPeiCore's private data structure
ParentFvCoreHandlePointer of EFI_CORE_FV_HANDLE to parent FV image that contain this FV image.
ParentFvFileHandleFile handle of a FV type file that contain this FV image.
Return values
EFI_NOT_FOUNDFV image can't be found.
EFI_SUCCESSSuccessfully to process it.
EFI_OUT_OF_RESOURCESCan not allocate page when aligning FV image
EFI_SECURITY_VIOLATIONImage is illegal
OthersCan not find EFI_SECTION_FIRMWARE_VOLUME_IMAGE section

Definition at line 1406 of file FwVol.c.

◆ ProcessNotify()

VOID ProcessNotify ( IN PEI_CORE_INSTANCE PrivateData,
IN UINTN  NotifyType,
IN INTN  InstallStartIndex,
IN INTN  InstallStopIndex,
IN INTN  NotifyStartIndex,
IN INTN  NotifyStopIndex 
)

Process notifications.

Parameters
PrivateDataPeiCore's private data structure
NotifyTypeType of notify to fire.
InstallStartIndexInstall Beginning index.
InstallStopIndexInstall Ending index.
NotifyStartIndexNotify Beginning index.
NotifyStopIndexNotify Ending index.

Definition at line 960 of file Ppi.c.

◆ ProcessPpiListFromSec()

VOID ProcessPpiListFromSec ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PPI_DESCRIPTOR PpiList 
)

Process PpiList from SEC phase.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
PpiListPoints to a list of one or more PPI descriptors to be installed initially by the PEI core. These PPI's will be installed and/or immediately signaled if they are notification type.

Definition at line 1021 of file Ppi.c.

◆ ProcessSection()

EFI_STATUS ProcessSection ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN EFI_SECTION_TYPE  SectionType,
IN OUT UINTN SectionInstance,
IN EFI_COMMON_SECTION_HEADER Section,
IN UINTN  SectionSize,
OUT VOID **  OutputBuffer,
OUT UINT32 *  AuthenticationStatus,
IN BOOLEAN  IsFfs3Fv 
)

Go through the file to search SectionType section. Search within encapsulation sections (compression and GUIDed) recursively, until the match section is found.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
SectionTypeFilter to find only section of this type.
SectionInstancePointer to the filter to find the specific instance of section.
SectionFrom where to search.
SectionSizeThe file size to search.
OutputBufferA pointer to the discovered section, if successful. NULL if section not found.
AuthenticationStatusUpdated upon return to point to the authentication status for this section.
IsFfs3FvIndicates the FV format.
Returns
EFI_NOT_FOUND The match section is not found.
EFI_SUCCESS The match section is found.

Go through the file to search SectionType section. Search within encapsulation sections (compression and GUIDed) recursively, until the match section is found.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
SectionTypeFilter to find only section of this type.
SectionInstancePointer to the filter to find the specific instance of section.
SectionFrom where to search.
SectionSizeThe file size to search.
OutputBufferA pointer to the discovered section, if successful. NULL if section not found
AuthenticationStatusUpdated upon return to point to the authentication status for this section.
IsFfs3FvIndicates the FV format.
Returns
EFI_NOT_FOUND The match section is not found.
EFI_SUCCESS The match section is found.

Definition at line 782 of file FwVol.c.

◆ SecurityPpiNotifyCallback()

EFI_STATUS EFIAPI SecurityPpiNotifyCallback ( IN EFI_PEI_SERVICES **  PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR NotifyDescriptor,
IN VOID *  Ppi 
)

Provide a callback for when the security PPI is installed.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
NotifyDescriptorThe descriptor for the notification event.
PpiPointer to the PPI in question.
Returns
Always success

Provide a callback for when the security PPI is installed. This routine will cache installed security PPI into PeiCore's private data.

Parameters
PeiServicesAn indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
NotifyDescriptorThe descriptor for the notification event.
PpiPointer to the PPI in question.
Returns
Always success

Definition at line 52 of file Security.c.

◆ VerifyFv()

EFI_STATUS VerifyFv ( IN EFI_FIRMWARE_VOLUME_HEADER CurrentFvAddress)

Verify a Firmware volume.

Parameters
CurrentFvAddressPointer to the current Firmware Volume under consideration
Return values
EFI_SUCCESSFirmware Volume is legal
EFI_SECURITY_VIOLATIONFirmware Volume fails integrity test

Verify a Firmware volume.

Parameters
CurrentFvAddressPointer to the current Firmware Volume under consideration
Return values
EFI_SUCCESSFirmware Volume is legal

Definition at line 137 of file Security.c.

◆ VerifyPeim()

EFI_STATUS VerifyPeim ( IN PEI_CORE_INSTANCE PrivateData,
IN EFI_PEI_FV_HANDLE  VolumeHandle,
IN EFI_PEI_FILE_HANDLE  FileHandle,
IN UINT32  AuthenticationStatus 
)

Provide a callout to the security verification service.

Parameters
PrivateDataPeiCore's private data structure
VolumeHandleHandle of FV
FileHandleHandle of PEIM's FFS
AuthenticationStatusAuthentication status
Return values
EFI_SUCCESSImage is OK
EFI_SECURITY_VIOLATIONImage is illegal
EFI_NOT_FOUNDIf security PPI is not installed.

Definition at line 88 of file Security.c.

Variable Documentation

◆ gPeiDefaultCpuIoPpi

EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi
extern

This default instance of EFI_PEI_CPU_IO_PPI install assigned to EFI_PEI_SERVICE.CpuIo when PeiCore's initialization.

Definition at line 20 of file CpuIo.c.

◆ gPeiDefaultPciCfg2Ppi

EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi
extern

This default instance of EFI_PEI_PCI_CFG2_PPI install assigned to EFI_PEI_SERVICE.PciCfg when PeiCore's initialization.

Definition at line 20 of file PciCfg2.c.