X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FTcgService.h;h=5502121480dad071a7839d08ede9d27dbeeb5981;hb=0c323d071d8951fe0c8f41fad08939722d436b12;hp=2d67d33fe3bfab5246517e5fc51fb501269c2659;hpb=ac644614683362804223844048c5be1a2adfa6b7;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/TcgService.h b/MdePkg/Include/Protocol/TcgService.h index 2d67d33fe3..5502121480 100644 --- a/MdePkg/Include/Protocol/TcgService.h +++ b/MdePkg/Include/Protocol/TcgService.h @@ -2,7 +2,7 @@ TCG Service Protocol as defined in TCG_EFI_Protocol_1_20_Final See http://trustedcomputinggroup.org for the latest specification - Copyright (c) 2007, Intel Corporation + Copyright (c) 2007 - 2008, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,18 +16,13 @@ #ifndef _TCG_SERVICE_PROTOCOL_H_ #define _TCG_SERVICE_PROTOCOL_H_ -#include +#include #define EFI_TCG_PROTOCOL_GUID \ {0xf541796d, 0xa62e, 0x4954, { 0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd } } typedef struct _EFI_TCG_PROTOCOL EFI_TCG_PROTOCOL; -// -// Set structure alignment to 1-byte -// -#pragma pack (push, 1) - typedef struct { UINT8 Major; UINT8 Minor; @@ -36,22 +31,17 @@ typedef struct { } TCG_VERSION; typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY { - UINT8 Size; // Size of this structure + UINT8 Size; /// Size of this structure TCG_VERSION StructureVersion; TCG_VERSION ProtocolSpecVersion; - UINT8 HashAlgorithmBitmap; // Hash algorithms - // this protocol is capable of : 01=SHA-1 - BOOLEAN TPMPresentFlag; // 00h = TPM not present - BOOLEAN TPMDeactivatedFlag; // 01h = TPM currently deactivated + UINT8 HashAlgorithmBitmap; /// Hash algorithms + /// this protocol is capable of : 01=SHA-1 + BOOLEAN TPMPresentFlag; /// 00h = TPM not present + BOOLEAN TPMDeactivatedFlag; /// 01h = TPM currently deactivated } TCG_EFI_BOOT_SERVICE_CAPABILITY; typedef UINT32 TCG_ALGORITHM_ID; -// -// Restore original structure alignment -// -#pragma pack (pop) - /** This service provides EFI protocol capability information, state information about the TPM, and Event Log state information. @@ -79,7 +69,7 @@ typedef UINT32 TCG_ALGORITHM_ID; **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG_STATUS_CHECK) ( +(EFIAPI *EFI_TCG_STATUS_CHECK)( IN EFI_TCG_PROTOCOL *This, OUT TCG_EFI_BOOT_SERVICE_CAPABILITY *ProtocolCapability, @@ -107,7 +97,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG_HASH_ALL) ( +(EFIAPI *EFI_TCG_HASH_ALL)( IN EFI_TCG_PROTOCOL *This, IN UINT8 *HashData, IN UINT64 HashDataLen, @@ -137,7 +127,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG_LOG_EVENT) ( +(EFIAPI *EFI_TCG_LOG_EVENT)( IN EFI_TCG_PROTOCOL *This, IN TCG_PCR_EVENT *TCGLogData, IN OUT UINT32 *EventNumber, @@ -161,7 +151,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG_PASS_THROUGH_TO_TPM) ( +(EFIAPI *EFI_TCG_PASS_THROUGH_TO_TPM)( IN EFI_TCG_PROTOCOL *This, IN UINT32 TpmInputParamterBlockSize, IN UINT8 *TpmInputParamterBlock, @@ -194,7 +184,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG_HASH_LOG_EXTEND_EVENT) ( +(EFIAPI *EFI_TCG_HASH_LOG_EXTEND_EVENT)( IN EFI_TCG_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS HashData, IN UINT64 HashDataLen, @@ -204,28 +194,16 @@ EFI_STATUS OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry ); -/** - The EFI_TCG Protocol abstracts TCG activity. - - @param StatusCheck This service provides information on the TPM. - @param HashAll This service abstracts the capability to do a hash - operation on a data buffer. - @param LogEvent This service abstracts the capability to add - an entry to the Event Log. - @param PassThroughToTPM This service provides a pass-through capability - from the caller to the system's TPM. - @param HashLogExtendEvent 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. - -**/ -typedef struct _EFI_TCG_PROTOCOL { +/// +/// The EFI_TCG Protocol abstracts TCG activity. +/// +struct _EFI_TCG_PROTOCOL { EFI_TCG_STATUS_CHECK StatusCheck; EFI_TCG_HASH_ALL HashAll; EFI_TCG_LOG_EVENT LogEvent; EFI_TCG_PASS_THROUGH_TO_TPM PassThroughToTpm; EFI_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; -} EFI_TCG_PROTOCOL; +}; extern EFI_GUID gEfiTcgProtocolGuid;