]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Change TPM ACCESS_X.activeLocality test timeout to TIMEOUT_A
authorczhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 16 Oct 2012 02:58:08 +0000 (02:58 +0000)
committerczhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 16 Oct 2012 02:58:08 +0000 (02:58 +0000)
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

SecurityPkg/Include/Library/TpmCommLib.h
SecurityPkg/Library/TpmCommLib/TisPc.c

index 175dd8d9b6f6202e75d9e788769c856e07ac0feb..9bca341bb569a3d7d1ff4fd8779fe450a3adb0ff 100644 (file)
@@ -2,7 +2,7 @@
   Ihis library is only intended to be used by TPM modules.\r
   It provides basic TPM Interface Specification (TIS) and Command functions.\r
 \r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -185,6 +185,7 @@ typedef TIS_PC_REGISTERS  *TIS_PC_REGISTERS_PTR;
 //\r
 // Default TimeOut value\r
 //\r
+#define TIS_TIMEOUT_A               750 * 1000   // 750ms\r
 #define TIS_TIMEOUT_B               2000 * 1000  // 2s\r
 #define TIS_TIMEOUT_C               750 * 1000   // 750ms\r
 #define TIS_TIMEOUT_D               750 * 1000   // 750ms\r
index 3d74a012dfae324a2c9843179dae2a3bad2c6aa3..c157d41b72fedf72553ebcff70b6d8bf0409b5f5 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Basic TIS (TPM Interface Specification) functions.\r
 \r
-Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, 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
@@ -144,7 +144,7 @@ TisPcPrepareCommand (
 \r
 /**\r
   Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE \r
-  to ACCESS Register in the time of default TIS_TIMEOUT_D.\r
+  to ACCESS Register in the time of default TIS_TIMEOUT_A.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
 \r
@@ -170,11 +170,14 @@ TisPcRequestUseTpm (
   }\r
 \r
   MmioWrite8((UINTN)&TisReg->Access, TIS_PC_ACC_RQUUSE);\r
+  //\r
+  // No locality set before, ACCESS_X.activeLocality MUST be valid within TIMEOUT_A\r
+  //\r
   Status = TisPcWaitRegisterBits (\r
              &TisReg->Access,\r
              (UINT8)(TIS_PC_ACC_ACTIVE |TIS_PC_VALID),\r
              0,\r
-             TIS_TIMEOUT_D\r
+             TIS_TIMEOUT_A\r
              );\r
   return Status;\r
 }\r