SecurityPkg: Update servers TCG ACPI Table template to TCG 1.2
authorSamer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Thu, 28 Apr 2016 20:41:28 +0000 (04:41 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Tue, 3 May 2016 02:11:12 +0000 (10:11 +0800)
Update the TCG Spec in the the EFI_TCG_SERVER_ACPI_TABLE from TCG 1.0 to
TCG 1.2

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Signed-off-by: Derek Lin <derek.lin2@hpe.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
SecurityPkg/Tcg/TcgDxe/TcgDxe.c

index 690f356..0d7e32a 100644 (file)
@@ -9,6 +9,7 @@ buffer overflow, integer overflow.
 TcgDxePassThroughToTpm() will receive untrusted input and do basic validation.\r
 \r
 Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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
@@ -102,8 +103,8 @@ EFI_TCG_SERVER_ACPI_TABLE           mTcgServerAcpiTemplate = {
   0,                          // Reserved\r
   0,                          // Log Area Max Length\r
   (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1), // Log Area Start Address\r
-  0x0100,                     // TCG Specification revision 1.0\r
-  2,                          // Device Flags\r
+  0x0120,                     // TCG Specification revision 1.2\r
+  0,                          // Device Flags\r
   0,                          // Interrupt Flags\r
   0,                          // GPE\r
   {0},                        // Reserved 3 bytes\r
@@ -353,9 +354,9 @@ TcgDxeHashAll (
       }\r
       *HashedDataLen = sizeof (TPM_DIGEST);\r
 \r
-         if (*HashedDataResult == NULL) {\r
-               *HashedDataResult = AllocatePool ((UINTN) *HashedDataLen);\r
-         \r
+      if (*HashedDataResult == NULL) {\r
+        *HashedDataResult = AllocatePool ((UINTN) *HashedDataLen);\r
+      } \r
 \r
       return TpmCommHashAll (\r
                HashData,\r