]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Tpm2DeviceLibDTpm: Introduce StandaloneMm instance
authorKun Qin <kun.q@outlook.com>
Fri, 18 Dec 2020 06:31:21 +0000 (22:31 -0800)
committerKun Qin <kun.q@outlook.com>
Mon, 1 Feb 2021 18:03:35 +0000 (10:03 -0800)
This change added a new instance of Tpm2DeviceLibDTpm to support drivers
of type MM_STANDALONE. It abstracts dynamic Pcd access into separate file
for different instances to avoid dynamic usage for StandaloneMm modules.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Kun Qin <kun.q@outlook.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.c
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.h [new file with mode: 0644]
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmBase.c [new file with mode: 0644]
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandaloneMm.c [new file with mode: 0644]
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandaloneMm.inf [new file with mode: 0644]
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf
SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
SecurityPkg/SecurityPkg.dsc

index 42e1ecbce95a6bf7afc56cfcdb4130435d82111b..238389dbdb1b6df3b622495cd71a6f2b0f2d1e32 100644 (file)
@@ -13,29 +13,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/Tpm2DeviceLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
-/**\r
-  Return PTP interface type.\r
-\r
-  @param[in] Register                Pointer to PTP register.\r
-\r
-  @return PTP interface type.\r
-**/\r
-TPM2_PTP_INTERFACE_TYPE\r
-Tpm2GetPtpInterface (\r
-  IN VOID *Register\r
-  );\r
-\r
-/**\r
-  Return PTP CRB interface IdleByPass state.\r
-\r
-  @param[in] Register                Pointer to PTP register.\r
-\r
-  @return PTP CRB interface IdleByPass state.\r
-**/\r
-UINT8\r
-Tpm2GetIdleByPass (\r
-  IN VOID *Register\r
-  );\r
+#include "Tpm2DeviceLibDTpm.h"\r
 \r
 /**\r
   This service enables the sending of commands to the TPM2.\r
@@ -145,21 +123,5 @@ Tpm2DeviceLibConstructor (
   VOID\r
   )\r
 {\r
-  TPM2_PTP_INTERFACE_TYPE  PtpInterface;\r
-  UINT8                    IdleByPass;\r
-\r
-  //\r
-  // Cache current active TpmInterfaceType only when needed\r
-  //\r
-  if (PcdGet8(PcdActiveTpmInterfaceType) == 0xFF) {\r
-    PtpInterface = Tpm2GetPtpInterface ((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
-    PcdSet8S(PcdActiveTpmInterfaceType, PtpInterface);\r
-  }\r
-\r
-  if (PcdGet8(PcdActiveTpmInterfaceType) == Tpm2PtpInterfaceCrb && PcdGet8(PcdCRBIdleByPass) == 0xFF) {\r
-    IdleByPass = Tpm2GetIdleByPass((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
-    PcdSet8S(PcdCRBIdleByPass, IdleByPass);\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
+  return InternalTpm2DeviceLibDTpmCommonConstructor ();\r
 }\r
diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.h b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.h
new file mode 100644 (file)
index 0000000..9fff989
--- /dev/null
@@ -0,0 +1,67 @@
+/** @file\r
+  This header file includes common internal fuction prototypes.\r
+\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) Microsoft Corporation.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef _TPM2_DEVICE_LIB_DTPM_H_\r
+#define _TPM2_DEVICE_LIB_DTPM_H_\r
+\r
+/**\r
+  Return PTP interface type.\r
+\r
+  @param[in] Register                Pointer to PTP register.\r
+\r
+  @return PTP interface type.\r
+**/\r
+TPM2_PTP_INTERFACE_TYPE\r
+Tpm2GetPtpInterface (\r
+  IN VOID *Register\r
+  );\r
+\r
+/**\r
+  Return PTP CRB interface IdleByPass state.\r
+\r
+  @param[in] Register                Pointer to PTP register.\r
+\r
+  @return PTP CRB interface IdleByPass state.\r
+**/\r
+UINT8\r
+Tpm2GetIdleByPass (\r
+  IN VOID *Register\r
+  );\r
+\r
+/**\r
+  Return cached PTP interface type.\r
+\r
+  @return Cached PTP interface type.\r
+**/\r
+TPM2_PTP_INTERFACE_TYPE\r
+GetCachedPtpInterface (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  Return cached PTP CRB interface IdleByPass state.\r
+\r
+  @return Cached PTP CRB interface IdleByPass state.\r
+**/\r
+UINT8\r
+GetCachedIdleByPass (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  The common function cache current active TpmInterfaceType when needed.\r
+\r
+  @retval EFI_SUCCESS   DTPM2.0 instance is registered, or system does not support register DTPM2.0 instance\r
+**/\r
+EFI_STATUS\r
+InternalTpm2DeviceLibDTpmCommonConstructor (\r
+  VOID\r
+  );\r
+\r
+#endif // _TPM2_DEVICE_LIB_DTPM_H_\r
index 2b627504634ddc94ecb2a2f601879150dacc6400..be3a0053ccce81477e891d558be1de980a6d9451 100644 (file)
@@ -11,6 +11,7 @@
 #  only uses TPM 2.0 DTPM device.\r
 #\r
 # Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) Microsoft Corporation.\r
 # SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 ##\r
@@ -34,6 +35,8 @@
   Tpm2Tis.c\r
   Tpm2Ptp.c\r
   Tpm2DeviceLibDTpm.c\r
+  Tpm2DeviceLibDTpmBase.c\r
+  Tpm2DeviceLibDTpm.h\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmBase.c b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmBase.c
new file mode 100644 (file)
index 0000000..bc35e25
--- /dev/null
@@ -0,0 +1,68 @@
+/** @file\r
+  This file abstract internal interfaces of which implementation differs per library instance.\r
+\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) Microsoft Corporation.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include <Library/Tpm2DeviceLib.h>\r
+#include <Library/PcdLib.h>\r
+\r
+#include "Tpm2DeviceLibDTpm.h"\r
+\r
+/**\r
+  Return cached PTP CRB interface IdleByPass state.\r
+\r
+  @return Cached PTP CRB interface IdleByPass state.\r
+**/\r
+UINT8\r
+GetCachedIdleByPass (\r
+  VOID\r
+  )\r
+{\r
+  return PcdGet8(PcdCRBIdleByPass);\r
+}\r
+\r
+/**\r
+  Return cached PTP interface type.\r
+\r
+  @return Cached PTP interface type.\r
+**/\r
+TPM2_PTP_INTERFACE_TYPE\r
+GetCachedPtpInterface (\r
+  VOID\r
+  )\r
+{\r
+  return PcdGet8(PcdActiveTpmInterfaceType);\r
+}\r
+\r
+/**\r
+  The common function cache current active TpmInterfaceType when needed.\r
+\r
+  @retval EFI_SUCCESS   DTPM2.0 instance is registered, or system does not support register DTPM2.0 instance\r
+**/\r
+EFI_STATUS\r
+InternalTpm2DeviceLibDTpmCommonConstructor (\r
+  VOID\r
+  )\r
+{\r
+  TPM2_PTP_INTERFACE_TYPE  PtpInterface;\r
+  UINT8                    IdleByPass;\r
+\r
+  //\r
+  // Cache current active TpmInterfaceType only when needed\r
+  //\r
+  if (PcdGet8(PcdActiveTpmInterfaceType) == 0xFF) {\r
+    PtpInterface = Tpm2GetPtpInterface ((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
+    PcdSet8S(PcdActiveTpmInterfaceType, PtpInterface);\r
+  }\r
+\r
+  if (PcdGet8(PcdActiveTpmInterfaceType) == Tpm2PtpInterfaceCrb && PcdGet8(PcdCRBIdleByPass) == 0xFF) {\r
+    IdleByPass = Tpm2GetIdleByPass((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
+    PcdSet8S(PcdCRBIdleByPass, IdleByPass);\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandaloneMm.c b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandaloneMm.c
new file mode 100644 (file)
index 0000000..eac866d
--- /dev/null
@@ -0,0 +1,66 @@
+/** @file\r
+  This file abstract internal interfaces of which implementation differs per library instance.\r
+\r
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) Microsoft Corporation.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include <Library/Tpm2DeviceLib.h>\r
+\r
+#include "Tpm2DeviceLibDTpm.h"\r
+\r
+TPM2_PTP_INTERFACE_TYPE  mActiveTpmInterfaceType;\r
+UINT8                    mCRBIdleByPass;\r
+\r
+/**\r
+  Return cached PTP CRB interface IdleByPass state.\r
+\r
+  @return Cached PTP CRB interface IdleByPass state.\r
+**/\r
+UINT8\r
+GetCachedIdleByPass (\r
+  VOID\r
+  )\r
+{\r
+  return mCRBIdleByPass;\r
+}\r
+\r
+/**\r
+  Return cached PTP interface type.\r
+\r
+  @return Cached PTP interface type.\r
+**/\r
+TPM2_PTP_INTERFACE_TYPE\r
+GetCachedPtpInterface (\r
+  VOID\r
+  )\r
+{\r
+  return mActiveTpmInterfaceType;\r
+}\r
+\r
+/**\r
+  The common function cache current active TpmInterfaceType when needed.\r
+\r
+  @retval EFI_SUCCESS   DTPM2.0 instance is registered, or system does not support register DTPM2.0 instance\r
+**/\r
+EFI_STATUS\r
+InternalTpm2DeviceLibDTpmCommonConstructor (\r
+  VOID\r
+  )\r
+{\r
+  mActiveTpmInterfaceType = 0xFF;\r
+  mCRBIdleByPass = 0xFF;\r
+\r
+  //\r
+  // Always cache current active TpmInterfaceType for StandaloneMm implementation\r
+  //\r
+  mActiveTpmInterfaceType = Tpm2GetPtpInterface ((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
+\r
+  if (mActiveTpmInterfaceType == Tpm2PtpInterfaceCrb) {\r
+    mCRBIdleByPass = Tpm2GetIdleByPass((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
+  }\r
+\r
+  return EFI_SUCCESS;\r
+}\r
diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandaloneMm.inf b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandaloneMm.inf
new file mode 100644 (file)
index 0000000..18c08ad
--- /dev/null
@@ -0,0 +1,54 @@
+## @file\r
+#  Provides TPM 2.0 TIS/PTP functions for DTPM\r
+#\r
+#  Spec Compliance Info:\r
+#    "TCG PC Client Platform TPM Profile(PTP) Specification Family 2.0 Level 00 Revision 00.43"\r
+#    "TCG PC Client Specific TPM Interface Specification(TIS) Version 1.3"\r
+#\r
+#  This library implements TIS (TPM Interface Specification) and\r
+#  PTP (Platform TPM Profile) functions which is\r
+#  used for every TPM 2.0 command. Choosing this library means platform uses and\r
+#  only uses TPM 2.0 DTPM device.\r
+#\r
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) Microsoft Corporation.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+##\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = Tpm2DeviceLibDTpmStandaloneMm\r
+  FILE_GUID                      = 9A5DB21A-FF0B-46D0-8672-B4F83FEF1F0E\r
+  MODULE_TYPE                    = BASE\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = Tpm2DeviceLib|MM_STANDALONE\r
+  CONSTRUCTOR                    = Tpm2DeviceLibConstructor\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64\r
+#\r
+\r
+[Sources]\r
+  Tpm2Tis.c\r
+  Tpm2Ptp.c\r
+  Tpm2DeviceLibDTpm.c\r
+  Tpm2DeviceLibDTpmStandaloneMm.c\r
+  Tpm2DeviceLibDTpm.h\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  SecurityPkg/SecurityPkg.dec\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  BaseMemoryLib\r
+  IoLib\r
+  TimerLib\r
+  DebugLib\r
+  PcdLib\r
+\r
+[Pcd]\r
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress            ## CONSUMES\r
index 691eaa40c04537ff631dda37f585cb3bf40c53db..053e597d2ee22e70ac4d5c7593cac66169e3b496 100644 (file)
@@ -16,29 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 #include <Guid/TpmInstance.h>\r
 \r
-/**\r
-  Return PTP interface type.\r
-\r
-  @param[in] Register                Pointer to PTP register.\r
-\r
-  @return PTP interface type.\r
-**/\r
-TPM2_PTP_INTERFACE_TYPE\r
-Tpm2GetPtpInterface (\r
-  IN VOID *Register\r
-  );\r
-\r
-/**\r
-  Return PTP CRB interface IdleByPass state.\r
-\r
-  @param[in] Register                Pointer to PTP register.\r
-\r
-  @return PTP CRB interface IdleByPass state.\r
-**/\r
-UINT8\r
-Tpm2GetIdleByPass (\r
-  IN VOID *Register\r
-  );\r
+#include "Tpm2DeviceLibDTpm.h"\r
 \r
 /**\r
   Dump PTP register information.\r
@@ -102,8 +80,6 @@ Tpm2InstanceLibDTpmConstructor (
   )\r
 {\r
   EFI_STATUS               Status;\r
-  TPM2_PTP_INTERFACE_TYPE  PtpInterface;\r
-  UINT8                    IdleByPass;\r
 \r
   Status = Tpm2RegisterTpm2DeviceLib (&mDTpm2InternalTpm2Device);\r
   if ((Status == EFI_SUCCESS) || (Status == EFI_UNSUPPORTED)) {\r
@@ -111,19 +87,7 @@ Tpm2InstanceLibDTpmConstructor (
     // Unsupported means platform policy does not need this instance enabled.\r
     //\r
     if (Status == EFI_SUCCESS) {\r
-      //\r
-      // Cache current active TpmInterfaceType only when needed\r
-      //\r
-      if (PcdGet8(PcdActiveTpmInterfaceType) == 0xFF) {\r
-        PtpInterface = Tpm2GetPtpInterface ((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
-        PcdSet8S(PcdActiveTpmInterfaceType, PtpInterface);\r
-      }\r
-\r
-      if (PcdGet8(PcdActiveTpmInterfaceType) == Tpm2PtpInterfaceCrb && PcdGet8(PcdCRBIdleByPass) == 0xFF) {\r
-        IdleByPass = Tpm2GetIdleByPass((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
-        PcdSet8S(PcdCRBIdleByPass, IdleByPass);\r
-      }\r
-\r
+      Status = InternalTpm2DeviceLibDTpmCommonConstructor ();\r
       DumpPtpInfo ((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
     }\r
     return EFI_SUCCESS;\r
index 5f267f552ce35087e3356c9474d51daddbf70228..31113d93ee4169979e00a5676146c6f28c171ba9 100644 (file)
@@ -6,6 +6,7 @@
 #  and PTP (Platform TPM Profile) functions.\r
 #\r
 # Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) Microsoft Corporation\r
 # SPDX-License-Identifier: BSD-2-Clause-Patent\r
 #\r
 ##\r
@@ -30,6 +31,8 @@
   Tpm2Tis.c\r
   Tpm2Ptp.c\r
   Tpm2InstanceLibDTpm.c\r
+  Tpm2DeviceLibDTpmBase.c\r
+  Tpm2DeviceLibDTpm.h\r
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
index 2c73385b6ce518ea1b46ae035c3f13e69c1e3ab8..f1f80916834f10a2061014075be517100abd44d7 100644 (file)
@@ -2,6 +2,7 @@
   PTP (Platform TPM Profile) CRB (Command Response Buffer) interface used by dTPM2.0 library.\r
 \r
 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c), Microsoft Corporation.\r
 SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -19,6 +20,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <IndustryStandard/TpmPtp.h>\r
 #include <IndustryStandard/TpmTis.h>\r
 \r
+#include "Tpm2DeviceLibDTpm.h"\r
+\r
 //\r
 // Execution of the command may take from several seconds to minutes for certain\r
 // commands, such as key generation.\r
@@ -174,7 +177,7 @@ PtpCrbTpmCommand (
   // STEP 0:\r
   // if CapCRbIdelByPass == 0, enforce Idle state before sending command\r
   //\r
-  if (PcdGet8(PcdCRBIdleByPass) == 0 && (MmioRead32((UINTN)&CrbReg->CrbControlStatus) & PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE) == 0){\r
+  if (GetCachedIdleByPass () == 0 && (MmioRead32((UINTN)&CrbReg->CrbControlStatus) & PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE) == 0){\r
     Status = PtpCrbWaitRegisterBits (\r
               &CrbReg->CrbControlStatus,\r
               PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE,\r
@@ -330,7 +333,7 @@ GoReady_Exit:
   // Goto Ready State if command is completed successfully and TPM support IdleBypass\r
   // If not supported. flow down to GoIdle\r
   //\r
-  if (PcdGet8(PcdCRBIdleByPass) == 1) {\r
+  if (GetCachedIdleByPass () == 1) {\r
     MmioWrite32((UINTN)&CrbReg->CrbControlRequest, PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY);\r
     return Status;\r
   }\r
@@ -350,7 +353,7 @@ GoIdle_Exit:
   // Only enforce Idle state transition if execution fails when CRBIdleBypass==1\r
   // Leave regular Idle delay at the beginning of next command execution\r
   //\r
-  if (PcdGet8(PcdCRBIdleByPass) == 1){\r
+  if (GetCachedIdleByPass () == 1){\r
     Status = PtpCrbWaitRegisterBits (\r
                &CrbReg->CrbControlStatus,\r
                PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE,\r
@@ -519,7 +522,7 @@ DumpPtpInfo (
   Vid = 0xFFFF;\r
   Did = 0xFFFF;\r
   Rid = 0xFF;\r
-  PtpInterface = PcdGet8(PcdActiveTpmInterfaceType);\r
+  PtpInterface = GetCachedPtpInterface ();\r
   DEBUG ((EFI_D_INFO, "PtpInterface - %x\n", PtpInterface));\r
   switch (PtpInterface) {\r
   case Tpm2PtpInterfaceCrb:\r
@@ -564,7 +567,7 @@ DTpm2SubmitCommand (
 {\r
   TPM2_PTP_INTERFACE_TYPE  PtpInterface;\r
 \r
-  PtpInterface = PcdGet8(PcdActiveTpmInterfaceType);\r
+  PtpInterface = GetCachedPtpInterface ();\r
   switch (PtpInterface) {\r
   case Tpm2PtpInterfaceCrb:\r
     return PtpCrbTpmCommand (\r
@@ -603,7 +606,7 @@ DTpm2RequestUseTpm (
 {\r
   TPM2_PTP_INTERFACE_TYPE  PtpInterface;\r
 \r
-  PtpInterface = PcdGet8(PcdActiveTpmInterfaceType);\r
+  PtpInterface = GetCachedPtpInterface ();\r
   switch (PtpInterface) {\r
   case Tpm2PtpInterfaceCrb:\r
     return PtpCrbRequestUseTpm ((PTP_CRB_REGISTERS_PTR) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
index 7240b2573e4e67ac66c3a8f8799a2dfcce2fcf71..618420a56c3368be61e726499aa9f795df0a57c8 100644 (file)
   SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf\r
   SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf\r
   SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf\r
+  SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpmStandaloneMm.inf\r
   SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf\r
   SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.inf\r
 \r