From 6f785cfcc304c48ec04e542ee429df95e7b51bc5 Mon Sep 17 00:00:00 2001 From: "Yao, Jiewen" Date: Mon, 12 Jan 2015 03:21:00 +0000 Subject: Handle TPM device error and avoid deadloop in BDS. If TPM error happens, set TPM flag to NOT present, so that trusted boot patch is disabled. Also report status code for failure, so that platform may register handler to apply policy like force system reset, or disable TPM permanently. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" Reviewed-by: "Dong, Guo" git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16598 6f19259b-4bc3-4df7-8a09-765794883524 --- SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c') diff --git a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c index 6b6a377b2d..ed53b7e003 100644 --- a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c +++ b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c @@ -15,7 +15,7 @@ TrEEMeasureGptTable() function will receive untrusted GPT partition table, and parse partition data carefully. -Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2013 - 2015, 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 @@ -456,7 +456,7 @@ DxeTpm2MeasureBootHandler ( TreeProtocol, &ProtocolCapability ); - if (EFI_ERROR (Status) || !ProtocolCapability.TrEEPresentFlag) { + if (EFI_ERROR (Status) || (!ProtocolCapability.TrEEPresentFlag)) { // // TPM device doesn't work or activate. // -- cgit v1.2.3