]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: CpuIo2Smm: Move CpuIo2Smm driver to consume gMmst
authorKun Qin <kun.q@outlook.com>
Fri, 18 Dec 2020 03:12:50 +0000 (19:12 -0800)
committerKun Qin <kun.q@outlook.com>
Mon, 1 Feb 2021 18:03:36 +0000 (10:03 -0800)
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>
UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h
UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
UefiCpuPkg/UefiCpuPkg.dsc

index b840d3e10cae3455f327bc5619abad434bcceb93..c0a2baecee03267a8cf518c5e0d73ab0d2abe5f2 100644 (file)
@@ -390,12 +390,12 @@ SmmCpuIo2Initialize (
   //\r
   // Copy the SMM CPU I/O Protocol instance into the System Management System Table\r
   //\r
-  CopyMem (&gSmst->SmmIo, &mSmmCpuIo2, sizeof (mSmmCpuIo2));\r
+  CopyMem (&gMmst->MmIo, &mSmmCpuIo2, sizeof (mSmmCpuIo2));\r
 \r
   //\r
-  // Install the SMM CPU I/O Protocol into the SMM protocol database\r
+  // Install the SMM CPU I/O Protocol into the MM protocol database\r
   //\r
-  Status = gSmst->SmmInstallProtocolInterface (\r
+  Status = gMmst->MmInstallProtocolInterface (\r
                     &mHandle,\r
                     &gEfiSmmCpuIo2ProtocolGuid,\r
                     EFI_NATIVE_INTERFACE,\r
index 4c133b58c9f4d54b6c9a8b5380d4d2593a037305..c80261945f7145bb9a39e1635cacd5ae7932c19f 100644 (file)
@@ -16,7 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/BaseLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/IoLib.h>\r
-#include <Library/SmmServicesTableLib.h>\r
+#include <Library/MmServicesTableLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 \r
 #define MAX_IO_PORT_ADDRESS   0xFFFF\r
index bc78fa4e42d2d4392e59d19cf203cc000124826d..b743a5e0e3166618f8a471a9f2740c527f2921c6 100644 (file)
@@ -34,7 +34,7 @@
   BaseLib\r
   DebugLib\r
   IoLib\r
-  SmmServicesTableLib\r
+  MmServicesTableLib\r
   BaseMemoryLib\r
 \r
 [Protocols]\r
index 5834eafaa200f6ce8a499a57aa9b2c0d2fbadcb2..c3c27afff88e1bdae761aac0803b9b88f0c801ea 100644 (file)
@@ -91,6 +91,7 @@
 \r
 [LibraryClasses.common.DXE_SMM_DRIVER]\r
   SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf\r
+  MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib.inf\r
   MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf\r
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf\r
   CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf\r