]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c
SecurityPkg: Add TPM PTP support in TPM2 device lib.
[mirror_edk2.git] / SecurityPkg / Library / Tpm2DeviceLibDTpm / Tpm2InstanceLibDTpm.c
index 6a6a0423730c69f0b7e4f0fe53151c929f60e3b7..a50d266b8e8a8bea88a4b27e7a8dc82a3fb937df 100644 (file)
@@ -3,7 +3,7 @@
   It can be registered to Tpm2 Device router, to be active TPM2 engine,\r
   based on platform setting.\r
 \r
-Copyright (c) 2013, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -21,6 +21,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <Guid/TpmInstance.h>\r
 \r
+/**\r
+  Dump PTP register information.\r
+\r
+  @param[in] Register                Pointer to PTP register.\r
+**/\r
+VOID\r
+DumpPtpInfo (\r
+  IN VOID *Register\r
+  );\r
+\r
 /**\r
   This service enables the sending of commands to the TPM2.\r
 \r
@@ -79,6 +89,9 @@ Tpm2InstanceLibDTpmConstructor (
     //\r
     // Unsupported means platform policy does not need this instance enabled.\r
     //\r
+    if (Status == EFI_SUCCESS) {\r
+      DumpPtpInfo ((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));\r
+    }\r
     return EFI_SUCCESS;\r
   }\r
   return Status;\r