]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/TcgService.h
MdePkg/Ppi: Fix various typos
[mirror_edk2.git] / MdePkg / Include / Protocol / TcgService.h
index 519cfbbfc5a5b9ef5536e944d3fa1492fff573f8..0d4625ba54c80da49582120a1446f0158756a30e 100644 (file)
@@ -1,15 +1,9 @@
 /** @file\r
-  TCG Service Protocol as defined in TCG_EFI_Protocol_1_20_Final\r
+  TCG Service Protocol as defined in TCG_EFI_Protocol_1_22_Final\r
   See http://trustedcomputinggroup.org for the latest specification\r
 \r
-  Copyright (c) 2007 - 2008, Intel Corporation \r
-  All rights reserved. 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) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -19,7 +13,7 @@
 #include <IndustryStandard/UefiTcgPlatform.h>\r
 \r
 #define EFI_TCG_PROTOCOL_GUID  \\r
-  {0xf541796d, 0xa62e, 0x4954, { 0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd } } \r
+  {0xf541796d, 0xa62e, 0x4954, { 0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd } }\r
 \r
 typedef struct _EFI_TCG_PROTOCOL EFI_TCG_PROTOCOL;\r
 \r
@@ -31,41 +25,37 @@ typedef struct {
 } TCG_VERSION;\r
 \r
 typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY {\r
-  UINT8          Size;                /// Size of this structure\r
-  TCG_VERSION    StructureVersion;    \r
+  UINT8          Size;                /// Size of this structure.\r
+  TCG_VERSION    StructureVersion;\r
   TCG_VERSION    ProtocolSpecVersion;\r
-  UINT8          HashAlgorithmBitmap; /// Hash algorithms  \r
-                                      /// this protocol is capable of : 01=SHA-1\r
-  BOOLEAN        TPMPresentFlag;      /// 00h = TPM not present\r
-  BOOLEAN        TPMDeactivatedFlag;  /// 01h = TPM currently deactivated\r
+  UINT8          HashAlgorithmBitmap; /// Hash algorithms .\r
+                                      /// This protocol is capable of : 01=SHA-1.\r
+  BOOLEAN        TPMPresentFlag;      /// 00h = TPM not present.\r
+  BOOLEAN        TPMDeactivatedFlag;  /// 01h = TPM currently deactivated.\r
 } TCG_EFI_BOOT_SERVICE_CAPABILITY;\r
 \r
 typedef UINT32   TCG_ALGORITHM_ID;\r
 \r
 /**\r
-  This service provides EFI protocol capability information, state information \r
+  This service provides EFI protocol capability information, state information\r
   about the TPM, and Event Log state information.\r
 \r
   @param  This                   Indicates the calling context\r
-  @param  ProtocolCapability     The callee allocates memory for a TCG_BOOT_SERVICE_CAPABILITY \r
-                                 structure and fills in the fields with the EFI protocol \r
+  @param  ProtocolCapability     The callee allocates memory for a TCG_BOOT_SERVICE_CAPABILITY\r
+                                 structure and fills in the fields with the EFI protocol\r
                                  capability information and the current TPM state information.\r
-  @param  TCGFeatureFlags        This is a pointer to the feature flags. No feature \r
-                                 flags are currently defined so this parameter \r
-                                 MUST be set to 0. However, in the future, \r
-                                 feature flags may be defined that, for example, \r
+  @param  TCGFeatureFlags        This is a pointer to the feature flags. No feature\r
+                                 flags are currently defined so this parameter\r
+                                 MUST be set to 0. However, in the future,\r
+                                 feature flags may be defined that, for example,\r
                                  enable hash algorithm agility.\r
   @param  EventLogLocation       This is a pointer to the address of the event log in memory.\r
-  @param  EventLogLastEntry      If the Event Log contains more than one entry, \r
-                                 this is a pointer to the address of the start of \r
-                                 the last entry in the event log in memory. \r
-\r
-  @retval EFI_SUCCESS            Operation completed successfully.\r
-  @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
-  @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.\r
-  @retval EFI_BUFFER_TOO_SMALL   The receive buffer is too small.\r
-  @retval EFI_NOT_FOUND          The component was not running\r
+  @param  EventLogLastEntry      If the Event Log contains more than one entry,\r
+                                 this is a pointer to the address of the start of\r
+                                 the last entry in the event log in memory.\r
 \r
+  @retval EFI_SUCCESS            The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER  ProtocolCapability does not match TCG capability.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -80,20 +70,20 @@ EFI_STATUS
 \r
 /**\r
   This service abstracts the capability to do a hash operation on a data buffer.\r
-  \r
-  @param  This                   Indicates the calling context\r
-  @param  HashData               Pointer to the data buffer to be hashed\r
-  @param  HashDataLen            Length of the data buffer to be hashed\r
-  @param  AlgorithmId            Identification of the Algorithm to use for the hashing operation\r
-  @param  HashedDataLen          Resultant length of the hashed data\r
-  @param  HashedDataResult       Resultant buffer of the hashed data  \r
-  \r
-  @retval EFI_SUCCESS            Operation completed successfully.\r
-  @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
-  @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.\r
-  @retval EFI_BUFFER_TOO_SMALL   The receive buffer is too small.\r
-  @retval EFI_NOT_FOUND          The component was not running\r
 \r
+  @param  This                   Indicates the calling context.\r
+  @param  HashData               The pointer to the data buffer to be hashed.\r
+  @param  HashDataLen            The length of the data buffer to be hashed.\r
+  @param  AlgorithmId            Identification of the Algorithm to use for the hashing operation.\r
+  @param  HashedDataLen          Resultant length of the hashed data.\r
+  @param  HashedDataResult       Resultant buffer of the hashed data.\r
+\r
+  @retval EFI_SUCCESS            The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER  HashDataLen is NULL.\r
+  @retval EFI_INVALID_PARAMETER  HashDataLenResult is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES   Cannot allocate buffer of size *HashedDataLen.\r
+  @retval EFI_UNSUPPORTED        AlgorithmId not supported.\r
+  @retval EFI_BUFFER_TOO_SMALL   *HashedDataLen < sizeof (TCG_DIGEST).\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -110,20 +100,17 @@ EFI_STATUS
   This service abstracts the capability to add an entry to the Event Log.\r
 \r
   @param  This                   Indicates the calling context\r
-  @param  TCGLogData             Pointer to the start of the data buffer containing \r
-                                 the TCG_PCR_EVENT data structure. All fields in \r
+  @param  TCGLogData             The pointer to the start of the data buffer containing\r
+                                 the TCG_PCR_EVENT data structure. All fields in\r
                                  this structure are properly filled by the caller.\r
-  @param  EventNumber            The event number of the event just logged\r
-  @param  Flags                  Indicate additional flags. Only one flag has been \r
-                                 defined at this time, which is 0x01 and means the \r
-                                 extend operation should not be performed. All \r
-                                 other bits are reserved. \r
\r
-  @retval EFI_SUCCESS            Operation completed successfully.\r
-  @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
-  @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.\r
-  @retval EFI_BUFFER_TOO_SMALL   The receive buffer is too small.\r
-  @retval EFI_NOT_FOUND          The component was not running\r
+  @param  EventNumber            The event number of the event just logged.\r
+  @param  Flags                  Indicates additional flags. Only one flag has been\r
+                                 defined at this time, which is 0x01 and means the\r
+                                 extend operation should not be performed. All\r
+                                 other bits are reserved.\r
+\r
+  @retval EFI_SUCCESS            The operation completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES   Insufficient memory in the event log to complete this action.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -137,17 +124,16 @@ EFI_STATUS
 /**\r
   This service is a proxy for commands to the TPM.\r
 \r
-  @param  This                        Indicates the calling context\r
-  @param  TpmInputParameterBlockSize  Size of the TPM input parameter block\r
-  @param  TpmInputParameterBlock      Pointer to the TPM input parameter block\r
-  @param  TpmOutputParameterBlockSize Size of the TPM output parameter block\r
-  @param  TpmOutputParameterBlock     Pointer to the TPM output parameter block\r
+  @param  This                        Indicates the calling context.\r
+  @param  TpmInputParameterBlockSize  Size of the TPM input parameter block.\r
+  @param  TpmInputParameterBlock      The pointer to the TPM input parameter block.\r
+  @param  TpmOutputParameterBlockSize Size of the TPM output parameter block.\r
+  @param  TpmOutputParameterBlock     The pointer to the TPM output parameter block.\r
 \r
-  @retval EFI_SUCCESS            Operation completed successfully.\r
-  @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
-  @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.\r
-  @retval EFI_BUFFER_TOO_SMALL   The receive buffer is too small.\r
-  @retval EFI_NOT_FOUND          The component was not running\r
+  @retval EFI_SUCCESS            The operation completed successfully.\r
+  @retval EFI_INVALID_PARAMETER  Invalid ordinal.\r
+  @retval EFI_UNSUPPORTED        Current Task Priority Level  >= EFI_TPL_CALLBACK.\r
+  @retval EFI_TIMEOUT            The TIS timed-out.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -163,24 +149,23 @@ EFI_STATUS
   This service abstracts the capability to do a hash operation on a data buffer, extend a specific TPM PCR with the hash result, and add an entry to the Event Log\r
 \r
   @param  This                   Indicates the calling context\r
-  @param  HashData               Physical address of the start of the data buffer \r
+  @param  HashData               The physical address of the start of the data buffer\r
                                  to be hashed, extended, and logged.\r
   @param  HashDataLen            The length, in bytes, of the buffer referenced by HashData\r
   @param  AlgorithmId            Identification of the Algorithm to use for the hashing operation\r
-  @param  TCGLogData             The physical address of the start of the data \r
+  @param  TCGLogData             The physical address of the start of the data\r
                                  buffer containing the TCG_PCR_EVENT data structure.\r
   @param  EventNumber            The event number of the event just logged.\r
-  @param  EventLogLastEntry      Physical address of the first byte of the entry \r
-                                 just placed in the Event Log. If the Event Log was \r
-                                 empty when this function was called then this physical \r
-                                 address will be the same as the physical address of \r
+  @param  EventLogLastEntry      The physical address of the first byte of the entry\r
+                                 just placed in the Event Log. If the Event Log was\r
+                                 empty when this function was called then this physical\r
+                                 address will be the same as the physical address of\r
                                  the start of the Event Log.\r
 \r
-  @retval EFI_SUCCESS            Operation completed successfully.\r
+  @retval EFI_SUCCESS            The operation completed successfully.\r
+  @retval EFI_UNSUPPORTED        AlgorithmId != TPM_ALG_SHA.\r
+  @retval EFI_UNSUPPORTED        Current TPL >= EFI_TPL_CALLBACK.\r
   @retval EFI_DEVICE_ERROR       The command was unsuccessful.\r
-  @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.\r
-  @retval EFI_BUFFER_TOO_SMALL   The receive buffer is too small.\r
-  @retval EFI_NOT_FOUND          The component was not running\r
 **/\r
 typedef\r
 EFI_STATUS\r