]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c
Fix TPM may be locked twice issue in normal boot.
[mirror_edk2.git] / 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