TianoCore EDK2 master
|
#include "StandaloneMmCore.h"
Go to the source code of this file.
MM Core Main Entry Point
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
Copyright (c) 2016 - 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file StandaloneMmCore.c.
VOID * InitializeMmHobList | ( | IN VOID * | HobStart, |
IN EFI_MMRAM_DESCRIPTOR * | MmramRanges, | ||
IN UINTN | MmramRangeCount | ||
) |
This function is responsible for validating the input HOB list and initializing a new HOB list in MMRAM based on the input HOB list.
[in] | HobStart | Pointer to the start of the HOB list. |
[in] | MmramRanges | Pointer to the Mmram ranges. |
[in] | MmramRangeCount | Count of Mmram ranges. |
Pointer | to the new location of hob list in MMRAM. |
Definition at line 713 of file StandaloneMmCore.c.
VOID MigrateMemoryAllocationHobs | ( | IN VOID * | HobStart | ) |
Migrate MemoryBaseAddress in memory allocation HOBs with BootServiceData type and non-zero GUID name from Boot Service memory to MMRAM.
[in] | HobStart | Pointer to the start of the HOB list. |
Definition at line 656 of file StandaloneMmCore.c.
EFI_STATUS EFIAPI MmConfigurationMmNotify | ( | IN CONST EFI_GUID * | Protocol, |
IN VOID * | Interface, | ||
IN EFI_HANDLE | Handle | ||
) |
Register the MM Entry Point provided by the MM Core with the MM Configuration protocol.
[in] | Protocol | Pointer to the protocol. |
[in] | Interface | Pointer to the MM Configuration protocol. |
[in] | Handle | Handle. |
EFI_SUCCESS | Success. |
Definition at line 616 of file StandaloneMmCore.c.
VOID MmCoreInstallLoadedImage | ( | VOID | ) |
Install LoadedImage protocol for MM Core.
Definition at line 364 of file StandaloneMmCore.c.
VOID MmCorePrepareCommunicationBuffer | ( | VOID | ) |
Prepare communication buffer for MMI.
Definition at line 443 of file StandaloneMmCore.c.
EFI_STATUS MmDispatcher | ( | VOID | ) |
This is the main Dispatcher for MM and it exits when there are no more drivers to run. Drain the mScheduledQueue and load and start a PE image for each driver. Search the mDiscoveredList to see if any driver can be placed on the mScheduledQueue. If no drivers are placed on the mScheduledQueue exit the function.
EFI_SUCCESS | All of the MM Drivers that could be dispatched have been run and the MM Entry Point has been registered. |
EFI_NOT_READY | The MM Driver that registered the MM Entry Point was just dispatched. |
EFI_NOT_FOUND | There are no MM Drivers available to be dispatched. |
EFI_ALREADY_STARTED | The MM Dispatcher is already running |
Definition at line 379 of file Dispatcher.c.
EFI_STATUS EFIAPI MmEfiNotAvailableYetArg5 | ( | UINTN | Arg1, |
UINTN | Arg2, | ||
UINTN | Arg3, | ||
UINTN | Arg4, | ||
UINTN | Arg5 | ||
) |
Place holder function until all the MM System Table Service are available.
Note: This function is only used by MMRAM invocation. It is never used by DXE invocation.
Arg1 | Undefined |
Arg2 | Undefined |
Arg3 | Undefined |
Arg4 | Undefined |
Arg5 | Undefined |
Definition at line 107 of file StandaloneMmCore.c.
EFI_STATUS EFIAPI MmEndOfDxeHandler | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID *Context | OPTIONAL, | ||
IN OUT VOID *CommBuffer | OPTIONAL, | ||
IN OUT UINTN *CommBufferSize | OPTIONAL | ||
) |
Software MMI handler that is called when the EndOfDxe event is signaled. This function installs the MM EndOfDxe Protocol so MM Drivers are informed that platform code will invoke 3rd part code.
DispatchHandle | The unique handle assigned to this handler by MmiHandlerRegister(). |
Context | Points to an optional handler context which was specified when the handler was registered. |
CommBuffer | A pointer to a collection of data in memory that will be conveyed from a non-MM environment into an MM environment. |
CommBufferSize | The size of the CommBuffer. |
Definition at line 335 of file StandaloneMmCore.c.
EFI_STATUS EFIAPI MmEndOfPeiHandler | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID *Context | OPTIONAL, | ||
IN OUT VOID *CommBuffer | OPTIONAL, | ||
IN OUT UINTN *CommBufferSize | OPTIONAL | ||
) |
Software MMI handler that is called when the EndOfPei event is signaled. This function installs the MM EndOfPei Protocol so MM Drivers are informed that EndOfPei event is signaled.
DispatchHandle | The unique handle assigned to this handler by MmiHandlerRegister(). |
Context | Points to an optional handler context which was specified when the handler was registered. |
CommBuffer | A pointer to a collection of data in memory that will be conveyed from a non-MM environment into an MM environment. |
CommBufferSize | The size of the CommBuffer. |
Definition at line 295 of file StandaloneMmCore.c.
VOID EFIAPI MmEntryPoint | ( | IN CONST EFI_MM_ENTRY_CONTEXT * | MmEntryContext | ) |
The main entry point to MM Foundation.
Note: This function is only used by MMRAM invocation. It is never used by DXE invocation.
MmEntryContext | Processor information and functionality needed by MM Foundation. |
Definition at line 506 of file StandaloneMmCore.c.
EFI_STATUS EFIAPI MmExitBootServiceHandler | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID *Context | OPTIONAL, | ||
IN OUT VOID *CommBuffer | OPTIONAL, | ||
IN OUT UINTN *CommBufferSize | OPTIONAL | ||
) |
Software MMI handler that is called when a ExitBoot Service event is signaled.
DispatchHandle | The unique handle assigned to this handler by MmiHandlerRegister(). |
Context | Points to an optional handler context which was specified when the handler was registered. |
CommBuffer | A pointer to a collection of data in memory that will be conveyed from a non-MM environment into an MM environment. |
CommBufferSize | The size of the CommBuffer. |
Definition at line 136 of file StandaloneMmCore.c.
EFI_STATUS EFIAPI MmReadyToBootHandler | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID *Context | OPTIONAL, | ||
IN OUT VOID *CommBuffer | OPTIONAL, | ||
IN OUT UINTN *CommBufferSize | OPTIONAL | ||
) |
Software MMI handler that is called when a ExitBoot Service event is signaled.
DispatchHandle | The unique handle assigned to this handler by MmiHandlerRegister(). |
Context | Points to an optional handler context which was specified when the handler was registered. |
CommBuffer | A pointer to a collection of data in memory that will be conveyed from a non-MM environment into an MM environment. |
CommBufferSize | The size of the CommBuffer. |
Definition at line 176 of file StandaloneMmCore.c.
EFI_STATUS EFIAPI MmReadyToLockHandler | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID *Context | OPTIONAL, | ||
IN OUT VOID *CommBuffer | OPTIONAL, | ||
IN OUT UINTN *CommBufferSize | OPTIONAL | ||
) |
Software MMI handler that is called when the DxeMmReadyToLock protocol is added or if gEfiEventReadyToBootGuid is signaled. This function unregisters the Software SMIs that are nor required after MMRAM is locked and installs the MM Ready To Lock Protocol so MM Drivers are informed that MMRAM is about to be locked.
DispatchHandle | The unique handle assigned to this handler by MmiHandlerRegister(). |
Context | Points to an optional handler context which was specified when the handler was registered. |
CommBuffer | A pointer to a collection of data in memory that will be conveyed from a non-MM environment into an MM environment. |
CommBufferSize | The size of the CommBuffer. |
Definition at line 220 of file StandaloneMmCore.c.
EFI_STATUS EFIAPI StandaloneMmMain | ( | IN VOID * | HobStart | ) |
The Entry Point for MM Core
Install DXE Protocols and reload MM Core into MMRAM and register MM Core EntryPoint on the MMI vector.
Note: This function is called for both DXE invocation and MMRAM invocation.
HobStart | Pointer to the start of the HOB list. |
EFI_SUCCESS | Success. |
EFI_UNSUPPORTED | Unsupported operation. |
Definition at line 794 of file StandaloneMmCore.c.
EFI_MM_SYSTEM_TABLE gMmCoreMmst |
Definition at line 25 of file StandaloneMmCore.c.
EFI_FIRMWARE_VOLUME_HEADER* mBfv = NULL |
Definition at line 89 of file StandaloneMmCore.c.
VOID* mInternalCommBufferCopy |
Definition at line 88 of file StandaloneMmCore.c.
MM_COMM_BUFFER* mMmCommunicationBuffer |
Definition at line 87 of file StandaloneMmCore.c.
MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] |
Definition at line 76 of file StandaloneMmCore.c.
EFI_HANDLE mMmCpuHandle = NULL |
Definition at line 20 of file StandaloneMmCore.c.
BOOLEAN mMmEntryPointRegistered = FALSE |
Definition at line 86 of file StandaloneMmCore.c.