]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/TpmCommLib/TisPc.c
Change TPM ACCESS_X.activeLocality test timeout to TIMEOUT_A
[mirror_edk2.git] / SecurityPkg / Library / TpmCommLib / TisPc.c
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