TianoCore EDK2 master
|
#include "StandaloneMmIplPei.h"
Go to the source code of this file.
Variables | |
EFI_PEI_MM_COMMUNICATION_PPI | mMmCommunicationPpi = { Communicate } |
EFI_PEI_PPI_DESCRIPTOR | mPpiList |
EFI_PEI_NOTIFY_DESCRIPTOR | mNotifyList |
MM IPL that load the MM Core into MMRAM at PEI stage
Copyright (c) 2024, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file StandaloneMmIplPei.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.
VOID * CreatMmHobList | ( | OUT UINTN * | HobSize, |
IN MM_COMM_BUFFER * | MmCommBuffer, | ||
IN EFI_PHYSICAL_ADDRESS | MmFvBase, | ||
IN UINT64 | MmFvSize, | ||
IN EFI_GUID * | MmCoreFileName, | ||
IN PHYSICAL_ADDRESS | MmCoreImageAddress, | ||
IN UINT64 | MmCoreImageSize, | ||
IN PHYSICAL_ADDRESS | MmCoreEntryPoint, | ||
IN EFI_MMRAM_HOB_DESCRIPTOR_BLOCK * | Block | ||
) |
Create HOB list for Standalone MM core.
[out] | HobSize | HOB size of fundation and platform HOB list. |
[in] | MmCommBuffer | Pointer of MM communication buffer. |
[in] | MmFvBase | Base of MM FV which included MM core driver. |
[in] | MmFvSize | Size of MM FV which included MM core driver. |
[in] | MmCoreFileName | File GUID of MM core driver. |
[in] | MmCoreImageAddress | Address of MM core image. |
[in] | MmCoreImageSize | Size of MM core image. |
[in] | MmCoreEntryPoint | Entry point of MM core driver. |
[in] | Block | Pointer of MMRAM descriptor block. |
HobList | If fundation and platform HOBs not existed, it is pointed to PEI HOB List. If existed, it is pointed to fundation and platform HOB list. |
Definition at line 229 of file StandaloneMmIplPei.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.
EFI_STATUS ExecuteMmCoreFromMmram | ( | IN MM_COMM_BUFFER * | MmCommBuffer | ) |
Load the MM Core image into MMRAM and executes the MM Core from MMRAM.
[in] | MmCommBuffer | MM communicate buffer |
Definition at line 493 of file StandaloneMmIplPei.c.
VOID FindLargestMmramRange | ( | IN OUT UINTN * | LagestMmramRangeIndex, |
IN EFI_MMRAM_HOB_DESCRIPTOR_BLOCK * | CurrentBlock | ||
) |
Find largest unallocated MMRAM in current MMRAM descriptor block
[in,out] | LagestMmramRangeIndex | Lagest mmram range index. |
[in] | CurrentBlock | Current MMRAM descriptor block. |
Definition at line 356 of file StandaloneMmIplPei.c.
EFI_STATUS LocateMmCoreFv | ( | OUT EFI_PHYSICAL_ADDRESS * | MmFvBase, |
OUT UINTN * | MmFvSize, | ||
OUT EFI_GUID * | MmCoreFileName, | ||
OUT VOID ** | MmCoreImageAddress | ||
) |
Search all the available firmware volumes for MM Core driver.
MmFvBase | Base address of FV which included MM Core driver. |
MmFvSize | Size of FV which included MM Core driver. |
MmCoreFileName | GUID of MM Core. |
MmCoreImageAddress | MM Core image address. |
EFI_SUCCESS | The specified FFS section was returned. |
EFI_NOT_FOUND | The specified FFS section could not be found. |
Definition at line 143 of file StandaloneMmIplPei.c.
EFI_PHYSICAL_ADDRESS MmIplAllocateMmramPage | ( | IN UINTN | Pages, |
OUT EFI_MMRAM_HOB_DESCRIPTOR_BLOCK ** | NewBlock | ||
) |
Allocate available MMRAM for MM core image.
[in] | Pages | Page count of MM core image. |
[out] | NewBlock | Pointer of new mmram block HOB. |
Definition at line 409 of file StandaloneMmIplPei.c.
MM_COMM_BUFFER * MmIplBuildCommBufferHob | ( | VOID | ) |
Build communication buffer HOB.
Definition at line 687 of file StandaloneMmIplPei.c.
EFI_STATUS MmIplDispatchMmDrivers | ( | VOID | ) |
Dispatch StandaloneMm drivers in MM.
StandaloneMm core will exit when MmEntryPoint was registered in CPU StandaloneMm driver, and issue a software SMI by communicate mode to dispatch other StandaloneMm drivers.
EFI_SUCCESS | Dispatch StandaloneMm drivers successfully. |
Other | Dispatch StandaloneMm drivers failed. |
Definition at line 655 of file StandaloneMmIplPei.c.
EFI_STATUS EFIAPI StandaloneMmIplPeiEntry | ( | IN EFI_PEI_FILE_HANDLE | FileHandle, |
IN CONST EFI_PEI_SERVICES ** | PeiServices | ||
) |
The Entry Point for MM IPL at PEI stage.
Load MM Core into MMRAM.
FileHandle | Handle of the file being invoked. |
PeiServices | Describes the list of possible PEI Services. |
EFI_SUCCESS | The entry point is executed successfully. |
Other | Some error occurred when executing this entry point. |
Definition at line 753 of file StandaloneMmIplPei.c.
EFI_PEI_MM_COMMUNICATION_PPI mMmCommunicationPpi = { Communicate } |
Definition at line 11 of file StandaloneMmIplPei.c.
EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList |
Definition at line 19 of file StandaloneMmIplPei.c.
EFI_PEI_PPI_DESCRIPTOR mPpiList |
Definition at line 13 of file StandaloneMmIplPei.c.