]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/TcgService.h
According to the latest UEFI 2.3 errata B, the following changes are made:
[mirror_edk2.git] / MdePkg / Include / Protocol / TcgService.h
index 430e4a6a84b1cb8eb3064e3019b2ea7e0a131fbd..3f27b9a3aed4e63538c1f3abe52a82040be5e814 100644 (file)
@@ -2,7 +2,7 @@
   TCG Service Protocol as defined in TCG_EFI_Protocol_1_20_Final\r
   See http://trustedcomputinggroup.org for the latest specification\r
 \r
-  Copyright (c) 2007 - 2008, Intel Corporation \r
+  Copyright (c) 2007 - 2009, 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
 #ifndef _TCG_SERVICE_PROTOCOL_H_\r
 #define _TCG_SERVICE_PROTOCOL_H_\r
 \r
-#include <Uefi/UefiTcgPlatform.h>\r
+#include <IndustryStandard/UefiTcgPlatform.h>\r
 \r
 #define EFI_TCG_PROTOCOL_GUID  \\r
   {0xf541796d, 0xa62e, 0x4954, { 0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd } } \r
 \r
 typedef struct _EFI_TCG_PROTOCOL EFI_TCG_PROTOCOL;\r
 \r
-//\r
-// Set structure alignment to 1-byte\r
-//\r
-#pragma pack (1)\r
-\r
 typedef struct {\r
   UINT8  Major;\r
   UINT8  Minor;\r
@@ -36,21 +31,22 @@ typedef struct {
 } TCG_VERSION;\r
 \r
 typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY {\r
-  UINT8          Size;                // Size of this structure\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
-// Restore original structure alignment\r
-//\r
-#pragma pack ()\r
+///\r
+/// Note:\r
+///   Status codes returned for functions of EFI_TCG_PROTOCOL do not exactly match\r
+///   those defined in the TCG EFI Protocol 1.20 Final Specification.\r
+///\r
 \r
 /**\r
   This service provides EFI protocol capability information, state information \r
@@ -71,11 +67,7 @@ typedef UINT32   TCG_ALGORITHM_ID;
                                  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
+  @retval EFI_INVALID_PARAMETER  ProtocolCapability does not match TCG capability.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -99,11 +91,11 @@ EFI_STATUS
   @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
+  @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
@@ -130,10 +122,7 @@ EFI_STATUS
                                  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
+  @retval EFI_OUT_OF_RESOURCES   Insufficient memory in the event log to complete this action.\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -154,17 +143,16 @@ EFI_STATUS
   @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
+  @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
 (EFIAPI *EFI_TCG_PASS_THROUGH_TO_TPM)(\r
   IN      EFI_TCG_PROTOCOL          *This,\r
-  IN      UINT32                    TpmInputParamterBlockSize,\r
-  IN      UINT8                     *TpmInputParamterBlock,\r
+  IN      UINT32                    TpmInputParameterBlockSize,\r
+  IN      UINT8                     *TpmInputParameterBlock,\r
   IN      UINT32                    TpmOutputParameterBlockSize,\r
   IN      UINT8                     *TpmOutputParameterBlock\r
   );\r
@@ -187,10 +175,9 @@ EFI_STATUS
                                  the start of the Event Log.\r
 \r
   @retval EFI_SUCCESS            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
@@ -204,22 +191,9 @@ EFI_STATUS
      OUT  EFI_PHYSICAL_ADDRESS      *EventLogLastEntry\r
   );\r
 \r
-/**\r
-  @par Protocol Description:\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
+///\r
+/// The EFI_TCG Protocol abstracts TCG activity.\r
+///\r
 struct _EFI_TCG_PROTOCOL {\r
   EFI_TCG_STATUS_CHECK              StatusCheck;\r
   EFI_TCG_HASH_ALL                  HashAll;\r