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

Go to the source code of this file.

Macros

#define STACK_SIZE   0x20000
 

Functions

EFI_STATUS EFIAPI EndOfPeiPpiNotifyCallback (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
 
EFI_STATUS EFIAPI PeiLoadFileLoadPayload (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)
 
VOID PrintFdt (IN VOID *FdtBase)
 
EFI_STATUS BuildFdtForUPL (IN VOID *FdtBase)
 
EFI_STATUS EFIAPI InitializeFitPayloadLoaderPeim (IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
 

Variables

CONST EFI_PEI_PPI_DESCRIPTOR gReadyToPayloadSignalPpi
 
EFI_PEI_PPI_DESCRIPTOR mEndOfPeiSignalPpi
 
EFI_PEI_NOTIFY_DESCRIPTOR mEndOfPeiNotifyList []
 
EFI_PEI_LOAD_FILE_PPI mPeiLoadFilePpi
 
EFI_PEI_PPI_DESCRIPTOR gPpiLoadFilePpiList
 

Detailed Description

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

Definition in file FitPayloadLoaderPeim.c.

Macro Definition Documentation

◆ STACK_SIZE

#define STACK_SIZE   0x20000

Definition at line 24 of file FitPayloadLoaderPeim.c.

Function Documentation

◆ BuildFdtForUPL()

EFI_STATUS BuildFdtForUPL ( IN VOID *  FdtBase)

It will build FDT for UPL consumed.

Parameters
[in]FdtBaseAddress of the Fdt data.
Return values
EFI_SUCCESSIf it completed successfully.
OthersIf it failed to build required FDT.

Definition at line 974 of file X86_BuildFdtLib.c.

◆ EndOfPeiPpiNotifyCallback()

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

Notify ReadyToPayLoad signal.

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_SUCCESSHobs data is discovered.
Returns
Others No Hobs data is discovered.

Definition at line 50 of file FitPayloadLoaderPeim.c.

◆ InitializeFitPayloadLoaderPeim()

EFI_STATUS EFIAPI InitializeFitPayloadLoaderPeim ( IN EFI_PEI_FILE_HANDLE  FileHandle,
IN CONST EFI_PEI_SERVICES **  PeiServices 
)

Install Pei Load File PPI.

Parameters
FileHandleHandle of the file being invoked.
PeiServicesDescribes the list of possible PEI Services.
Return values
EFI_SUCESSThe entry point executes successfully.
OthersSome error occurs during the execution of this function.

Definition at line 383 of file FitPayloadLoaderPeim.c.

◆ PeiLoadFileLoadPayload()

EFI_STATUS EFIAPI PeiLoadFileLoadPayload ( 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
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 87 of file FitPayloadLoaderPeim.c.

◆ PrintFdt()

VOID PrintFdt ( IN VOID *  FdtBase)

Print FDT data.

Parameters
[in]FdtBaseAddress of the Fdt data.

Definition at line 269 of file FitPayloadLoaderPeim.c.

Variable Documentation

◆ gPpiLoadFilePpiList

EFI_PEI_PPI_DESCRIPTOR gPpiLoadFilePpiList
Initial value:
= {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEfiPeiLoadFilePpiGuid,
&mPeiLoadFilePpi
}

Definition at line 231 of file FitPayloadLoaderPeim.c.

◆ gReadyToPayloadSignalPpi

CONST EFI_PEI_PPI_DESCRIPTOR gReadyToPayloadSignalPpi
Initial value:
= {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gUplReadyToPayloadPpiGuid,
}
#define NULL
Definition: Base.h:319

Definition at line 26 of file FitPayloadLoaderPeim.c.

◆ mEndOfPeiNotifyList

EFI_PEI_NOTIFY_DESCRIPTOR mEndOfPeiNotifyList[]
Initial value:
= {
{
(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEfiEndOfPeiSignalPpiGuid,
}
}
EFI_STATUS EFIAPI EndOfPeiPpiNotifyCallback(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)

Definition at line 66 of file FitPayloadLoaderPeim.c.

◆ mEndOfPeiSignalPpi

EFI_PEI_PPI_DESCRIPTOR mEndOfPeiSignalPpi
Initial value:
= {
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
&gEfiEndOfPeiSignalPpiGuid,
}

Definition at line 32 of file FitPayloadLoaderPeim.c.

◆ mPeiLoadFilePpi

EFI_PEI_LOAD_FILE_PPI mPeiLoadFilePpi
Initial value:
= {
}
EFI_STATUS EFIAPI PeiLoadFileLoadPayload(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)

Definition at line 227 of file FitPayloadLoaderPeim.c.