UefiPkg/PiSmmCpuDxeSmm: Set SmmProfile Variable only for DXE SMM
Some platforms plan to move the Standalone MM CPU driver into the FSP. However, there is no variable service support in FSP. Therefore, the SetVariable logic for the Standalone MM CPU will be removed. With this change, users can dump the SmmProfile data from the Memory Allocation HOB: gMmProfileDataHobGuid. This change does not impact the DXE SMM, which will still retrieve the SmmProfile data from the variable service. Signed-off-by: Yanxin Zhao <yanxin.zhao@intel.com>
This commit is contained in:
parent
4af5849556
commit
e8ce6c5189
|
@ -749,6 +749,7 @@ InitSmmProfileInternal (
|
|||
UINTN MsrDsAreaSizePerCpu;
|
||||
UINT64 SmmProfileSize;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
mPFEntryCount = (UINTN *)AllocateZeroPool (sizeof (UINTN) * mMaxNumberOfCpus);
|
||||
ASSERT (mPFEntryCount != NULL);
|
||||
mLastPFEntryValue = (UINT64 (*)[MAX_PF_ENTRY_COUNT])AllocateZeroPool (
|
||||
|
@ -840,12 +841,14 @@ InitSmmProfileInternal (
|
|||
//
|
||||
// Start SMM profile when SmmReadyToLock protocol is installed.
|
||||
//
|
||||
Status = gMmst->MmRegisterProtocolNotify (
|
||||
&gEfiSmmReadyToLockProtocolGuid,
|
||||
InitSmmProfileCallBack,
|
||||
&Registration
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
if (!mIsStandaloneMm) {
|
||||
Status = gMmst->MmRegisterProtocolNotify (
|
||||
&gEfiSmmReadyToLockProtocolGuid,
|
||||
InitSmmProfileCallBack,
|
||||
&Registration
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue