UefiCpuPkg: Uses gMmst in MmSaveStateLib

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4182

Use gMmst instead of gSmst.
Replace SmmServicesTableLib with MmServicesTableLib.

Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Abner Chang <abner.chang@amd.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
This commit is contained in:
Abdul Lateef Attar
2023-07-12 14:24:21 +08:00
committed by mergify[bot]
parent 39ded59c09
commit 4d1014093f
6 changed files with 10 additions and 10 deletions

View File

@@ -108,7 +108,7 @@ MmSaveStateReadRegister (
UINT8 DataWidth;
// Read CPU State
CpuSaveState = (AMD_SMRAM_SAVE_STATE_MAP *)gSmst->CpuSaveState[CpuIndex];
CpuSaveState = (AMD_SMRAM_SAVE_STATE_MAP *)gMmst->CpuSaveState[CpuIndex];
// Check for special EFI_MM_SAVE_STATE_REGISTER_LMA
if (Register == EFI_MM_SAVE_STATE_REGISTER_LMA) {
@@ -226,7 +226,7 @@ MmSaveStateWriteRegister (
return EFI_NOT_FOUND;
}
CpuSaveState = gSmst->CpuSaveState[CpuIndex];
CpuSaveState = gMmst->CpuSaveState[CpuIndex];
//
// Do not write non-writable SaveState, because it will cause exception.