]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/TpmCommLib/TisPc.c
SecurityPkg: Fix spelling errors
[mirror_edk2.git] / SecurityPkg / Library / TpmCommLib / TisPc.c
index 3d74a012dfae324a2c9843179dae2a3bad2c6aa3..4a14a2bf819339e43cd4ea0d36676ee74c5e9de1 100644 (file)
@@ -1,14 +1,8 @@
 /** @file\r
   Basic TIS (TPM Interface Specification) functions.\r
 \r
-Copyright (c) 2005 - 2011, 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
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -28,7 +22,7 @@ TisPcPresenceCheck (
   )\r
 {\r
   UINT8                             RegRead;\r
-  \r
+\r
   RegRead = MmioRead8 ((UINTN)&TisReg->Access);\r
   return (BOOLEAN)(RegRead != (UINT8)-1);\r
 }\r
@@ -66,11 +60,11 @@ TisPcWaitRegisterBits (
 }\r
 \r
 /**\r
-  Get BurstCount by reading the burstCount field of a TIS regiger \r
+  Get BurstCount by reading the burstCount field of a TIS regiger\r
   in the time of default TIS_TIMEOUT_D.\r
 \r
   @param[in]  TisReg                Pointer to TIS register.\r
-  @param[out] BurstCount            Pointer to a buffer to store the got BurstConut.\r
+  @param[out] BurstCount            Pointer to a buffer to store the got BurstCount.\r
 \r
   @retval     EFI_SUCCESS           Get BurstCount.\r
   @retval     EFI_INVALID_PARAMETER TisReg is NULL or BurstCount is NULL.\r
@@ -111,7 +105,7 @@ TisPcReadBurstCount (
 }\r
 \r
 /**\r
-  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY \r
+  Set TPM chip to ready state by sending ready command TIS_PC_STS_READY\r
   to Status Register in time.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
@@ -143,8 +137,8 @@ TisPcPrepareCommand (
 }\r
 \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
+  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_A.\r
 \r
   @param[in] TisReg                Pointer to TIS register.\r
 \r
@@ -160,21 +154,24 @@ TisPcRequestUseTpm (
   )\r
 {\r
   EFI_STATUS                        Status;\r
-  \r
+\r
   if (TisReg == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
-  \r
+\r
   if (!TisPcPresenceCheck (TisReg)) {\r
     return EFI_NOT_FOUND;\r
   }\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