]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/TcgService.h
Fix doxygen issue:
[mirror_edk2.git] / MdePkg / Include / Protocol / TcgService.h
index ddc4eaf286d48c265cef560cf4d08b3161bc727c..99df2ae8794f98fc32d441cb4bea7255b8e9217e 100644 (file)
@@ -1,25 +1,17 @@
-/*++\r
-\r
-Copyright (c) 2006, 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
-\r
-Module Name:\r
-\r
-  TcgService.h\r
-\r
-Abstract:\r
-\r
+/** @file\r
   TCG Service Protocol as defined in TCG_EFI_Protocol_1_20_Final\r
-\r
   See http://trustedcomputinggroup.org for the latest specification\r
 \r
---*/\r
+  Copyright (c) 2007, 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
+\r
+**/\r
 \r
 #ifndef _TCG_SERVICE_PROTOCOL_H_\r
 #define _TCG_SERVICE_PROTOCOL_H_\r
@@ -60,9 +52,34 @@ typedef UINT32   TCG_ALGORITHM_ID;
 //\r
 #pragma pack (pop)\r
 \r
+/**\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
+                                 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
+                                 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
+\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_TCG_STATUS_CHECK) (\r
+(EFIAPI *EFI_TCG_STATUS_CHECK)(\r
   IN      EFI_TCG_PROTOCOL          *This,\r
   OUT     TCG_EFI_BOOT_SERVICE_CAPABILITY\r
                                     *ProtocolCapability,\r
@@ -71,9 +88,26 @@ EFI_STATUS
   OUT     EFI_PHYSICAL_ADDRESS      *EventLogLastEntry\r
   );\r
 \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
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_TCG_HASH_ALL) (\r
+(EFIAPI *EFI_TCG_HASH_ALL)(\r
   IN      EFI_TCG_PROTOCOL          *This,\r
   IN      UINT8                     *HashData,\r
   IN      UINT64                    HashDataLen,\r
@@ -82,18 +116,52 @@ EFI_STATUS
   IN OUT  UINT8                     **HashedDataResult\r
   );\r
 \r
+/**\r
+  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
+                                 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
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_TCG_LOG_EVENT) (\r
+(EFIAPI *EFI_TCG_LOG_EVENT)(\r
   IN      EFI_TCG_PROTOCOL          *This,\r
   IN      TCG_PCR_EVENT             *TCGLogData,\r
   IN OUT  UINT32                    *EventNumber,\r
   IN      UINT32                    Flags\r
   );\r
 \r
+/**\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
+\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
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_TCG_PASS_THROUGH_TO_TPM) (\r
+(EFIAPI *EFI_TCG_PASS_THROUGH_TO_TPM)(\r
   IN      EFI_TCG_PROTOCOL          *This,\r
   IN      UINT32                    TpmInputParamterBlockSize,\r
   IN      UINT8                     *TpmInputParamterBlock,\r
@@ -101,11 +169,34 @@ EFI_STATUS
   IN      UINT8                     *TpmOutputParameterBlock\r
   );\r
 \r
+/**\r
+  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
+                                 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
+                                 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
+                                 the start of the Event Log.\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
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_TCG_HASH_LOG_EXTEND_EVENT) (\r
+(EFIAPI *EFI_TCG_HASH_LOG_EXTEND_EVENT)(\r
   IN      EFI_TCG_PROTOCOL          *This,\r
-  IN      UINT8                     *HashData,\r
+  IN      EFI_PHYSICAL_ADDRESS      HashData,\r
   IN      UINT64                    HashDataLen,\r
   IN      TCG_ALGORITHM_ID          AlgorithmId,\r
   IN OUT  TCG_PCR_EVENT             *TCGLogData,\r
@@ -113,6 +204,21 @@ EFI_STATUS
      OUT  EFI_PHYSICAL_ADDRESS      *EventLogLastEntry\r
   );\r
 \r
+/**\r
+  The EFI_TCG Protocol abstracts TCG activity.\r
+\r
+  @param  StatusCheck        This service provides information on the TPM.\r
+  @param  HashAll            This service abstracts the capability to do a hash \r
+                             operation on a data buffer.\r
+  @param  LogEvent           This service abstracts the capability to add \r
+                             an entry to the Event Log.\r
+  @param  PassThroughToTPM   This service provides a pass-through capability \r
+                             from the caller to the system's TPM.\r
+  @param  HashLogExtendEvent This service abstracts the capability to do a hash \r
+                             operation on a data buffer, extend a specific TPM PCR \r
+                             with the hash result, and add an entry to the Event Log. \r
+\r
+**/\r
 typedef struct _EFI_TCG_PROTOCOL {\r
   EFI_TCG_STATUS_CHECK              StatusCheck;\r
   EFI_TCG_HASH_ALL                  HashAll;\r