summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/CpuIo2Smm
diff options
context:
space:
mode:
authorKun Qin <kun.q@outlook.com>2020-12-17 19:12:50 -0800
committerKun Qin <kun.q@outlook.com>2021-02-01 10:03:36 -0800
commite414a3e936e79a4eff860dcd079e04a04e0e70b9 (patch)
tree993a25392336ea43e75d786c93609b2a0546e2c8 /UefiCpuPkg/CpuIo2Smm
parent7a56650e2e5661bf296c7a27865351900045610a (diff)
downloadedk2-e414a3e936e79a4eff860dcd079e04a04e0e70b9.tar.gz
edk2-e414a3e936e79a4eff860dcd079e04a04e0e70b9.tar.bz2
edk2-e414a3e936e79a4eff860dcd079e04a04e0e70b9.zip
UefiCpuPkg: CpuIo2Smm: Move CpuIo2Smm driver to consume gMmst
This change replaced gSmst with gMmst to support broader compatibility under MM environment for CpuIo2Smm driver. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Signed-off-by: Kun Qin <kun.q@outlook.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg/CpuIo2Smm')
-rw-r--r--UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c6
-rw-r--r--UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h2
-rw-r--r--UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf2
3 files changed, 5 insertions, 5 deletions
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
index b840d3e10c..c0a2baecee 100644
--- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
+++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
@@ -390,12 +390,12 @@ SmmCpuIo2Initialize (
//
// Copy the SMM CPU I/O Protocol instance into the System Management System Table
//
- CopyMem (&gSmst->SmmIo, &mSmmCpuIo2, sizeof (mSmmCpuIo2));
+ CopyMem (&gMmst->MmIo, &mSmmCpuIo2, sizeof (mSmmCpuIo2));
//
- // Install the SMM CPU I/O Protocol into the SMM protocol database
+ // Install the SMM CPU I/O Protocol into the MM protocol database
//
- Status = gSmst->SmmInstallProtocolInterface (
+ Status = gMmst->MmInstallProtocolInterface (
&mHandle,
&gEfiSmmCpuIo2ProtocolGuid,
EFI_NATIVE_INTERFACE,
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h
index 4c133b58c9..c80261945f 100644
--- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h
+++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h
@@ -16,7 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/IoLib.h>
-#include <Library/SmmServicesTableLib.h>
+#include <Library/MmServicesTableLib.h>
#include <Library/BaseMemoryLib.h>
#define MAX_IO_PORT_ADDRESS 0xFFFF
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
index bc78fa4e42..b743a5e0e3 100644
--- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
+++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
@@ -34,7 +34,7 @@
BaseLib
DebugLib
IoLib
- SmmServicesTableLib
+ MmServicesTableLib
BaseMemoryLib
[Protocols]