UefiCpuPkg/PiSmmCpuDxeSmm: Add PiCpuStandaloneMmEntry for MM
This patch adds the PiCpuStandaloneMmEntry for MM, which is the module Entry Point of the CPU StandaloneMm driver. In the Entry Point: 1. Init the mIsStandaloneMm flag 2. Call PiSmmCpuEntryCommon 3. Init SmiCommandPort 4. Install the SMM Configuration Protocol. Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Dun Tan <dun.tan@intel.com> Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com> Cc: Wei6 Xu <wei6.xu@intel.com> Cc: Yuanhao Xie <yuanhao.xie@intel.com>
This commit is contained in:
parent
7b9b4ed57f
commit
14cb36685b
|
@ -135,3 +135,49 @@ GetMpInformationFromMpServices (
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
The module Entry Point of the CPU StandaloneMm driver.
|
||||
|
||||
@param ImageHandle The firmware allocated handle for the EFI image.
|
||||
@param SystemTable A pointer to the MM System Table.
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval Other Some error occurs when executing this entry point.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
PiCpuStandaloneMmEntry (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_MM_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = PiSmmCpuEntryCommon ();
|
||||
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
if (FeaturePcdGet (PcdCpuSmmProfileEnable)) {
|
||||
//
|
||||
// Get Software SMI
|
||||
//
|
||||
GetSmiCommandPort ();
|
||||
}
|
||||
|
||||
//
|
||||
// Install the SMM Configuration Protocol onto a new handle on the handle database.
|
||||
// The entire SMM Configuration Protocol is allocated from SMRAM, so only a pointer
|
||||
// to an SMRAM address will be present in the handle database
|
||||
//
|
||||
Status = gMmst->MmInstallProtocolInterface (
|
||||
&gSmmCpuPrivate->SmmCpuHandle,
|
||||
&gEfiSmmConfigurationProtocolGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
&gSmmCpuPrivate->SmmConfiguration
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue