2. MM Foundation Entry Point¶
2.1. EFI_MM_ENTRY_POINT¶
Summary
This function is the main entry point to the MM Foundation.
Prototype
typedef
VOID
(EFIAPI \*EFI_MM_ENTRY_POINT) (
IN CONST EFI_MM_ENTRY_CONTEXT *\*MmEntryContext*
);
Parameters
- MmEntryContext
Processor information and functionality needed by MM Foundation.
Description
This function is the entry point to the MM Foundation. The processor MM entry code will call this function with the processor information and functionality necessary for MM.
Related Definitions
typedef struct \_EFI_MM_ENTRY_CONTEXT {
EFI_MM_STARTUP_THIS_AP *MmStartupThisAp;*
UINTN *CurrentlyExecutingCpu* ;
UINTN *NumberOfCpus* ;
UINTN *\*CpuSaveStateSize* ;
VOID *\**CpuSaveState;*
} EFI_MM_ENTRY_CONTEXT;
- MmStartupThisAp
Initiate a procedure on an application processor while in SM. See the MmStartupThisAp() function description.
- CurrentlyExecutingCpu
A number between zero and the NumberOfCpus field. This field designates which processor is executing the MM Foundation.
- NumberOfCpus
The number of current operational processors in the platform. This is a 1 based counter. This does not indicate the number of processors that entered MM.
- CpuSaveStateSize
Points to an array, where each element describes the number of bytes in the corresponding save state specified by CpuSaveState . There are always NumberOfCpus entries in the array.
- CpuSaveState
Points to an array, where each element is a pointer to a CPU save state. The corresponding element in CpuSaveStateSize specifies the number of bytes in the save state area. There are always NumberOfCpus entries in the array.
2.2. MM_FOUNDATION_ENTRY_POINT¶
Summary
This function is the image entry point of a standalone MM Foundation.
Prototype
typedef
VOID
(EFIAPI \*MM_FOUNDATION_ENTRY_POINT) (
IN CONST VOID \* *HobStart*
);
Parameters
- HobStart
A pointer to the HOB list.
Description
This function is the image entry point of a standalone MM Foundation. Standalone MM IPL passes* HobStart to standalone MM Foundation. HOB list that describes the system state at the hand-off to the MM Foundation. At a minimum, this system state must include the following:
PHIT HOB
CPU HOB
Description of MMRAM
Description of one or more firmware volumes
MM Foundation can use MMRAM hob to build heap base upon MMRAM hob information. MM Foundation can use FV hob to dispatch standalone MM driver.