TianoCore EDK2 master
Loading...
Searching...
No Matches
UnitTestPeiServicesTablePointerLib.h File Reference
#include <Base.h>
#include <PiPei.h>
#include <Pi/PiMultiPhase.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/UnitTestLib.h>
#include <Library/PeiServicesTablePointerLib.h>
#include <Uefi.h>

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_INSTANCE
 

Macros

#define MAX_PPI_COUNT   100
 
#define MAX_HOB_SIZE   SIZE_32MB
 
#define PEI_CORE_INSTANCE_FROM_PS_THIS(a)   &mPrivateData
 

Typedefs

typedef struct _PEI_CORE_INSTANCE PEI_CORE_INSTANCE
 

Functions

VOID ProcessNotify (IN PEI_CORE_INSTANCE *PrivateData, IN UINTN NotifyType, IN INTN InstallStartIndex, IN INTN InstallStopIndex, IN INTN NotifyStartIndex, IN INTN NotifyStopIndex)
 
EFI_STATUS EFIAPI UnitTestInstallPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList)
 
EFI_STATUS EFIAPI UnitTestReInstallPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi)
 
EFI_STATUS EFIAPI UnitTestLocatePpi (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 UnitTestNotifyPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList)
 
EFI_STATUS EFIAPI UnitTestGetHobList (IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT VOID **HobList)
 
EFI_STATUS EFIAPI UnitTestCreateHob (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINT16 Type, IN UINT16 Length, IN OUT VOID **Hob)
 
EFI_STATUS UnitTestCoreBuildHobHandoffInfoTable (IN EFI_BOOT_MODE BootMode, IN EFI_PHYSICAL_ADDRESS MemoryBegin, IN UINT64 MemoryLength)
 
VOID EFIAPI UnitTestResetSystem2 (IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, IN UINTN DataSize, IN VOID *ResetData OPTIONAL)
 
EFI_STATUS EFIAPI UnitTestGetBootMode (IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT EFI_BOOT_MODE *BootMode)
 
EFI_STATUS EFIAPI UnitTestSetBootMode (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_BOOT_MODE BootMode)
 
EFI_STATUS EFIAPI UnitTestFfsFindNextVolume (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINTN Instance, IN OUT EFI_PEI_FV_HANDLE *VolumeHandle)
 
EFI_STATUS EFIAPI UnitTestFfsFindNextFile (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINT8 SearchType, IN EFI_PEI_FV_HANDLE FvHandle, IN OUT EFI_PEI_FILE_HANDLE *FileHandle)
 
EFI_STATUS EFIAPI UnitTestFfsFindSectionData (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_SECTION_TYPE SectionType, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData)
 
EFI_STATUS EFIAPI UnitTestInstallPeiMemory (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PHYSICAL_ADDRESS MemoryBegin, IN UINT64 MemoryLength)
 
EFI_STATUS EFIAPI UnitTestAllocatePages (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, OUT EFI_PHYSICAL_ADDRESS *Memory)
 
EFI_STATUS EFIAPI UnitTestAllocatePool (IN CONST EFI_PEI_SERVICES **PeiServices, IN UINTN Size, OUT VOID **Buffer)
 
