TianoCore EDK2 master
Loading...
Searching...
No Matches
UnitTestPeiServicesTablePointerLibPpi.c File Reference

Go to the source code of this file.

Functions

EFI_STATUS InternalPeiInstallPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList, IN BOOLEAN Single)
 
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 InternalPeiNotifyPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList, IN BOOLEAN Single)
 
EFI_STATUS EFIAPI UnitTestNotifyPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList)
 
VOID ProcessNotify (IN PEI_CORE_INSTANCE *PrivateData, IN UINTN NotifyType, IN INTN InstallStartIndex, IN INTN InstallStopIndex, IN INTN NotifyStartIndex, IN INTN NotifyStopIndex)
 

Detailed Description

This file implements some PEI services about PPI.

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

Definition in file UnitTestPeiServicesTablePointerLibPpi.c.

Function Documentation

◆ InternalPeiInstallPpi()

EFI_STATUS InternalPeiInstallPpi ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PPI_DESCRIPTOR PpiList,
IN BOOLEAN  Single 
)

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.
SingleTRUE if only single entry in the PpiList. FALSE if the PpiList is ended with an entry which has the EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST flag set in its Flags field.
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 30 of file UnitTestPeiServicesTablePointerLibPpi.c.

◆ InternalPeiNotifyPpi()

EFI_STATUS InternalPeiNotifyPpi ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_NOTIFY_DESCRIPTOR NotifyList,
IN BOOLEAN  Single 
)

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.
SingleTRUE if only single entry in the NotifyList. FALSE if the NotifyList is ended with an entry which has the EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST flag set in its Flags field.
Return values
EFI_SUCCESSif successful
EFI_OUT_OF_RESOURCESif no space in the database
EFI_INVALID_PARAMETERif not a good descriptor

Definition at line 301 of file UnitTestPeiServicesTablePointerLibPpi.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 435 of file UnitTestPeiServicesTablePointerLibPpi.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.

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