summaryrefslogtreecommitdiff
path: root/SecurityPkg
diff options
context:
space:
mode:
authorczhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-16 02:58:08 +0000
committerczhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-16 02:58:08 +0000
commitf941becdd8e47543227315fe1f2622eb8a106b71 (patch)
tree5eeecf1e0c293780ca5a34bcd7fdc650f1afa2ac /SecurityPkg
parent89be2b037f11cc64bd14fd5db41dc6e4a2171cdc (diff)
Change TPM ACCESS_X.activeLocality test timeout to TIMEOUT_A
Signed-off-by : chao zhang<chao.b.zhang@intel.com> Reviewed-by : dong guo <guo.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13849 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg')
-rw-r--r--SecurityPkg/Include/Library/TpmCommLib.h3
-rw-r--r--SecurityPkg/Library/TpmCommLib/TisPc.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/SecurityPkg/Include/Library/TpmCommLib.h b/SecurityPkg/Include/Library/TpmCommLib.h
index 175dd8d9b..9bca341bb 100644
--- a/SecurityPkg/Include/Library/TpmCommLib.h
+++ b/SecurityPkg/Include/Library/TpmCommLib.h
@@ -2,7 +2,7 @@
Ihis library is only intended to be used by TPM modules.
It provides basic TPM Interface Specification (TIS) and Command functions.
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
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
@@ -185,6 +185,7 @@ typedef TIS_PC_REGISTERS *TIS_PC_REGISTERS_PTR;
//
// Default TimeOut value
//
+#define TIS_TIMEOUT_A 750 * 1000 // 750ms
#define TIS_TIMEOUT_B 2000 * 1000 // 2s
#define TIS_TIMEOUT_C 750 * 1000 // 750ms
#define TIS_TIMEOUT_D 750 * 1000 // 750ms
diff --git a/SecurityPkg/Library/TpmCommLib/TisPc.c b/SecurityPkg/Library/TpmCommLib/TisPc.c
index 3d74a012d..c157d41b7 100644
--- a/SecurityPkg/Library/TpmCommLib/TisPc.c
+++ b/SecurityPkg/Library/TpmCommLib/TisPc.c
@@ -1,7 +1,7 @@
/** @file
Basic TIS (TPM Interface Specification) functions.
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
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
@@ -144,7 +144,7 @@ TisPcPrepareCommand (
/**
Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE
- to ACCESS Register in the time of default TIS_TIMEOUT_D.
+ to ACCESS Register in the time of default TIS_TIMEOUT_A.
@param[in] TisReg Pointer to TIS register.
@@ -170,11 +170,14 @@ TisPcRequestUseTpm (
}
MmioWrite8((UINTN)&TisReg->Access, TIS_PC_ACC_RQUUSE);
+ //
+ // No locality set before, ACCESS_X.activeLocality MUST be valid within TIMEOUT_A
+ //
Status = TisPcWaitRegisterBits (
&TisReg->Access,
(UINT8)(TIS_PC_ACC_ACTIVE |TIS_PC_VALID),
0,
- TIS_TIMEOUT_D
+ TIS_TIMEOUT_A
);
return Status;
}