TianoCore EDK2 master
|
#include <StandaloneMm.h>
#include <Guid/MmCommBuffer.h>
#include <Guid/MmramMemoryReserve.h>
#include <Library/HobLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PeiServicesLib.h>
#include <Library/MmUnblockMemoryLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PeCoffLib.h>
#include <Library/CacheMaintenanceLib.h>
#include <Library/PeiServicesTablePointerLib.h>
#include <Ppi/MmControl.h>
#include <Ppi/MmCommunication.h>
#include <Protocol/MmCommunication.h>
#include <Library/MmPlatformHobProducerLib.h>
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_ALLOCATION * | BuildMmProfileDataHobInPeiHobList (VOID) |
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.
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.
Definition at line 319 of file MmFoundationHob.c.
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.
[in] | This | The EFI_PEI_MM_COMMUNICATION_PPI instance. |
[in,out] | CommBuffer | A pointer to the buffer to convey into MMRAM. |
[in,out] | CommSize | The 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. |
EFI_SUCCESS | The message was successfully posted. |
EFI_INVALID_PARAMETER | The CommBuffer was NULL. |
EFI_NOT_STARTED | The service is NOT started. |
Definition at line 41 of file StandaloneMmIplPei.c.
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.
[in] | FoundationHobList | The foundation HOB list to be used for HOB creation. |
[in,out] | FoundationHobSize | The foundation HOB size. On return, the expected/used size. |
[in] | PlatformHobList | Platform HOB list. |
[in] | PlatformHobSize | Platform HOB size. |
[in] | MmFvBase | Base of firmare volume which included MM core dirver. |
[in] | MmFvSize | Size of firmare volume which included MM core dirver. |
[in] | MmCoreFileName | File name of MM core dirver. |
[in] | MmCoreImageAddress | Image address of MM core dirver. |
[in] | MmCoreImageSize | Image size of MM core dirver. |
[in] | MmCoreEntryPoint | Entry pinter of MM core dirver. |
[in] | MmProfileDataHob | Pointer to MM profile data HOB. |
[in] | Block | Pointer of MMRAM descriptor block. |
RETURN_BUFFER_TOO_SMALL | The 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_SUCCESS | HOB 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.
[in] | FoundationHobList | The foundation HOB list to be used for HOB creation. |
[in,out] | FoundationHobSize | The foundation HOB size. On return, the expected/used size. |
[in] | PlatformHobList | Platform HOB list. |
[in] | PlatformHobSize | Platform HOB size. |
[in] | MmFvBase | Base of firmare volume which included MM core dirver. |
[in] | MmFvSize | Size of firmare volume which included MM core dirver. |
[in] | MmCoreFileName | File name of MM core dirver. |
[in] | MmCoreImageAddress | Image address of MM core dirver. |
[in] | MmCoreImageSize | Image size of MM core dirver. |
[in] | MmCoreEntryPoint | Entry pinter of MM core dirver. |
[in] | MmProfileDataHob | Pointer to Mm profile data HOB. |
[in] | Block | Pointer of MMRAM descriptor block. |
RETURN_BUFFER_TOO_SMALL | The 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_SUCCESS | HOB List is created/updated successfully or the input Length is 0. |
Definition at line 834 of file MmFoundationHob.c.
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.
PeiServices | General purpose services available to every PEIM. |
NotifyDescriptor | The notification structure this PEIM registered on install. |
Ppi | Pointer to the PPI data associated with this function. |
EFI_SUCCESS | Exit boot services successfully. |
Other | Exit boot services failed. |
Definition at line 616 of file StandaloneMmIplPei.c.
Add a new HOB to the HOB List.
[in] | Hob | The pointer of new HOB buffer. |
[in] | HobType | Type of the new HOB. |
[in] | HobLength | Length of the new HOB to allocate. |
Definition at line 36 of file MmFoundationHob.c.