3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 TCG Service Protocol as defined in TCG_EFI_Protocol_1_20_Final
20 See http://trustedcomputinggroup.org for the latest specification
24 #ifndef _TCG_SERVICE_PROTOCOL_H_
25 #define _TCG_SERVICE_PROTOCOL_H_
29 #define EFI_TCG_PROTOCOL_GUID \
30 {0xf541796d, 0xa62e, 0x4954, 0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd}
32 #define TSS_EVENT_DATA_MAX_SIZE 256
34 EFI_FORWARD_DECLARATION (EFI_TCG_PROTOCOL
);
37 // Set structure alignment to 1-byte
39 #pragma pack (push, 1)
48 typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY
{
49 UINT8 Size
; // Size of this structure
50 TCG_VERSION StructureVersion
;
51 TCG_VERSION ProtocolSpecVersion
;
52 UINT8 HashAlgorithmBitmap
; // Hash algorithms
53 // this protocol is capable of : 01=SHA-1
54 BOOLEAN TPMPresentFlag
; // 00h = TPM not present
55 BOOLEAN TPMDeactivatedFlag
; // 01h = TPM currently deactivated
56 } TCG_EFI_BOOT_SERVICE_CAPABILITY
;
58 typedef UINT32 TCG_ALGORITHM_ID
;
61 // Restore original structure alignment
67 (EFIAPI
*EFI_TCG_STATUS_CHECK
) (
68 IN EFI_TCG_PROTOCOL
*This
,
69 OUT TCG_EFI_BOOT_SERVICE_CAPABILITY
71 OUT UINT32
*TCGFeatureFlags
,
72 OUT EFI_PHYSICAL_ADDRESS
*EventLogLocation
,
73 OUT EFI_PHYSICAL_ADDRESS
*EventLogLastEntry
78 (EFIAPI
*EFI_TCG_HASH_ALL
) (
79 IN EFI_TCG_PROTOCOL
*This
,
81 IN UINT64 HashDataLen
,
82 IN TCG_ALGORITHM_ID AlgorithmId
,
83 IN OUT UINT64
*HashedDataLen
,
84 IN OUT UINT8
**HashedDataResult
89 (EFIAPI
*EFI_TCG_LOG_EVENT
) (
90 IN EFI_TCG_PROTOCOL
*This
,
91 IN TCG_PCR_EVENT
*TCGLogData
,
92 IN OUT UINT32
*EventNumber
,
98 (EFIAPI
*EFI_TCG_PASS_THROUGH_TO_TPM
) (
99 IN EFI_TCG_PROTOCOL
*This
,
100 IN UINT32 TpmInputParamterBlockSize
,
101 IN UINT8
*TpmInputParamterBlock
,
102 IN UINT32 TpmOutputParameterBlockSize
,
103 IN UINT8
*TpmOutputParameterBlock
108 (EFIAPI
*EFI_TCG_HASH_LOG_EXTEND_EVENT
) (
109 IN EFI_TCG_PROTOCOL
*This
,
111 IN UINT64 HashDataLen
,
112 IN TCG_ALGORITHM_ID AlgorithmId
,
113 IN OUT TCG_PCR_EVENT
*TCGLogData
,
114 IN OUT UINT32
*EventNumber
,
115 OUT EFI_PHYSICAL_ADDRESS
*EventLogLastEntry
118 typedef struct _EFI_TCG_PROTOCOL
{
119 EFI_TCG_STATUS_CHECK StatusCheck
;
120 EFI_TCG_HASH_ALL HashAll
;
121 EFI_TCG_LOG_EVENT LogEvent
;
122 EFI_TCG_PASS_THROUGH_TO_TPM PassThroughToTpm
;
123 EFI_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent
;
126 extern EFI_GUID gEfiTcgProtocolGuid
;