EFI_STATUS EFIAPI UnitTestReportStatusCode (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 UnitTestResetSystem (IN CONST EFI_PEI_SERVICES **PeiServices)
 
EFI_STATUS EFIAPI UnitTestFfsFindFileByName (IN CONST EFI_GUID *FileName, IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_PEI_FILE_HANDLE *FileHandle)
 
EFI_STATUS EFIAPI UnitTestFfsGetFileInfo (IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO *FileInfo)
 
EFI_STATUS EFIAPI UnitTestFfsGetVolumeInfo (IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_FV_INFO *VolumeInfo)
 
EFI_STATUS EFIAPI UnitTestRegisterForShadow (IN EFI_PEI_FILE_HANDLE FileHandle)
 
EFI_STATUS EFIAPI UnitTestFfsFindSectionData3 (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 UnitTestFfsGetFileInfo2 (IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo)
 
EFI_STATUS EFIAPI UnitTestFreePages (IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN Pages)
 

Variables

PEI_CORE_INSTANCE mPrivateData
 

Detailed Description

An internal header file for the Unit Test instance of the PEI services Table Pointer Library.

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

Definition in file UnitTestPeiServicesTablePointerLib.h.

Macro Definition Documentation

◆ MAX_HOB_SIZE

#define MAX_HOB_SIZE   SIZE_32MB

Definition at line 23 of file UnitTestPeiServicesTablePointerLib.h.

◆ MAX_PPI_COUNT

#define MAX_PPI_COUNT   100

Definition at line 22 of file UnitTestPeiServicesTablePointerLib.h.

◆ PEI_CORE_INSTANCE_FROM_PS_THIS

#define PEI_CORE_INSTANCE_FROM_PS_THIS (   a)    &mPrivateData

Definition at line 96 of file UnitTestPeiServicesTablePointerLib.h.

Typedef Documentation

◆ PEI_CORE_INSTANCE

Forward declaration for PEI_CORE_INSTANCE

Definition at line 28 of file UnitTestPeiServicesTablePointerLib.h.

Function Documentation

◆ 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.

◆ UnitTestAllocatePages()

EFI_STATUS EFIAPI UnitTestAllocatePages ( 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 179 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestAllocatePool()

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

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 207 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestCoreBuildHobHandoffInfoTable()

EFI_STATUS UnitTestCoreBuildHobHandoffInfoTable ( 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 126 of file UnitTestPeiServicesTablePointerLibHob.c.

◆ UnitTestCreateHob()

EFI_STATUS EFIAPI UnitTestCreateHob ( 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 59 of file UnitTestPeiServicesTablePointerLibHob.c.

◆ UnitTestFfsFindFileByName()

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

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 282 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestFfsFindNextFile()

EFI_STATUS EFIAPI UnitTestFfsFindNextFile ( 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 93 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestFfsFindNextVolume()

EFI_STATUS EFIAPI UnitTestFfsFindNextVolume ( 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 66 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestFfsFindSectionData()

EFI_STATUS EFIAPI UnitTestFfsFindSectionData ( 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 118 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestFfsFindSectionData3()

EFI_STATUS EFIAPI UnitTestFfsFindSectionData3 ( 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 375 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestFfsGetFileInfo()

EFI_STATUS EFIAPI UnitTestFfsGetFileInfo ( 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 304 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestFfsGetFileInfo2()

EFI_STATUS EFIAPI UnitTestFfsGetFileInfo2 ( 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 400 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestFfsGetVolumeInfo()

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

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 331 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestFreePages()

EFI_STATUS EFIAPI UnitTestFreePages ( 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 423 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestGetBootMode()

EFI_STATUS EFIAPI UnitTestGetBootMode ( 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 23 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestGetHobList()

EFI_STATUS EFIAPI UnitTestGetHobList ( 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 UnitTestPeiServicesTablePointerLibHob.c.

◆ UnitTestInstallPeiMemory()

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

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 146 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestInstallPpi()

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

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 133 of file UnitTestPeiServicesTablePointerLibPpi.c.

◆ UnitTestLocatePpi()

EFI_STATUS EFIAPI UnitTestLocatePpi ( 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 232 of file UnitTestPeiServicesTablePointerLibPpi.c.

◆ UnitTestNotifyPpi()

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

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 414 of file UnitTestPeiServicesTablePointerLibPpi.c.

◆ UnitTestRegisterForShadow()

EFI_STATUS EFIAPI UnitTestRegisterForShadow ( 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 352 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestReInstallPpi()

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

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 160 of file UnitTestPeiServicesTablePointerLibPpi.c.

◆ UnitTestReportStatusCode()

EFI_STATUS EFIAPI UnitTestReportStatusCode ( 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 234 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestResetSystem()

EFI_STATUS EFIAPI UnitTestResetSystem ( 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 260 of file UnitTestPeiServicesTablePointerLibMisc.c.

◆ UnitTestResetSystem2()

VOID EFIAPI UnitTestResetSystem2 ( 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 98 of file UnitTestPeiServicesTablePointerLib.c.

◆ UnitTestSetBootMode()

EFI_STATUS EFIAPI UnitTestSetBootMode ( 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 43 of file UnitTestPeiServicesTablePointerLibMisc.c.

Variable Documentation

◆ mPrivateData

PEI_CORE_INSTANCE mPrivateData
extern

Definition at line 12 of file FatLiteApi.c.