10#ifndef __TCG2_PROTOCOL_H__
11#define __TCG2_PROTOCOL_H__
16#define EFI_TCG2_PROTOCOL_GUID \
17 {0x607f766c, 0x7455, 0x42be, { 0x93, 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f }}
26typedef UINT32 EFI_TCG2_EVENT_LOG_BITMAP;
27typedef UINT32 EFI_TCG2_EVENT_LOG_FORMAT;
28typedef UINT32 EFI_TCG2_EVENT_ALGORITHM_BITMAP;
30#define EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 0x00000001
31#define EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 0x00000002
54 EFI_TCG2_EVENT_ALGORITHM_BITMAP HashAlgorithmBitmap;
58 EFI_TCG2_EVENT_LOG_BITMAP SupportedEventLogs;
62 BOOLEAN TPMPresentFlag;
66 UINT16 MaxCommandSize;
70 UINT16 MaxResponseSize;
75 UINT32 ManufacturerID;
81 UINT32 NumberOfPCRBanks;
87 EFI_TCG2_EVENT_ALGORITHM_BITMAP ActivePcrBanks;
90#define EFI_TCG2_BOOT_HASH_ALG_SHA1 0x00000001
91#define EFI_TCG2_BOOT_HASH_ALG_SHA256 0x00000002
92#define EFI_TCG2_BOOT_HASH_ALG_SHA384 0x00000004
93#define EFI_TCG2_BOOT_HASH_ALG_SHA512 0x00000008
94#define EFI_TCG2_BOOT_HASH_ALG_SM3_256 0x00000010
99#define EFI_TCG2_EXTEND_ONLY 0x0000000000000001
103#define PE_COFF_IMAGE 0x0000000000000010
105#define MAX_PCR_INDEX 23
109#define EFI_TCG2_EVENT_HEADER_VERSION 1
119 UINT16 HeaderVersion;
123 TCG_PCRINDEX PCRIndex;
127 TCG_EVENTTYPE EventType;
188 IN EFI_TCG2_EVENT_LOG_FORMAT EventLogFormat,
191 OUT BOOLEAN *EventLogTruncated
219 IN UINT64 DataToHashLen,
241 IN UINT32 InputParameterBlockSize,
242 IN UINT8 *InputParameterBlock,
243 IN UINT32 OutputParameterBlockSize,
244 IN UINT8 *OutputParameterBlock
260 OUT UINT32 *ActivePcrBanks
276 IN UINT32 ActivePcrBanks
293 OUT UINT32 *OperationPresent,
307extern EFI_GUID gEfiTcg2ProtocolGuid;
313#define EFI_TCG2_FINAL_EVENTS_TABLE_GUID \
314 {0x1e2ed096, 0x30e2, 0x4254, { 0xbd, 0x89, 0x86, 0x3b, 0xbe, 0xf8, 0x23, 0x25 }}
316extern EFI_GUID gEfiTcg2FinalEventsTableGuid;
326 UINT64 NumberOfEvents;
333#define EFI_TCG2_FINAL_EVENTS_TABLE_VERSION 1
EFI_STATUS(EFIAPI * EFI_TCG2_GET_EVENT_LOG)(IN EFI_TCG2_PROTOCOL *This, IN EFI_TCG2_EVENT_LOG_FORMAT EventLogFormat, OUT EFI_PHYSICAL_ADDRESS *EventLogLocation, OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry, OUT BOOLEAN *EventLogTruncated)
EFI_STATUS(EFIAPI * EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS)(IN EFI_TCG2_PROTOCOL *This, OUT UINT32 *OperationPresent, OUT UINT32 *Response)
EFI_STATUS(EFIAPI * EFI_TCG2_GET_CAPABILITY)(IN EFI_TCG2_PROTOCOL *This, IN OUT EFI_TCG2_BOOT_SERVICE_CAPABILITY *ProtocolCapability)
EFI_STATUS(EFIAPI * EFI_TCG2_SET_ACTIVE_PCR_BANKS)(IN EFI_TCG2_PROTOCOL *This, IN UINT32 ActivePcrBanks)
EFI_STATUS(EFIAPI * EFI_TCG2_SUBMIT_COMMAND)(IN EFI_TCG2_PROTOCOL *This, IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, IN UINT32 OutputParameterBlockSize, IN UINT8 *OutputParameterBlock)
EFI_STATUS(EFIAPI * EFI_TCG2_HASH_LOG_EXTEND_EVENT)(IN EFI_TCG2_PROTOCOL *This, IN UINT64 Flags, IN EFI_PHYSICAL_ADDRESS DataToHash, IN UINT64 DataToHashLen, IN EFI_TCG2_EVENT *EfiTcgEvent)
EFI_STATUS(EFIAPI * EFI_TCG2_GET_ACTIVE_PCR_BANKS)(IN EFI_TCG2_PROTOCOL *This, OUT UINT32 *ActivePcrBanks)
UINT64 EFI_PHYSICAL_ADDRESS