XenevaOS
Loading...
Searching...
No Matches
TrEEProtocol.h
Go to the documentation of this file.
1
15#ifndef __TREE_H__
16#define __TREE_H__
17
20
21#define EFI_TREE_PROTOCOL_GUID \
22 {0x607f766c, 0x7455, 0x42be, 0x93, 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f}
23
25
30
33
34#define TREE_EVENT_LOG_FORMAT_TCG_1_2 0x00000001
35
37 //
38 // Allocated size of the structure passed in
39 //
41 //
42 // Version of the TREE_BOOT_SERVICE_CAPABILITY structure itself.
43 // For this version of the protocol, the Major version shall be set to 1
44 // and the Minor version shall be set to 0.
45 //
47 //
48 // Version of the TrEE protocol.
49 // For this version of the protocol, the Major version shall be set to 1
50 // and the Minor version shall be set to 0.
51 //
53 //
54 // Supported hash algorithms
55 //
57 //
58 // Bitmap of supported event log formats
59 //
61 //
62 // False = TrEE not present
63 //
65 //
66 // Max size (in bytes) of a command that can be sent to the TrEE
67 //
69 //
70 // Max size (in bytes) of a response that can be provided by the TrEE
71 //
73 //
74 // 4-byte Vendor ID (see Trusted Computing Group, "TCG Vendor ID Registry,"
75 // Version 1.0, Revision 0.1, August 31, 2007, "TPM Capabilities Vendor ID" section)
76 //
79
81
82#define TREE_BOOT_HASH_ALG_SHA1 0x00000001
83#define TREE_BOOT_HASH_ALG_SHA256 0x00000002
84#define TREE_BOOT_HASH_ALG_SHA384 0x00000004
85#define TREE_BOOT_HASH_ALG_SHA512 0x00000008
86
87//
88// This bit is shall be set when an event shall be extended but not logged.
89//
90#define TREE_EXTEND_ONLY 0x0000000000000001
91//
92// This bit shall be set when the intent is to measure a PE/COFF image.
93//
94#define PE_COFF_IMAGE 0x0000000000000010
95
98
99#define MAX_PCR_INDEX 23
100#define TREE_EVENT_HEADER_VERSION 1
101
102#pragma pack(1)
103
104typedef struct {
105 //
106 // Size of the event header itself (sizeof(TrEE_EVENT_HEADER)).
107 //
109 //
110 // Header version. For this version of this specification, the value shall be 1.
111 //
113 //
114 // Index of the PCR that shall be extended (0 - 23).
115 //
117 //
118 // Type of the event that shall be extended (and optionally logged).
119 //
122
123typedef struct {
124 //
125 // Total size of the event including the Size component, the header and the Event data.
126 //
129 UINT8 Event[1];
130} TrEE_EVENT;
131
132#pragma pack()
133
153typedef
156 IN EFI_TREE_PROTOCOL *This,
157 IN OUT TREE_BOOT_SERVICE_CAPABILITY *ProtocolCapability
158 );
159
177typedef
180 IN EFI_TREE_PROTOCOL *This,
181 IN TREE_EVENT_LOG_FORMAT EventLogFormat,
182 OUT EFI_PHYSICAL_ADDRESS *EventLogLocation,
183 OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry,
184 OUT BOOLEAN *EventLogTruncated
185 );
186
206typedef
209 IN EFI_TREE_PROTOCOL *This,
211 IN EFI_PHYSICAL_ADDRESS DataToHash,
212 IN UINT64 DataToHashLen,
213 IN TrEE_EVENT *Event
214 );
215
230typedef
233 IN EFI_TREE_PROTOCOL *This,
234 IN UINT32 InputParameterBlockSize,
235 IN UINT8 *InputParameterBlock,
236 IN UINT32 OutputParameterBlockSize,
237 IN UINT8 *OutputParameterBlock
238 );
239
246
248
249#endif
#define EFIAPI
Definition ProcessorBind.h:172
unsigned int UINT32
Definition ProcessorBind.h:102
#define IN
Definition Base.h:347
#define OUT
Definition Base.h:352
UINT32 TREE_EVENT_LOG_BITMAP
Definition TrEEProtocol.h:31
UINT32 TREE_EVENT_LOG_FORMAT
Definition TrEEProtocol.h:32
TREE_BOOT_SERVICE_CAPABILITY_1_0 TREE_BOOT_SERVICE_CAPABILITY
Definition TrEEProtocol.h:80
UINT32 TrEE_PCRINDEX
Definition TrEEProtocol.h:96
struct _TREE_BOOT_SERVICE_CAPABILITY TREE_BOOT_SERVICE_CAPABILITY_1_0
EFI_STATUS(EFIAPI * EFI_TREE_HASH_LOG_EXTEND_EVENT)(IN EFI_TREE_PROTOCOL *This, IN UINT64 Flags, IN EFI_PHYSICAL_ADDRESS DataToHash, IN UINT64 DataToHashLen, IN TrEE_EVENT *Event)
Definition TrEEProtocol.h:208
UINT32 TrEE_EVENTTYPE
Definition TrEEProtocol.h:97
EFI_STATUS(EFIAPI * EFI_TREE_GET_CAPABILITY)(IN EFI_TREE_PROTOCOL *This, IN OUT TREE_BOOT_SERVICE_CAPABILITY *ProtocolCapability)
Definition TrEEProtocol.h:155
EFI_STATUS(EFIAPI * EFI_TREE_SUBMIT_COMMAND)(IN EFI_TREE_PROTOCOL *This, IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, IN UINT32 OutputParameterBlockSize, IN UINT8 *OutputParameterBlock)
Definition TrEEProtocol.h:232
EFI_GUID gEfiTrEEProtocolGuid
EFI_STATUS(EFIAPI * EFI_TREE_GET_EVENT_LOG)(IN EFI_TREE_PROTOCOL *This, IN TREE_EVENT_LOG_FORMAT EventLogFormat, OUT EFI_PHYSICAL_ADDRESS *EventLogLocation, OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry, OUT BOOLEAN *EventLogTruncated)
Definition TrEEProtocol.h:179
struct _TREE_VERSION TREE_VERSION
UINT64 EFI_PHYSICAL_ADDRESS
Definition UefiBaseType.h:54
RETURN_STATUS EFI_STATUS
Definition UefiBaseType.h:33
char ACPI_OBJECT_TYPE UINT32 Flags
Definition acdebug.h:453
unsigned short UINT16
Definition actypes.h:237
unsigned char BOOLEAN
Definition actypes.h:235
unsigned char UINT8
Definition actypes.h:236
COMPILER_DEPENDENT_UINT64 UINT64
Definition actypes.h:239
Definition Base.h:281
Definition TrEEProtocol.h:104
UINT32 HeaderSize
Definition TrEEProtocol.h:108
UINT16 HeaderVersion
Definition TrEEProtocol.h:112
TrEE_EVENTTYPE EventType
Definition TrEEProtocol.h:120
TrEE_PCRINDEX PCRIndex
Definition TrEEProtocol.h:116
Definition TrEEProtocol.h:123
UINT32 Size
Definition TrEEProtocol.h:127
TrEE_EVENT_HEADER Header
Definition TrEEProtocol.h:128
Definition TrEEProtocol.h:240
EFI_TREE_GET_EVENT_LOG GetEventLog
Definition TrEEProtocol.h:242
EFI_TREE_SUBMIT_COMMAND SubmitCommand
Definition TrEEProtocol.h:244
EFI_TREE_HASH_LOG_EXTEND_EVENT HashLogExtendEvent
Definition TrEEProtocol.h:243
EFI_TREE_GET_CAPABILITY GetCapability
Definition TrEEProtocol.h:241
Definition TrEEProtocol.h:36
UINT32 ManufacturerID
Definition TrEEProtocol.h:77
UINT16 MaxCommandSize
Definition TrEEProtocol.h:68
UINT16 MaxResponseSize
Definition TrEEProtocol.h:72
TREE_VERSION StructureVersion
Definition TrEEProtocol.h:46
UINT32 HashAlgorithmBitmap
Definition TrEEProtocol.h:56
TREE_EVENT_LOG_BITMAP SupportedEventLogs
Definition TrEEProtocol.h:60
BOOLEAN TrEEPresentFlag
Definition TrEEProtocol.h:64
TREE_VERSION ProtocolVersion
Definition TrEEProtocol.h:52
UINT8 Size
Definition TrEEProtocol.h:40
Definition TrEEProtocol.h:26
UINT8 Minor
Definition TrEEProtocol.h:28
UINT8 Major
Definition TrEEProtocol.h:27