summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/PiSmmCpuDxeSmm
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2024-06-24 16:43:50 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-08-28 15:25:27 +0000
commit2a15750b79377a2e81deb6c5fb32abf9138a8839 (patch)
tree64627679d60b908f58d321554410fde9be615eaa /UefiCpuPkg/PiSmmCpuDxeSmm
parentcfaccc89a2bf734fcc20d1d97231bbeb344c0cf7 (diff)
downloadedk2-2a15750b79377a2e81deb6c5fb32abf9138a8839.tar.gz
UefiCpuPkg/PiSmmCpuDxeSmm: Update gSmst to gMmst
This patch update the gSmst to gMmst for SMM and MM common usage. No function impact. 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>
Diffstat (limited to 'UefiCpuPkg/PiSmmCpuDxeSmm')
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c14
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c8
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c18
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h2
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf2
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c8
-rw-r--r--UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c4
7 files changed, 28 insertions, 28 deletions
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
index caad70ac84..4c6f31c16a 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
@@ -41,13 +41,13 @@ RestoreSmmConfigurationInS3 (
//
if (mRestoreSmmConfigurationInS3) {
//
- // Need make sure gSmst is correct because below function may use them.
+ // Need make sure gMmst is correct because below function may use them.
//
- gSmst->SmmStartupThisAp = gSmmCpuPrivate->SmmCoreEntryContext.SmmStartupThisAp;
- gSmst->CurrentlyExecutingCpu = gSmmCpuPrivate->SmmCoreEntryContext.CurrentlyExecutingCpu;
- gSmst->NumberOfCpus = gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus;
- gSmst->CpuSaveStateSize = gSmmCpuPrivate->SmmCoreEntryContext.CpuSaveStateSize;
- gSmst->CpuSaveState = gSmmCpuPrivate->SmmCoreEntryContext.CpuSaveState;
+ gMmst->MmStartupThisAp = gSmmCpuPrivate->SmmCoreEntryContext.SmmStartupThisAp;
+ gMmst->CurrentlyExecutingCpu = gSmmCpuPrivate->SmmCoreEntryContext.CurrentlyExecutingCpu;
+ gMmst->NumberOfCpus = gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus;
+ gMmst->CpuSaveStateSize = gSmmCpuPrivate->SmmCoreEntryContext.CpuSaveStateSize;
+ gMmst->CpuSaveState = gSmmCpuPrivate->SmmCoreEntryContext.CpuSaveState;
//
// Configure SMM Code Access Check feature if available.
@@ -220,7 +220,7 @@ InitSmmS3ResumeState (
ZeroMem (SmmS3ResumeState, sizeof (SMM_S3_RESUME_STATE));
mSmmS3ResumeState = SmmS3ResumeState;
- SmmS3ResumeState->Smst = (EFI_PHYSICAL_ADDRESS)(UINTN)gSmst;
+ SmmS3ResumeState->Smst = (EFI_PHYSICAL_ADDRESS)(UINTN)gMmst;
SmmS3ResumeState->SmmS3ResumeEntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)SmmRestoreCpu;
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c
index c0485b0519..3d1ea99400 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuService.c
@@ -1,7 +1,7 @@
/** @file
Implementation of SMM CPU Services Protocol.
-Copyright (c) 2011 - 2023, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2024, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -98,7 +98,7 @@ SmmSwitchBsp (
}
if ((gSmmCpuPrivate->Operation[ProcessorNumber] != SmmCpuNone) ||
- (gSmst->CurrentlyExecutingCpu == ProcessorNumber))
+ (gMmst->CurrentlyExecutingCpu == ProcessorNumber))
{
return EFI_UNSUPPORTED;
}
@@ -376,7 +376,7 @@ InitializeSmmCpuServices (
{
EFI_STATUS Status;
- Status = gSmst->SmmInstallProtocolInterface (
+ Status = gMmst->MmInstallProtocolInterface (
&Handle,
&gEfiSmmCpuServiceProtocolGuid,
EFI_NATIVE_INTERFACE,
@@ -387,7 +387,7 @@ InitializeSmmCpuServices (
return Status;
}
- Status = gSmst->SmmInstallProtocolInterface (
+ Status = gMmst->MmInstallProtocolInterface (
&Handle,
&gEdkiiSmmCpuRendezvousProtocolGuid,
EFI_NATIVE_INTERFACE,
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
index e7149ff7fd..71ff40b9ff 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
@@ -232,7 +232,7 @@ SmmReadSaveState (
//
// Retrieve pointer to the specified CPU's SMM Save State buffer
//
- if ((CpuIndex >= gSmst->NumberOfCpus) || (Buffer == NULL)) {
+ if ((CpuIndex >= gMmst->NumberOfCpus) || (Buffer == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -304,7 +304,7 @@ SmmWriteSaveState (
//
// Retrieve pointer to the specified CPU's SMM Save State buffer
//
- if ((CpuIndex >= gSmst->NumberOfCpus) || (Buffer == NULL)) {
+ if ((CpuIndex >= gMmst->NumberOfCpus) || (Buffer == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -1289,7 +1289,7 @@ PiCpuSmmEntry (
//
// Install the SMM CPU Protocol into SMM protocol database
//
- Status = gSmst->SmmInstallProtocolInterface (
+ Status = gMmst->MmInstallProtocolInterface (
&mSmmCpuHandle,
&gEfiSmmCpuProtocolGuid,
EFI_NATIVE_INTERFACE,
@@ -1300,7 +1300,7 @@ PiCpuSmmEntry (
//
// Install the SMM Memory Attribute Protocol into SMM protocol database
//
- Status = gSmst->SmmInstallProtocolInterface (
+ Status = gMmst->MmInstallProtocolInterface (
&mSmmCpuHandle,
&gEdkiiSmmMemoryAttributeProtocolGuid,
EFI_NATIVE_INTERFACE,
@@ -1321,7 +1321,7 @@ PiCpuSmmEntry (
//
// Install the SMM Mp Protocol into SMM protocol database
//
- Status = gSmst->SmmInstallProtocolInterface (
+ Status = gMmst->MmInstallProtocolInterface (
&mSmmCpuHandle,
&gEfiMmMpProtocolGuid,
EFI_NATIVE_INTERFACE,
@@ -1346,7 +1346,7 @@ PiCpuSmmEntry (
//
// register SMM Ready To Lock Protocol notification
//
- Status = gSmst->SmmRegisterProtocolNotify (
+ Status = gMmst->MmRegisterProtocolNotify (
&gEfiSmmReadyToLockProtocolGuid,
SmmReadyToLockEventNotify,
&Registration
@@ -1591,7 +1591,7 @@ ConfigSmmCodeAccessCheck (
//
// Enable SMM Code Access Check feature for the APs.
//
- for (Index = 0; Index < gSmst->NumberOfCpus; Index++) {
+ for (Index = 0; Index < gMmst->NumberOfCpus; Index++) {
if (Index != gSmmCpuPrivate->SmmCoreEntryContext.CurrentlyExecutingCpu) {
if (gSmmCpuPrivate->ProcessorInfo[Index].ProcessorId == INVALID_APIC_ID) {
//
@@ -1609,7 +1609,7 @@ ConfigSmmCodeAccessCheck (
//
// Call SmmStartupThisAp() to enable SMM Code Access Check on an AP.
//
- Status = gSmst->SmmStartupThisAp (ConfigSmmCodeAccessCheckOnCurrentProcessor, Index, &Index);
+ Status = gMmst->MmStartupThisAp (ConfigSmmCodeAccessCheckOnCurrentProcessor, Index, &Index);
ASSERT_EFI_ERROR (Status);
//
@@ -1648,7 +1648,7 @@ AllocateCodePages (
return NULL;
}
- Status = gSmst->SmmAllocatePages (AllocateAnyPages, EfiRuntimeServicesCode, Pages, &Memory);
+ Status = gMmst->MmAllocatePages (AllocateAnyPages, EfiRuntimeServicesCode, Pages, &Memory);
if (EFI_ERROR (Status)) {
return NULL;
}
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
index abbdd79f05..9d4775afda 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
@@ -37,7 +37,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/PcdLib.h>
#include <Library/MtrrLib.h>
#include <Library/SmmCpuPlatformHookLib.h>
-#include <Library/SmmServicesTableLib.h>
+#include <Library/MmServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
index 2412f4caeb..886a616a0c 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
@@ -80,7 +80,7 @@
MtrrLib
IoLib
TimerLib
- SmmServicesTableLib
+ MmServicesTableLib
MemoryAllocationLib
DebugAgentLib
HobLib
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
index 6e0c251397..a66dd4ac46 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2016 - 2023, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2016 - 2024, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -774,9 +774,9 @@ SmmGetSystemConfigurationTable (
ASSERT (Table != NULL);
*Table = NULL;
- for (Index = 0; Index < gSmst->NumberOfTableEntries; Index++) {
- if (CompareGuid (TableGuid, &(gSmst->SmmConfigurationTable[Index].VendorGuid))) {
- *Table = gSmst->SmmConfigurationTable[Index].VendorTable;
+ for (Index = 0; Index < gMmst->NumberOfTableEntries; Index++) {
+ if (CompareGuid (TableGuid, &(gMmst->MmConfigurationTable[Index].VendorGuid))) {
+ *Table = gMmst->MmConfigurationTable[Index].VendorTable;
return EFI_SUCCESS;
}
}
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
index 115d477fd0..bdfe05f851 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
@@ -892,7 +892,7 @@ InitSmmProfileInternal (
//
// Start SMM profile when SmmReadyToLock protocol is installed.
//
- Status = gSmst->SmmRegisterProtocolNotify (
+ Status = gMmst->MmRegisterProtocolNotify (
&gEfiSmmReadyToLockProtocolGuid,
InitSmmProfileCallBack,
&Registration
@@ -1374,7 +1374,7 @@ SmmProfilePFHandler (
// Indicate it is not software SMI
//
SmiCommand = 0xFFFFFFFFFFFFFFFFULL;
- for (Index = 0; Index < gSmst->NumberOfCpus; Index++) {
+ for (Index = 0; Index < gMmst->NumberOfCpus; Index++) {
Status = SmmReadSaveState (&mSmmCpu, sizeof (IoInfo), EFI_SMM_SAVE_STATE_REGISTER_IO, Index, &IoInfo);
if (EFI_ERROR (Status)) {
continue;