TianoCore EDK2 master
Loading...
Searching...
No Matches
Ppi.c File Reference
#include "PeiMain.h"

Go to the source code of this file.

Functions

VOID ConvertPointer (IN OUT VOID **Pointer, IN UINTN TempBottom, IN UINTN TempTop, IN UINTN Offset, IN BOOLEAN OffsetPositive)
 
VOID ConvertPointerInRanges (IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN PEI_CORE_INSTANCE *PrivateData, IN OUT VOID **Pointer)
 
VOID ConvertSinglePpiPointer (IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN PEI_CORE_INSTANCE *PrivateData, IN PEI_PPI_LIST_POINTERS *PpiPointer)
 
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 DumpPpiList (IN PEI_CORE_INSTANCE *PrivateData)
 
EFI_STATUS InternalPeiInstallPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList, IN BOOLEAN Single)
 
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 InternalPeiNotifyPpi (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList, IN BOOLEAN Single)
 
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)
 
VOID ConvertPeiCorePpiPointers (IN PEI_CORE_INSTANCE *PrivateData, IN PEI_CORE_FV_HANDLE *CoreFvHandle)
 

Detailed Description

EFI PEI Core PPI services

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

Definition in file Ppi.c.

Function Documentation

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

◆ ConvertPointer()

VOID ConvertPointer ( IN OUT VOID **  Pointer,
IN UINTN  TempBottom,
IN UINTN  TempTop,
IN UINTN  Offset,
IN BOOLEAN  OffsetPositive 
)

Migrate Pointer from the temporary memory to PEI installed memory.

Parameters
PointerPointer to the Pointer needs to be converted.
TempBottomBase of old temporary memory
TempTopTop of old temporary memory
OffsetOffset of new memory to old temporary memory.
OffsetPositivePositive flag of Offset value.

Definition at line 23 of file Ppi.c.

◆ ConvertPointerInRanges()

VOID ConvertPointerInRanges ( IN CONST EFI_SEC_PEI_HAND_OFF SecCoreData,
IN PEI_CORE_INSTANCE PrivateData,
IN OUT VOID **  Pointer 
)

Migrate Pointer in ranges of 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.
PointerPointer to the Pointer needs to be converted.

Definition at line 53 of file Ppi.c.

◆ ConvertPpiPointers()

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

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.

◆ ConvertSinglePpiPointer()

VOID ConvertSinglePpiPointer ( IN CONST EFI_SEC_PEI_HAND_OFF SecCoreData,
IN PEI_CORE_INSTANCE PrivateData,
IN PEI_PPI_LIST_POINTERS PpiPointer 
)

Migrate Single PPI Pointer 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.
PpiPointerPointer to Ppi

Definition at line 126 of file Ppi.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.

◆ 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 449 of file Ppi.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 731 of file Ppi.c.

◆ PeiInstallPpi()

EFI_STATUS EFIAPI PeiInstallPpi ( 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 563 of file Ppi.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.

◆ PeiNotifyPpi()

EFI_STATUS EFIAPI PeiNotifyPpi ( 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 874 of file Ppi.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 
)

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.

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

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