]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix TPM may be locked twice issue in normal boot.
authorgdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 24 Jan 2013 07:14:28 +0000 (07:14 +0000)
committergdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 24 Jan 2013 07:14:28 +0000 (07:14 +0000)
Signed-off-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14079 6f19259b-4bc3-4df7-8a09-765794883524

SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c

index 44845b0f854dbb4c9dbdbb7afb7d0f2acc7e5820..3414cd2ea42559c11839f4f0d30f0c0e5ebc5ecf 100644 (file)
@@ -8,7 +8,7 @@
 \r
   ExecutePendingTpmRequest() will receive untrusted input and do validation.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, 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
@@ -1010,13 +1010,6 @@ ExecutePendingTpmRequest (
   UINTN                             DataSize;\r
   BOOLEAN                           RequestConfirmed;\r
 \r
-  if (TcgPpData->PPRequest == PHYSICAL_PRESENCE_NO_ACTION) {\r
-    //\r
-    // No operation request\r
-    //\r
-    return;\r
-  }\r
-\r
   if (!HaveValidTpmRequest(TcgPpData, &RequestConfirmed)) {\r
     //\r
     // Invalid operation request.\r
@@ -1165,6 +1158,13 @@ TcgPhysicalPresenceLibProcessRequest (
 \r
   DEBUG ((EFI_D_INFO, "[TPM] Flags=%x, PPRequest=%x\n", TcgPpData.Flags, TcgPpData.PPRequest));\r
 \r
+  if (TcgPpData.PPRequest == PHYSICAL_PRESENCE_NO_ACTION) {\r
+    //\r
+    // No operation request\r
+    //\r
+    return;\r
+  }\r
+\r
   Status = GetTpmCapability (TcgProtocol, &LifetimeLock, &CmdEnable);\r
   if (EFI_ERROR (Status)) {\r
     return ;\r