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

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI Communicate (IN CONST EFI_PEI_MM_COMMUNICATION_PPI *This, IN OUT VOID *CommBuffer, IN OUT UINTN *CommSize)
 
EFI_STATUS EFIAPI EndOfPeiCallback (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi)
 
VOID * MmIplCreateHob (IN VOID *Hob, IN UINT16 HobType, IN UINT16 HobLength)
 
RETURN_STATUS CreateMmFoundationHobList (IN UINT8 *FoundationHobList, IN OUT UINTN *FoundationHobSize, IN UINT8 *PlatformHobList, IN UINTN PlatformHobSize, IN EFI_PHYSICAL_ADDRESS MmFvBase, IN UINT64 MmFvSize, IN EFI_GUID *MmCoreFileName, IN EFI_PHYSICAL_ADDRESS MmCoreImageAddress, IN UINT64 MmCoreImageSize, IN EFI_PHYSICAL_ADDRESS MmCoreEntryPoint, IN EFI_HOB_MEMORY_ALLOCATION *MmProfileDataHob, IN EFI_MMRAM_HOB_DESCRIPTOR_BLOCK *Block)
 
EFI_HOB_MEMORY_ALLOCATIONBuildMmProfileDataHobInPeiHobList (VOID)
 

Detailed Description

Standalone MM IPL Header file

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

Definition in file StandaloneMmIplPei.h.

Function Documentation

◆ BuildMmProfileDataHobInPeiHobList()

EFI_HOB_MEMORY_ALLOCATION * BuildMmProfileDataHobInPeiHobList ( VOID  )

Build memory allocation HOB in PEI HOB list for MM profile data.

This function is to allocate memory for MM profile data.

Returns
NULL if MM profile data memory allocation HOB build fail.
Pointer of MM profile data memory allocation HOB if build successfully.

Definition at line 319 of file MmFoundationHob.c.

◆ Communicate()

EFI_STATUS EFIAPI Communicate ( IN CONST EFI_PEI_MM_COMMUNICATION_PPI This,
IN OUT VOID *  CommBuffer,
IN OUT UINTN CommSize 
)

Communicates with a registered handler.

This function provides a service to send and receive messages from a registered UEFI service.

Parameters
[in]ThisThe EFI_PEI_MM_COMMUNICATION_PPI instance.
[in,out]CommBufferA pointer to the buffer to convey into MMRAM.
[in,out]CommSizeThe size of the data buffer being passed in.On exit, the size of data being returned. Zero if the handler does not wish to reply with any data.
Return values
EFI_SUCCESSThe message was successfully posted.
EFI_INVALID_PARAMETERThe CommBuffer was NULL.
EFI_NOT_STARTEDThe service is NOT started.

Definition at line 41 of file StandaloneMmIplPei.c.

◆ CreateMmFoundationHobList()

RETURN_STATUS CreateMmFoundationHobList ( IN UINT8 *  FoundationHobList,
IN OUT UINTN FoundationHobSize,
IN UINT8 *  PlatformHobList,
IN UINTN  PlatformHobSize,
IN EFI_PHYSICAL_ADDRESS  MmFvBase,
IN UINT64  MmFvSize,
IN EFI_GUID MmCoreFileName,
IN EFI_PHYSICAL_ADDRESS  MmCoreImageAddress,
IN UINT64  MmCoreImageSize,
IN EFI_PHYSICAL_ADDRESS  MmCoreEntryPoint,
IN EFI_HOB_MEMORY_ALLOCATION MmProfileDataHob,
IN EFI_MMRAM_HOB_DESCRIPTOR_BLOCK Block 
)

Create the MM foundation specific HOB list which StandaloneMm Core needed.

This function build the MM foundation specific HOB list needed by StandaloneMm Core based on the PEI HOB list.

Parameters
[in]FoundationHobListThe foundation HOB list to be used for HOB creation.
[in,out]FoundationHobSizeThe foundation HOB size. On return, the expected/used size.
[in]PlatformHobListPlatform HOB list.
[in]PlatformHobSizePlatform HOB size.
[in]MmFvBaseBase of firmare volume which included MM core dirver.
[in]MmFvSizeSize of firmare volume which included MM core dirver.
[in]MmCoreFileNameFile name of MM core dirver.
[in]MmCoreImageAddressImage address of MM core dirver.
[in]MmCoreImageSizeImage size of MM core dirver.
[in]MmCoreEntryPointEntry pinter of MM core dirver.
[in]MmProfileDataHobPointer to MM profile data HOB.
[in]BlockPointer of MMRAM descriptor block.
Return values
RETURN_BUFFER_TOO_SMALLThe buffer is too small for HOB creation. BufferSize is updated to indicate the expected buffer size. When the input BufferSize is bigger than the expected buffer size, the BufferSize value will be changed the used buffer size.
RETURN_SUCCESSHOB List is created/updated successfully or the input Length is 0.

Create the MM foundation specific HOB list which StandaloneMm Core needed.

This function build the MM foundation specific HOB list needed by StandaloneMm Core based on the PEI HOB list.

Parameters
[in]FoundationHobListThe foundation HOB list to be used for HOB creation.
[in,out]FoundationHobSizeThe foundation HOB size. On return, the expected/used size.
[in]PlatformHobListPlatform HOB list.
[in]PlatformHobSizePlatform HOB size.
[in]MmFvBaseBase of firmare volume which included MM core dirver.
[in]MmFvSizeSize of firmare volume which included MM core dirver.
[in]MmCoreFileNameFile name of MM core dirver.
[in]MmCoreImageAddressImage address of MM core dirver.
[in]MmCoreImageSizeImage size of MM core dirver.
[in]MmCoreEntryPointEntry pinter of MM core dirver.
[in]MmProfileDataHobPointer to Mm profile data HOB.
[in]BlockPointer of MMRAM descriptor block.
Return values
RETURN_BUFFER_TOO_SMALLThe buffer is too small for HOB creation. BufferSize is updated to indicate the expected buffer size. When the input BufferSize is bigger than the expected buffer size, the BufferSize value will be changed the used buffer size.
RETURN_SUCCESSHOB List is created/updated successfully or the input Length is 0.

Definition at line 834 of file MmFoundationHob.c.

◆ EndOfPeiCallback()

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

This is the callback function on end of PEI.

This callback is used for call MmEndOfPeiHandler in standalone MM core.

Parameters
PeiServicesGeneral purpose services available to every PEIM.
NotifyDescriptorThe notification structure this PEIM registered on install.
PpiPointer to the PPI data associated with this function.
Return values
EFI_SUCCESSExit boot services successfully.
OtherExit boot services failed.

Definition at line 616 of file StandaloneMmIplPei.c.

◆ MmIplCreateHob()

VOID * MmIplCreateHob ( IN VOID *  Hob,
IN UINT16  HobType,
IN UINT16  HobLength 
)

Add a new HOB to the HOB List.

Parameters
[in]HobThe pointer of new HOB buffer.
[in]HobTypeType of the new HOB.
[in]HobLengthLength of the new HOB to allocate.
Returns
NULL if there is no space to create a hob.
The address point to the new created hob.

Definition at line 36 of file MmFoundationHob.c.