xref: /freebsd/sys/contrib/edk2/Include/Protocol/Tcg2Protocol.h (revision 1aa241b4ee657b8a62a0d86b91f82cf792f08dca)
1*1aa241b4SWarner Losh /** @file
2*1aa241b4SWarner Losh   TPM2 Protocol as defined in TCG PC Client Platform EFI Protocol Specification Family "2.0".
3*1aa241b4SWarner Losh   See http://trustedcomputinggroup.org for the latest specification
4*1aa241b4SWarner Losh 
5*1aa241b4SWarner Losh Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
6*1aa241b4SWarner Losh SPDX-License-Identifier: BSD-2-Clause-Patent
7*1aa241b4SWarner Losh 
8*1aa241b4SWarner Losh **/
9*1aa241b4SWarner Losh 
10*1aa241b4SWarner Losh #ifndef __TCG2_PROTOCOL_H__
11*1aa241b4SWarner Losh #define __TCG2_PROTOCOL_H__
12*1aa241b4SWarner Losh 
13*1aa241b4SWarner Losh #include <IndustryStandard/UefiTcgPlatform.h>
14*1aa241b4SWarner Losh #include <IndustryStandard/Tpm20.h>
15*1aa241b4SWarner Losh 
16*1aa241b4SWarner Losh #define EFI_TCG2_PROTOCOL_GUID \
17*1aa241b4SWarner Losh   {0x607f766c, 0x7455, 0x42be, { 0x93, 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f }}
18*1aa241b4SWarner Losh 
19*1aa241b4SWarner Losh typedef struct tdEFI_TCG2_PROTOCOL EFI_TCG2_PROTOCOL;
20*1aa241b4SWarner Losh 
21*1aa241b4SWarner Losh typedef struct tdEFI_TCG2_VERSION {
22*1aa241b4SWarner Losh   UINT8    Major;
23*1aa241b4SWarner Losh   UINT8    Minor;
24*1aa241b4SWarner Losh } EFI_TCG2_VERSION;
25*1aa241b4SWarner Losh 
26*1aa241b4SWarner Losh typedef UINT32 EFI_TCG2_EVENT_LOG_BITMAP;
27*1aa241b4SWarner Losh typedef UINT32 EFI_TCG2_EVENT_LOG_FORMAT;
28*1aa241b4SWarner Losh typedef UINT32 EFI_TCG2_EVENT_ALGORITHM_BITMAP;
29*1aa241b4SWarner Losh 
30*1aa241b4SWarner Losh #define EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2  0x00000001
31*1aa241b4SWarner Losh #define EFI_TCG2_EVENT_LOG_FORMAT_TCG_2    0x00000002
32*1aa241b4SWarner Losh 
33*1aa241b4SWarner Losh typedef struct tdEFI_TCG2_BOOT_SERVICE_CAPABILITY {
34*1aa241b4SWarner Losh   //
35*1aa241b4SWarner Losh   // Allocated size of the structure
36*1aa241b4SWarner Losh   //
37*1aa241b4SWarner Losh   UINT8                              Size;
38*1aa241b4SWarner Losh   //
39*1aa241b4SWarner Losh   // Version of the EFI_TCG2_BOOT_SERVICE_CAPABILITY structure itself.
40*1aa241b4SWarner Losh   // For this version of the protocol, the Major version shall be set to 1
41*1aa241b4SWarner Losh   // and the Minor version shall be set to 1.
42*1aa241b4SWarner Losh   //
43*1aa241b4SWarner Losh   EFI_TCG2_VERSION                   StructureVersion;
44*1aa241b4SWarner Losh   //
45*1aa241b4SWarner Losh   // Version of the EFI TCG2 protocol.
46*1aa241b4SWarner Losh   // For this version of the protocol, the Major version shall be set to 1
47*1aa241b4SWarner Losh   // and the Minor version shall be set to 1.
48*1aa241b4SWarner Losh   //
49*1aa241b4SWarner Losh   EFI_TCG2_VERSION                   ProtocolVersion;
50*1aa241b4SWarner Losh   //
51*1aa241b4SWarner Losh   // Supported hash algorithms (this bitmap is determined by the supported PCR
52*1aa241b4SWarner Losh   // banks in the TPM and the hashing algorithms supported by the firmware)
53*1aa241b4SWarner Losh   //
54*1aa241b4SWarner Losh   EFI_TCG2_EVENT_ALGORITHM_BITMAP    HashAlgorithmBitmap;
55*1aa241b4SWarner Losh   //
56*1aa241b4SWarner Losh   // Bitmap of supported event log formats
57*1aa241b4SWarner Losh   //
58*1aa241b4SWarner Losh   EFI_TCG2_EVENT_LOG_BITMAP          SupportedEventLogs;
59*1aa241b4SWarner Losh   //
60*1aa241b4SWarner Losh   // False = TPM not present
61*1aa241b4SWarner Losh   //
62*1aa241b4SWarner Losh   BOOLEAN                            TPMPresentFlag;
63*1aa241b4SWarner Losh   //
64*1aa241b4SWarner Losh   // Max size (in bytes) of a command that can be sent to the TPM
65*1aa241b4SWarner Losh   //
66*1aa241b4SWarner Losh   UINT16                             MaxCommandSize;
67*1aa241b4SWarner Losh   //
68*1aa241b4SWarner Losh   // Max size (in bytes) of a response that can be provided by the TPM
69*1aa241b4SWarner Losh   //
70*1aa241b4SWarner Losh   UINT16                             MaxResponseSize;
71*1aa241b4SWarner Losh   //
72*1aa241b4SWarner Losh   // 4-byte Vendor ID
73*1aa241b4SWarner Losh   // (see TCG Vendor ID registry, Section "TPM Capabilities Vendor ID")
74*1aa241b4SWarner Losh   //
75*1aa241b4SWarner Losh   UINT32                             ManufacturerID;
76*1aa241b4SWarner Losh   //
77*1aa241b4SWarner Losh   // Maximum number of PCR banks (hashing algorithms) supported.
78*1aa241b4SWarner Losh   // No granularity is provided to support a specific set of algorithms.
79*1aa241b4SWarner Losh   // Minimum value is 1.
80*1aa241b4SWarner Losh   //
81*1aa241b4SWarner Losh   UINT32                             NumberOfPCRBanks;
82*1aa241b4SWarner Losh   //
83*1aa241b4SWarner Losh   // A bitmap of currently active PCR banks (hashing algorithms).
84*1aa241b4SWarner Losh   // This is a subset of the supported hashing algorithms reported in HashAlgorithmBitMap.
85*1aa241b4SWarner Losh   // NumberOfPcrBanks defines the number of bits that are set.
86*1aa241b4SWarner Losh   //
87*1aa241b4SWarner Losh   EFI_TCG2_EVENT_ALGORITHM_BITMAP    ActivePcrBanks;
88*1aa241b4SWarner Losh } EFI_TCG2_BOOT_SERVICE_CAPABILITY;
89*1aa241b4SWarner Losh 
90*1aa241b4SWarner Losh #define EFI_TCG2_BOOT_HASH_ALG_SHA1     0x00000001
91*1aa241b4SWarner Losh #define EFI_TCG2_BOOT_HASH_ALG_SHA256   0x00000002
92*1aa241b4SWarner Losh #define EFI_TCG2_BOOT_HASH_ALG_SHA384   0x00000004
93*1aa241b4SWarner Losh #define EFI_TCG2_BOOT_HASH_ALG_SHA512   0x00000008
94*1aa241b4SWarner Losh #define EFI_TCG2_BOOT_HASH_ALG_SM3_256  0x00000010
95*1aa241b4SWarner Losh 
96*1aa241b4SWarner Losh //
97*1aa241b4SWarner Losh // This bit is shall be set when an event shall be extended but not logged.
98*1aa241b4SWarner Losh //
99*1aa241b4SWarner Losh #define EFI_TCG2_EXTEND_ONLY  0x0000000000000001
100*1aa241b4SWarner Losh //
101*1aa241b4SWarner Losh // This bit shall be set when the intent is to measure a PE/COFF image.
102*1aa241b4SWarner Losh //
103*1aa241b4SWarner Losh #define PE_COFF_IMAGE  0x0000000000000010
104*1aa241b4SWarner Losh 
105*1aa241b4SWarner Losh #define MAX_PCR_INDEX  23
106*1aa241b4SWarner Losh 
107*1aa241b4SWarner Losh #pragma pack(1)
108*1aa241b4SWarner Losh 
109*1aa241b4SWarner Losh #define EFI_TCG2_EVENT_HEADER_VERSION  1
110*1aa241b4SWarner Losh 
111*1aa241b4SWarner Losh typedef struct {
112*1aa241b4SWarner Losh   //
113*1aa241b4SWarner Losh   // Size of the event header itself (sizeof(EFI_TCG2_EVENT_HEADER)).
114*1aa241b4SWarner Losh   //
115*1aa241b4SWarner Losh   UINT32           HeaderSize;
116*1aa241b4SWarner Losh   //
117*1aa241b4SWarner Losh   // Header version. For this version of this specification, the value shall be 1.
118*1aa241b4SWarner Losh   //
119*1aa241b4SWarner Losh   UINT16           HeaderVersion;
120*1aa241b4SWarner Losh   //
121*1aa241b4SWarner Losh   // Index of the PCR that shall be extended (0 - 23).
122*1aa241b4SWarner Losh   //
123*1aa241b4SWarner Losh   TCG_PCRINDEX     PCRIndex;
124*1aa241b4SWarner Losh   //
125*1aa241b4SWarner Losh   // Type of the event that shall be extended (and optionally logged).
126*1aa241b4SWarner Losh   //
127*1aa241b4SWarner Losh   TCG_EVENTTYPE    EventType;
128*1aa241b4SWarner Losh } EFI_TCG2_EVENT_HEADER;
129*1aa241b4SWarner Losh 
130*1aa241b4SWarner Losh typedef struct tdEFI_TCG2_EVENT {
131*1aa241b4SWarner Losh   //
132*1aa241b4SWarner Losh   // Total size of the event including the Size component, the header and the Event data.
133*1aa241b4SWarner Losh   //
134*1aa241b4SWarner Losh   UINT32                   Size;
135*1aa241b4SWarner Losh   EFI_TCG2_EVENT_HEADER    Header;
136*1aa241b4SWarner Losh   UINT8                    Event[1];
137*1aa241b4SWarner Losh } EFI_TCG2_EVENT;
138*1aa241b4SWarner Losh 
139*1aa241b4SWarner Losh #pragma pack()
140*1aa241b4SWarner Losh 
141*1aa241b4SWarner Losh /**
142*1aa241b4SWarner Losh   The EFI_TCG2_PROTOCOL GetCapability function call provides protocol
143*1aa241b4SWarner Losh   capability information and state information.
144*1aa241b4SWarner Losh 
145*1aa241b4SWarner Losh   @param[in]      This               Indicates the calling context
146*1aa241b4SWarner Losh   @param[in, out] ProtocolCapability The caller allocates memory for a EFI_TCG2_BOOT_SERVICE_CAPABILITY
147*1aa241b4SWarner Losh                                      structure and sets the size field to the size of the structure allocated.
148*1aa241b4SWarner Losh                                      The callee fills in the fields with the EFI protocol capability information
149*1aa241b4SWarner Losh                                      and the current EFI TCG2 state information up to the number of fields which
150*1aa241b4SWarner Losh                                      fit within the size of the structure passed in.
151*1aa241b4SWarner Losh 
152*1aa241b4SWarner Losh   @retval EFI_SUCCESS            Operation completed successfully.
153*1aa241b4SWarner Losh   @retval EFI_DEVICE_ERROR       The command was unsuccessful.
154*1aa241b4SWarner Losh                                  The ProtocolCapability variable will not be populated.
155*1aa241b4SWarner Losh   @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.
156*1aa241b4SWarner Losh                                  The ProtocolCapability variable will not be populated.
157*1aa241b4SWarner Losh   @retval EFI_BUFFER_TOO_SMALL   The ProtocolCapability variable is too small to hold the full response.
158*1aa241b4SWarner Losh                                  It will be partially populated (required Size field will be set).
159*1aa241b4SWarner Losh **/
160*1aa241b4SWarner Losh typedef
161*1aa241b4SWarner Losh EFI_STATUS
162*1aa241b4SWarner Losh (EFIAPI *EFI_TCG2_GET_CAPABILITY)(
163*1aa241b4SWarner Losh   IN EFI_TCG2_PROTOCOL                    *This,
164*1aa241b4SWarner Losh   IN OUT EFI_TCG2_BOOT_SERVICE_CAPABILITY *ProtocolCapability
165*1aa241b4SWarner Losh   );
166*1aa241b4SWarner Losh 
167*1aa241b4SWarner Losh /**
168*1aa241b4SWarner Losh   The EFI_TCG2_PROTOCOL Get Event Log function call allows a caller to
169*1aa241b4SWarner Losh   retrieve the address of a given event log and its last entry.
170*1aa241b4SWarner Losh 
171*1aa241b4SWarner Losh   @param[in]  This               Indicates the calling context
172*1aa241b4SWarner Losh   @param[in]  EventLogFormat     The type of the event log for which the information is requested.
173*1aa241b4SWarner Losh   @param[out] EventLogLocation   A pointer to the memory address of the event log.
174*1aa241b4SWarner Losh   @param[out] EventLogLastEntry  If the Event Log contains more than one entry, this is a pointer to the
175*1aa241b4SWarner Losh                                  address of the start of the last entry in the event log in memory.
176*1aa241b4SWarner Losh   @param[out] EventLogTruncated  If the Event Log is missing at least one entry because an event would
177*1aa241b4SWarner Losh                                  have exceeded the area allocated for events, this value is set to TRUE.
178*1aa241b4SWarner Losh                                  Otherwise, the value will be FALSE and the Event Log will be complete.
179*1aa241b4SWarner Losh 
180*1aa241b4SWarner Losh   @retval EFI_SUCCESS            Operation completed successfully.
181*1aa241b4SWarner Losh   @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect
182*1aa241b4SWarner Losh                                  (e.g. asking for an event log whose format is not supported).
183*1aa241b4SWarner Losh **/
184*1aa241b4SWarner Losh typedef
185*1aa241b4SWarner Losh EFI_STATUS
186*1aa241b4SWarner Losh (EFIAPI *EFI_TCG2_GET_EVENT_LOG)(
187*1aa241b4SWarner Losh   IN EFI_TCG2_PROTOCOL         *This,
188*1aa241b4SWarner Losh   IN EFI_TCG2_EVENT_LOG_FORMAT EventLogFormat,
189*1aa241b4SWarner Losh   OUT EFI_PHYSICAL_ADDRESS     *EventLogLocation,
190*1aa241b4SWarner Losh   OUT EFI_PHYSICAL_ADDRESS     *EventLogLastEntry,
191*1aa241b4SWarner Losh   OUT BOOLEAN                  *EventLogTruncated
192*1aa241b4SWarner Losh   );
193*1aa241b4SWarner Losh 
194*1aa241b4SWarner Losh /**
195*1aa241b4SWarner Losh   The EFI_TCG2_PROTOCOL HashLogExtendEvent function call provides callers with
196*1aa241b4SWarner Losh   an opportunity to extend and optionally log events without requiring
197*1aa241b4SWarner Losh   knowledge of actual TPM commands.
198*1aa241b4SWarner Losh   The extend operation will occur even if this function cannot create an event
199*1aa241b4SWarner Losh   log entry (e.g. due to the event log being full).
200*1aa241b4SWarner Losh 
201*1aa241b4SWarner Losh   @param[in]  This               Indicates the calling context
202*1aa241b4SWarner Losh   @param[in]  Flags              Bitmap providing additional information.
203*1aa241b4SWarner Losh   @param[in]  DataToHash         Physical address of the start of the data buffer to be hashed.
204*1aa241b4SWarner Losh   @param[in]  DataToHashLen      The length in bytes of the buffer referenced by DataToHash.
205*1aa241b4SWarner Losh   @param[in]  EfiTcgEvent        Pointer to data buffer containing information about the event.
206*1aa241b4SWarner Losh 
207*1aa241b4SWarner Losh   @retval EFI_SUCCESS            Operation completed successfully.
208*1aa241b4SWarner Losh   @retval EFI_DEVICE_ERROR       The command was unsuccessful.
209*1aa241b4SWarner Losh   @retval EFI_VOLUME_FULL        The extend operation occurred, but the event could not be written to one or more event logs.
210*1aa241b4SWarner Losh   @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.
211*1aa241b4SWarner Losh   @retval EFI_UNSUPPORTED        The PE/COFF image type is not supported.
212*1aa241b4SWarner Losh **/
213*1aa241b4SWarner Losh typedef
214*1aa241b4SWarner Losh EFI_STATUS
215*1aa241b4SWarner Losh (EFIAPI *EFI_TCG2_HASH_LOG_EXTEND_EVENT)(
216*1aa241b4SWarner Losh   IN EFI_TCG2_PROTOCOL    *This,
217*1aa241b4SWarner Losh   IN UINT64               Flags,
218*1aa241b4SWarner Losh   IN EFI_PHYSICAL_ADDRESS DataToHash,
219*1aa241b4SWarner Losh   IN UINT64               DataToHashLen,
220*1aa241b4SWarner Losh   IN EFI_TCG2_EVENT       *EfiTcgEvent
221*1aa241b4SWarner Losh   );
222*1aa241b4SWarner Losh 
223*1aa241b4SWarner Losh /**
224*1aa241b4SWarner Losh   This service enables the sending of commands to the TPM.
225*1aa241b4SWarner Losh 
226*1aa241b4SWarner Losh   @param[in]  This                     Indicates the calling context
227*1aa241b4SWarner Losh   @param[in]  InputParameterBlockSize  Size of the TPM input parameter block.
228*1aa241b4SWarner Losh   @param[in]  InputParameterBlock      Pointer to the TPM input parameter block.
229*1aa241b4SWarner Losh   @param[in]  OutputParameterBlockSize Size of the TPM output parameter block.
230*1aa241b4SWarner Losh   @param[in]  OutputParameterBlock     Pointer to the TPM output parameter block.
231*1aa241b4SWarner Losh 
232*1aa241b4SWarner Losh   @retval EFI_SUCCESS            The command byte stream was successfully sent to the device and a response was successfully received.
233*1aa241b4SWarner Losh   @retval EFI_DEVICE_ERROR       The command was not successfully sent to the device or a response was not successfully received from the device.
234*1aa241b4SWarner Losh   @retval EFI_INVALID_PARAMETER  One or more of the parameters are incorrect.
235*1aa241b4SWarner Losh   @retval EFI_BUFFER_TOO_SMALL   The output parameter block is too small.
236*1aa241b4SWarner Losh **/
237*1aa241b4SWarner Losh typedef
238*1aa241b4SWarner Losh EFI_STATUS
239*1aa241b4SWarner Losh (EFIAPI *EFI_TCG2_SUBMIT_COMMAND)(
240*1aa241b4SWarner Losh   IN EFI_TCG2_PROTOCOL *This,
241*1aa241b4SWarner Losh   IN UINT32            InputParameterBlockSize,
242*1aa241b4SWarner Losh   IN UINT8             *InputParameterBlock,
243*1aa241b4SWarner Losh   IN UINT32            OutputParameterBlockSize,
244*1aa241b4SWarner Losh   IN UINT8             *OutputParameterBlock
245*1aa241b4SWarner Losh   );
246*1aa241b4SWarner Losh 
247*1aa241b4SWarner Losh /**
248*1aa241b4SWarner Losh   This service returns the currently active PCR banks.
249*1aa241b4SWarner Losh 
250*1aa241b4SWarner Losh   @param[in]  This            Indicates the calling context
251*1aa241b4SWarner Losh   @param[out] ActivePcrBanks  Pointer to the variable receiving the bitmap of currently active PCR banks.
252*1aa241b4SWarner Losh 
253*1aa241b4SWarner Losh   @retval EFI_SUCCESS           The bitmap of active PCR banks was stored in the ActivePcrBanks parameter.
254*1aa241b4SWarner Losh   @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect.
255*1aa241b4SWarner Losh **/
256*1aa241b4SWarner Losh typedef
257*1aa241b4SWarner Losh EFI_STATUS
258*1aa241b4SWarner Losh (EFIAPI *EFI_TCG2_GET_ACTIVE_PCR_BANKS)(
259*1aa241b4SWarner Losh   IN  EFI_TCG2_PROTOCOL *This,
260*1aa241b4SWarner Losh   OUT UINT32            *ActivePcrBanks
261*1aa241b4SWarner Losh   );
262*1aa241b4SWarner Losh 
263*1aa241b4SWarner Losh /**
264*1aa241b4SWarner Losh   This service sets the currently active PCR banks.
265*1aa241b4SWarner Losh 
266*1aa241b4SWarner Losh   @param[in]  This            Indicates the calling context
267*1aa241b4SWarner Losh   @param[in]  ActivePcrBanks  Bitmap of the requested active PCR banks. At least one bit SHALL be set.
268*1aa241b4SWarner Losh 
269*1aa241b4SWarner Losh   @retval EFI_SUCCESS           The bitmap in ActivePcrBank parameter is already active.
270*1aa241b4SWarner Losh   @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect.
271*1aa241b4SWarner Losh **/
272*1aa241b4SWarner Losh typedef
273*1aa241b4SWarner Losh EFI_STATUS
274*1aa241b4SWarner Losh (EFIAPI *EFI_TCG2_SET_ACTIVE_PCR_BANKS)(
275*1aa241b4SWarner Losh   IN EFI_TCG2_PROTOCOL *This,
276*1aa241b4SWarner Losh   IN UINT32            ActivePcrBanks
277*1aa241b4SWarner Losh   );
278*1aa241b4SWarner Losh 
279*1aa241b4SWarner Losh /**
280*1aa241b4SWarner Losh   This service retrieves the result of a previous invocation of SetActivePcrBanks.
281*1aa241b4SWarner Losh 
282*1aa241b4SWarner Losh   @param[in]  This              Indicates the calling context
283*1aa241b4SWarner Losh   @param[out] OperationPresent  Non-zero value to indicate a SetActivePcrBank operation was invoked during the last boot.
284*1aa241b4SWarner Losh   @param[out] Response          The response from the SetActivePcrBank request.
285*1aa241b4SWarner Losh 
286*1aa241b4SWarner Losh   @retval EFI_SUCCESS           The result value could be returned.
287*1aa241b4SWarner Losh   @retval EFI_INVALID_PARAMETER One or more of the parameters are incorrect.
288*1aa241b4SWarner Losh **/
289*1aa241b4SWarner Losh typedef
290*1aa241b4SWarner Losh EFI_STATUS
291*1aa241b4SWarner Losh (EFIAPI *EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS)(
292*1aa241b4SWarner Losh   IN  EFI_TCG2_PROTOCOL  *This,
293*1aa241b4SWarner Losh   OUT UINT32             *OperationPresent,
294*1aa241b4SWarner Losh   OUT UINT32             *Response
295*1aa241b4SWarner Losh   );
296*1aa241b4SWarner Losh 
297*1aa241b4SWarner Losh struct tdEFI_TCG2_PROTOCOL {
298*1aa241b4SWarner Losh   EFI_TCG2_GET_CAPABILITY                        GetCapability;
299*1aa241b4SWarner Losh   EFI_TCG2_GET_EVENT_LOG                         GetEventLog;
300*1aa241b4SWarner Losh   EFI_TCG2_HASH_LOG_EXTEND_EVENT                 HashLogExtendEvent;
301*1aa241b4SWarner Losh   EFI_TCG2_SUBMIT_COMMAND                        SubmitCommand;
302*1aa241b4SWarner Losh   EFI_TCG2_GET_ACTIVE_PCR_BANKS                  GetActivePcrBanks;
303*1aa241b4SWarner Losh   EFI_TCG2_SET_ACTIVE_PCR_BANKS                  SetActivePcrBanks;
304*1aa241b4SWarner Losh   EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS    GetResultOfSetActivePcrBanks;
305*1aa241b4SWarner Losh };
306*1aa241b4SWarner Losh 
307*1aa241b4SWarner Losh extern EFI_GUID  gEfiTcg2ProtocolGuid;
308*1aa241b4SWarner Losh 
309*1aa241b4SWarner Losh //
310*1aa241b4SWarner Losh // Log entries after Get Event Log service
311*1aa241b4SWarner Losh //
312*1aa241b4SWarner Losh 
313*1aa241b4SWarner Losh #define EFI_TCG2_FINAL_EVENTS_TABLE_GUID \
314*1aa241b4SWarner Losh   {0x1e2ed096, 0x30e2, 0x4254, { 0xbd, 0x89, 0x86, 0x3b, 0xbe, 0xf8, 0x23, 0x25 }}
315*1aa241b4SWarner Losh 
316*1aa241b4SWarner Losh extern EFI_GUID  gEfiTcg2FinalEventsTableGuid;
317*1aa241b4SWarner Losh 
318*1aa241b4SWarner Losh typedef struct tdEFI_TCG2_FINAL_EVENTS_TABLE {
319*1aa241b4SWarner Losh   //
320*1aa241b4SWarner Losh   // The version of this structure.
321*1aa241b4SWarner Losh   //
322*1aa241b4SWarner Losh   UINT64    Version;
323*1aa241b4SWarner Losh   //
324*1aa241b4SWarner Losh   // Number of events recorded after invocation of GetEventLog API
325*1aa241b4SWarner Losh   //
326*1aa241b4SWarner Losh   UINT64    NumberOfEvents;
327*1aa241b4SWarner Losh   //
328*1aa241b4SWarner Losh   // List of events of type TCG_PCR_EVENT2.
329*1aa241b4SWarner Losh   //
330*1aa241b4SWarner Losh   // TCG_PCR_EVENT2          Event[1];
331*1aa241b4SWarner Losh } EFI_TCG2_FINAL_EVENTS_TABLE;
332*1aa241b4SWarner Losh 
333*1aa241b4SWarner Losh #define EFI_TCG2_FINAL_EVENTS_TABLE_VERSION  1
334*1aa241b4SWarner Losh 
335*1aa241b4SWarner Losh #endif
336