[edk2-devel] [PATCH v2 3/6] SecurityPkg: Tcg2Smm: Switching from gSmst to gMmst

Yao, Jiewen jiewen.yao at intel.com
Wed Feb 24 01:20:12 UTC 2021


Reviewed-by: Jiewen Yao <Jiewen.yao at intel.com>

> -----Original Message-----
> From: Kun Qin <kun.q at outlook.com>
> Sent: Wednesday, February 10, 2021 9:25 AM
> To: devel at edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao at intel.com>; Wang, Jian J <jian.j.wang at intel.com>;
> Zhang, Qi1 <qi1.zhang at intel.com>; Kumar, Rahul1 <rahul1.kumar at intel.com>
> Subject: [PATCH v2 3/6] SecurityPkg: Tcg2Smm: Switching from gSmst to gMmst
> 
> This change replaced gSmst with gMmst to support broader compatibility
> under MM environment for Tcg2Smm driver.
> 
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Qi Zhang <qi1.zhang at intel.com>
> Cc: Rahul Kumar <rahul1.kumar at intel.com>
> 
> Signed-off-by: Kun Qin <kun.q at outlook.com>
> ---
> 
> Notes:
>     v2:
>     - Newly added in v2.
> 
>  SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c   | 4 ++--
>  SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h   | 2 +-
>  SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> index 91aebb62b8bf..08105c3692ba 100644
> --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
> @@ -870,7 +870,7 @@ InitializeTcgSmm (
>    //
>    // Get the Sw dispatch protocol and register SMI callback functions.
>    //
> -  Status = gSmst->SmmLocateProtocol (&gEfiSmmSwDispatch2ProtocolGuid,
> NULL, (VOID**)&SwDispatch);
> +  Status = gMmst->MmLocateProtocol (&gEfiSmmSwDispatch2ProtocolGuid,
> NULL, (VOID**)&SwDispatch);
>    ASSERT_EFI_ERROR (Status);
>    SwContext.SwSmiInputValue = (UINTN) -1;
>    Status = SwDispatch->Register (SwDispatch, PhysicalPresenceCallback,
> &SwContext, &SwHandle);
> @@ -891,7 +891,7 @@ InitializeTcgSmm (
>    //
>    // Locate SmmVariableProtocol.
>    //
> -  Status = gSmst->SmmLocateProtocol (&gEfiSmmVariableProtocolGuid, NULL,
> (VOID**)&mSmmVariable);
> +  Status = gMmst->MmLocateProtocol (&gEfiSmmVariableProtocolGuid, NULL,
> (VOID**)&mSmmVariable);
>    ASSERT_EFI_ERROR (Status);
> 
>    //
> diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
> b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
> index fd19e7dc0553..d7328c8f2ac9 100644
> --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
> +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.h
> @@ -24,7 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #include <Library/BaseLib.h>
>  #include <Library/BaseMemoryLib.h>
>  #include <Library/DebugLib.h>
> -#include <Library/SmmServicesTableLib.h>
> +#include <Library/MmServicesTableLib.h>
>  #include <Library/UefiDriverEntryPoint.h>
>  #include <Library/UefiBootServicesTableLib.h>
>  #include <Library/DxeServicesLib.h>
> diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
> b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
> index 2ebf2e05f2ea..872ed27cbe71 100644
> --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
> +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.inf
> @@ -50,7 +50,7 @@ [LibraryClasses]
>    BaseLib
>    BaseMemoryLib
>    UefiDriverEntryPoint
> -  SmmServicesTableLib
> +  MmServicesTableLib
>    UefiBootServicesTableLib
>    DebugLib
>    DxeServicesLib
> --
> 2.30.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72123): https://edk2.groups.io/g/devel/message/72123
Mute This Topic: https://groups.io/mt/80522085/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list