public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: Kun Qin <kun.q@outlook.com>, devel@edk2.groups.io
Cc: Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
	Rahul Kumar <rahul1.kumar@intel.com>
Subject: Re: [PATCH v3 16/18] UefiCpuPkg: CpuIo2Smm: Move CpuIo2Smm driver to consume gMmst
Date: Fri, 15 Jan 2021 08:12:09 +0100	[thread overview]
Message-ID: <f397488e-05cb-5b92-5b44-01a776e425ea@redhat.com> (raw)
In-Reply-To: <MWHPR06MB3102F5136E14AE6C1FFF4C85F3A80@MWHPR06MB3102.namprd06.prod.outlook.com>

On 01/14/21 23:36, Kun Qin wrote:
> 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>
> ---
> 
> Notes:
>     v3:
>     - Break gMmst replacement into separate PR [Laszlo]
>     
>     v2:
>     - Removed "EFIAPI" for internal functions.
> 
>  UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c   | 6 +++---
>  UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.h   | 2 +-
>  UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf | 2 +-
>  UefiCpuPkg/UefiCpuPkg.dsc          | 1 +
>  4 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
> index b840d3e10cae..c0a2baecee03 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 4c133b58c9f4..c80261945f71 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 bc78fa4e42d2..b743a5e0e316 100644
> --- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
> +++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
> @@ -34,7 +34,7 @@ [LibraryClasses]
>    BaseLib
>    DebugLib
>    IoLib
> -  SmmServicesTableLib
> +  MmServicesTableLib
>    BaseMemoryLib
>  
>  [Protocols]
> diff --git a/UefiCpuPkg/UefiCpuPkg.dsc b/UefiCpuPkg/UefiCpuPkg.dsc
> index b2b6d78a71b0..9b56bcaabebe 100644
> --- a/UefiCpuPkg/UefiCpuPkg.dsc
> +++ b/UefiCpuPkg/UefiCpuPkg.dsc
> @@ -89,6 +89,7 @@ [LibraryClasses.common.DXE_DRIVER]
>  
>  [LibraryClasses.common.DXE_SMM_DRIVER]
>    SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf
> +  MmServicesTableLib|MdePkg/Library/MmServicesTableLib/MmServicesTableLib.inf
>    MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf
>    HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
>    CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


  reply	other threads:[~2021-01-15  7:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210114223637.2737-1-kun.q@outlook.com>
2021-01-14 22:36 ` [PATCH v3 06/18] MdeModulePkg: SmmLockBoxSmmLib: Support StandaloneMm for SmmLockBoxLib Kun Qin
2021-01-14 22:36 ` [PATCH v3 07/18] MdeModulePkg: SmmReportStatusCodeLib: ReportStatusCodeLib in StandaloneMm Kun Qin
2021-01-14 22:36 ` [PATCH v3 08/18] MdeModulePkg: StatusCodeHandler: StatusCodeHandler driver " Kun Qin
2021-01-14 22:36 ` [PATCH v3 09/18] MdeModulePkg: FirmwarePerformanceDataTable: Added StandaloneMm support Kun Qin
2021-01-14 22:36 ` [PATCH v3 10/18] MdeModulePkg: ReportStatusCodeRouter: Support StandaloneMm RSC Router Kun Qin
2021-01-14 22:36 ` [PATCH v3 11/18] MdePkg: UefiDevicePathLib: Support UefiDevicePathLib under StandaloneMm Kun Qin
2021-01-14 22:36 ` [PATCH v3 12/18] PcAtChipsetPkg: AcpiTimerLib: Added StandaloneMm instance of AcpiTimerLib Kun Qin
2021-01-14 22:36 ` [PATCH v3 13/18] SecurityPkg: Tcg2PhysicalPresenceLib: Introduce StandaloneMm instance Kun Qin
2021-01-14 22:36 ` [PATCH v3 14/18] SecurityPkg: Tcg2PpVendorLibNull: Added support for MM_STANDALONE type Kun Qin
2021-01-14 22:36 ` [PATCH v3 15/18] SecurityPkg: Tpm2DeviceLibDTpm: Introduce StandaloneMm instance Kun Qin
2021-01-14 22:36 ` [PATCH v3 16/18] UefiCpuPkg: CpuIo2Smm: Move CpuIo2Smm driver to consume gMmst Kun Qin
2021-01-15  7:12   ` Laszlo Ersek [this message]
2021-01-22  4:18     ` [edk2-devel] " Ni, Ray
2021-01-14 22:36 ` [PATCH v3 17/18] UefiCpuPkg: CpuIo2Smm: Support of CpuIo driver under StandaloneMm Kun Qin
2021-01-15  7:16   ` Laszlo Ersek
2021-01-22  4:17   ` [edk2-devel] " Ni, Ray
2021-01-22  4:40     ` Kun Qin
2021-01-22  6:29       ` Ni, Ray
2021-01-22  7:32         ` Kun Qin
2021-01-22 12:32       ` Laszlo Ersek
2021-01-22 18:10         ` Kun Qin
2021-01-14 22:36 ` [PATCH v3 18/18] UefiCpuPkg: SmmCpuExceptionHandlerLib: Added StandaloneMm module support Kun Qin
2021-01-22  3:51   ` Ni, Ray
     [not found] ` <165A3A3578F29D7F.16948@groups.io>
2021-01-21  1:46   ` [edk2-devel] [PATCH v3 12/18] PcAtChipsetPkg: AcpiTimerLib: Added StandaloneMm instance of AcpiTimerLib Kun Qin
2021-01-22  3:50     ` Ni, Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f397488e-05cb-5b92-5b44-01a776e425ea@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox