From 03ecb5769b20138fbf2aa7f570738bb3b87d60e9 Mon Sep 17 00:00:00 2001 From: gdong1 Date: Thu, 24 Jan 2013 07:14:28 +0000 Subject: [PATCH] Fix TPM may be locked twice issue in normal boot. Signed-off-by: Dong Guo Reviewed-by: Ye Ting Reviewed-by: Yao Jiewen git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14079 6f19259b-4bc3-4df7-8a09-765794883524 --- .../DxeTcgPhysicalPresenceLib.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c index 44845b0f85..3414cd2ea4 100644 --- a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c +++ b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/DxeTcgPhysicalPresenceLib.c @@ -8,7 +8,7 @@ ExecutePendingTpmRequest() will receive untrusted input and do validation. -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1010,13 +1010,6 @@ ExecutePendingTpmRequest ( UINTN DataSize; BOOLEAN RequestConfirmed; - if (TcgPpData->PPRequest == PHYSICAL_PRESENCE_NO_ACTION) { - // - // No operation request - // - return; - } - if (!HaveValidTpmRequest(TcgPpData, &RequestConfirmed)) { // // Invalid operation request. @@ -1165,6 +1158,13 @@ TcgPhysicalPresenceLibProcessRequest ( DEBUG ((EFI_D_INFO, "[TPM] Flags=%x, PPRequest=%x\n", TcgPpData.Flags, TcgPpData.PPRequest)); + if (TcgPpData.PPRequest == PHYSICAL_PRESENCE_NO_ACTION) { + // + // No operation request + // + return; + } + Status = GetTpmCapability (TcgProtocol, &LifetimeLock, &CmdEnable); if (EFI_ERROR (Status)) { return ; -- 2.39.2