]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtPkg/TPM: Add a NULL implementation of TpmPlatformHierarchyLib
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Fri, 24 Sep 2021 11:42:19 +0000 (07:42 -0400)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 5 Oct 2021 09:54:11 +0000 (09:54 +0000)
Add a NULL implementation of the library class TpmPlatformHierarchyLib.

Link: https://bugzilla.tianocore.org/show_bug.cgi?id=3510
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.c [new file with mode: 0644]
SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf [new file with mode: 0644]
SecurityPkg/SecurityPkg.dsc

diff --git a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.c b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.c
new file mode 100644 (file)
index 0000000..dfc8863
--- /dev/null
@@ -0,0 +1,22 @@
+/** @file\r
+    Null TPM Platform Hierarchy configuration library.\r
+\r
+    This library provides stub functions for customizing the TPM's Platform Hierarchy.\r
+\r
+    Copyright (c) 2021, IBM Corporation.\r
+    SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include <Uefi.h>\r
+\r
+/**\r
+  A NULL implementation of ConfigureTpmPlatformHierarchy.\r
+**/\r
+VOID\r
+EFIAPI\r
+ConfigureTpmPlatformHierarchy (\r
+  )\r
+{\r
+  /* do nothing */\r
+}\r
diff --git a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf
new file mode 100644 (file)
index 0000000..1b1e9ad
--- /dev/null
@@ -0,0 +1,31 @@
+### @file\r
+#   NULL TPM Platform Hierarchy configuration library.\r
+#\r
+#   This library provides functions for customizing the TPM's Platform Hierarchy\r
+#   Authorization Value (platformAuth) and Platform Hierarchy Authorization\r
+#   Policy (platformPolicy) can be defined through this function.\r
+#\r
+# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) Microsoft Corporation.<BR>\r
+#\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+###\r
+\r
+[Defines]\r
+  INF_VERSION                    = 1.27\r
+  BASE_NAME                      = BasePlatform\r
+  FILE_GUID                      = 8947A3F2-BfB4-45EF-968D-5C40C1CE6A58\r
+  MODULE_TYPE                    = BASE\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = TpmPlatformHierarchyLib|PEIM DXE_DRIVER\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  SecurityPkg/SecurityPkg.dec\r
+\r
+[Sources]\r
+  PeiDxeTpmPlatformHierarchyLib.c\r
index f1f678c492b343651c63c075a1d601385d1c2b06..37318c64c59f51895bf55fb4cf87018e614909c7 100644 (file)
   SecurityPkg/Library/HashLibTpm2/HashLibTpm2.inf\r
 \r
   SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.inf\r
+  SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLibNull/PeiDxeTpmPlatformHierarchyLib.inf\r
 \r
   #\r
   # TCG Storage.\r