]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/IndustryStandard/UefiTcgPlatform.h
MdePkg: Fix DEVICE_SECURITY_EVENT_DATA_HEADER version definition
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / UefiTcgPlatform.h
CommitLineData
c311f86b 1/** @file\r
ec8c74e8
JY
2 TCG EFI Platform Definition in TCG_EFI_Platform_1_20_Final and\r
3 TCG PC Client Platform Firmware Profile Specification, Revision 1.05\r
267669ba 4\r
ec8c74e8 5 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r
9344f092 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
267669ba
LG
7\r
8**/\r
9\r
10#ifndef __UEFI_TCG_PLATFORM_H__\r
22a25d24 11#define __UEFI_TCG_PLATFORM_H__\r
267669ba
LG
12\r
13#include <IndustryStandard/Tpm12.h>\r
59b226d6 14#include <IndustryStandard/Tpm20.h>\r
a979fca9 15#include <Uefi.h>\r
1fd83dd2 16\r
267669ba
LG
17//\r
18// Standard event types\r
19//\r
4187f79c 20#define EV_PREBOOT_CERT ((TCG_EVENTTYPE) 0x00000000)\r
267669ba 21#define EV_POST_CODE ((TCG_EVENTTYPE) 0x00000001)\r
59b226d6 22#define EV_NO_ACTION ((TCG_EVENTTYPE) 0x00000003)\r
267669ba 23#define EV_SEPARATOR ((TCG_EVENTTYPE) 0x00000004)\r
4187f79c 24#define EV_ACTION ((TCG_EVENTTYPE) 0x00000005)\r
ec8c74e8 25#define EV_EVENT_TAG ((TCG_EVENTTYPE) 0x00000006)\r
267669ba
LG
26#define EV_S_CRTM_CONTENTS ((TCG_EVENTTYPE) 0x00000007)\r
27#define EV_S_CRTM_VERSION ((TCG_EVENTTYPE) 0x00000008)\r
04a89420 28#define EV_CPU_MICROCODE ((TCG_EVENTTYPE) 0x00000009)\r
4187f79c 29#define EV_PLATFORM_CONFIG_FLAGS ((TCG_EVENTTYPE) 0x0000000A)\r
f5a859d6 30#define EV_TABLE_OF_DEVICES ((TCG_EVENTTYPE) 0x0000000B)\r
4187f79c
ZC
31#define EV_COMPACT_HASH ((TCG_EVENTTYPE) 0x0000000C)\r
32#define EV_NONHOST_CODE ((TCG_EVENTTYPE) 0x0000000F)\r
33#define EV_NONHOST_CONFIG ((TCG_EVENTTYPE) 0x00000010)\r
34#define EV_NONHOST_INFO ((TCG_EVENTTYPE) 0x00000011)\r
35#define EV_OMIT_BOOT_DEVICE_EVENTS ((TCG_EVENTTYPE) 0x00000012)\r
267669ba
LG
36\r
37//\r
38// EFI specific event types\r
39//\r
40#define EV_EFI_EVENT_BASE ((TCG_EVENTTYPE) 0x80000000)\r
41#define EV_EFI_VARIABLE_DRIVER_CONFIG (EV_EFI_EVENT_BASE + 1)\r
42#define EV_EFI_VARIABLE_BOOT (EV_EFI_EVENT_BASE + 2)\r
43#define EV_EFI_BOOT_SERVICES_APPLICATION (EV_EFI_EVENT_BASE + 3)\r
44#define EV_EFI_BOOT_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 4)\r
45#define EV_EFI_RUNTIME_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 5)\r
46#define EV_EFI_GPT_EVENT (EV_EFI_EVENT_BASE + 6)\r
47#define EV_EFI_ACTION (EV_EFI_EVENT_BASE + 7)\r
48#define EV_EFI_PLATFORM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 8)\r
49#define EV_EFI_HANDOFF_TABLES (EV_EFI_EVENT_BASE + 9)\r
ec8c74e8
JY
50#define EV_EFI_PLATFORM_FIRMWARE_BLOB2 (EV_EFI_EVENT_BASE + 0xA)\r
51#define EV_EFI_HANDOFF_TABLES2 (EV_EFI_EVENT_BASE + 0xB)\r
4187f79c 52#define EV_EFI_HCRTM_EVENT (EV_EFI_EVENT_BASE + 0x10)\r
59b226d6 53#define EV_EFI_VARIABLE_AUTHORITY (EV_EFI_EVENT_BASE + 0xE0)\r
ec8c74e8
JY
54#define EV_EFI_SPDM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 0xE1)\r
55#define EV_EFI_SPDM_FIRMWARE_CONFIG (EV_EFI_EVENT_BASE + 0xE2)\r
267669ba 56\r
267669ba
LG
57#define EFI_CALLING_EFI_APPLICATION \\r
58 "Calling EFI Application from Boot Option"\r
341d442c
BB
59#define EFI_RETURNING_FROM_EFI_APPLICATION \\r
60 "Returning from EFI Application from Boot Option"\r
267669ba
LG
61#define EFI_EXIT_BOOT_SERVICES_INVOCATION \\r
62 "Exit Boot Services Invocation"\r
63#define EFI_EXIT_BOOT_SERVICES_FAILED \\r
64 "Exit Boot Services Returned with Failure"\r
65#define EFI_EXIT_BOOT_SERVICES_SUCCEEDED \\r
66 "Exit Boot Services Returned with Success"\r
67\r
2096185d 68\r
69#define EV_POSTCODE_INFO_POST_CODE "POST CODE"\r
70#define POST_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_POST_CODE) - 1)\r
71\r
72#define EV_POSTCODE_INFO_SMM_CODE "SMM CODE"\r
73#define SMM_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_SMM_CODE) - 1)\r
74\r
75#define EV_POSTCODE_INFO_ACPI_DATA "ACPI DATA"\r
76#define ACPI_DATA_LEN (sizeof(EV_POSTCODE_INFO_ACPI_DATA) - 1)\r
77\r
78#define EV_POSTCODE_INFO_BIS_CODE "BIS CODE"\r
79#define BIS_CODE_LEN (sizeof(EV_POSTCODE_INFO_BIS_CODE) - 1)\r
80\r
81#define EV_POSTCODE_INFO_UEFI_PI "UEFI PI"\r
82#define UEFI_PI_LEN (sizeof(EV_POSTCODE_INFO_UEFI_PI) - 1)\r
83\r
84#define EV_POSTCODE_INFO_OPROM "Embedded Option ROM"\r
85#define OPROM_LEN (sizeof(EV_POSTCODE_INFO_OPROM) - 1)\r
86\r
ec8c74e8
JY
87#define EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER "Embedded UEFI Driver"\r
88#define EMBEDDED_UEFI_DRIVER_LEN (sizeof(EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER) - 1)\r
89\r
59b226d6
JY
90#define FIRMWARE_DEBUGGER_EVENT_STRING "UEFI Debug Mode"\r
91#define FIRMWARE_DEBUGGER_EVENT_STRING_LEN (sizeof(FIRMWARE_DEBUGGER_EVENT_STRING) - 1)\r
92\r
267669ba
LG
93//\r
94// Set structure alignment to 1-byte\r
95//\r
a04ad3f0 96#pragma pack (1)\r
267669ba
LG
97\r
98typedef UINT32 TCG_EVENTTYPE;\r
992f22b9
LG
99typedef TPM_PCRINDEX TCG_PCRINDEX;\r
100typedef TPM_DIGEST TCG_DIGEST;\r
fb5148a0 101///\r
3ed785e9 102/// Event Log Entry Structure Definition\r
fb5148a0 103///\r
267669ba 104typedef struct tdTCG_PCR_EVENT {\r
3ed785e9 105 TCG_PCRINDEX PCRIndex; ///< PCRIndex event extended to\r
106 TCG_EVENTTYPE EventType; ///< TCG EFI event type\r
107 TCG_DIGEST Digest; ///< Value extended into PCRIndex\r
108 UINT32 EventSize; ///< Size of the event data\r
109 UINT8 Event[1]; ///< The event data\r
267669ba
LG
110} TCG_PCR_EVENT;\r
111\r
3ed785e9 112#define TSS_EVENT_DATA_MAX_SIZE 256\r
113\r
fb5148a0 114///\r
115/// TCG_PCR_EVENT_HDR\r
116///\r
267669ba
LG
117typedef struct tdTCG_PCR_EVENT_HDR {\r
118 TCG_PCRINDEX PCRIndex;\r
119 TCG_EVENTTYPE EventType;\r
120 TCG_DIGEST Digest;\r
121 UINT32 EventSize;\r
122} TCG_PCR_EVENT_HDR;\r
123\r
fb5148a0 124///\r
125/// EFI_PLATFORM_FIRMWARE_BLOB\r
126///\r
127/// BlobLength should be of type UINTN but we use UINT64 here\r
128/// because PEI is 32-bit while DXE is 64-bit on x64 platforms\r
129///\r
267669ba
LG
130typedef struct tdEFI_PLATFORM_FIRMWARE_BLOB {\r
131 EFI_PHYSICAL_ADDRESS BlobBase;\r
132 UINT64 BlobLength;\r
133} EFI_PLATFORM_FIRMWARE_BLOB;\r
134\r
ec8c74e8
JY
135///\r
136/// UEFI_PLATFORM_FIRMWARE_BLOB\r
137///\r
138/// This structure is used in EV_EFI_PLATFORM_FIRMWARE_BLOB\r
139/// event to facilitate the measurement of firmware volume.\r
140///\r
141typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB {\r
142 EFI_PHYSICAL_ADDRESS BlobBase;\r
143 UINT64 BlobLength;\r
144} UEFI_PLATFORM_FIRMWARE_BLOB;\r
145\r
146///\r
147/// UEFI_PLATFORM_FIRMWARE_BLOB2\r
148///\r
149/// This structure is used in EV_EFI_PLATFORM_FIRMWARE_BLOB2\r
150/// event to facilitate the measurement of firmware volume.\r
151///\r
152typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB2 {\r
153 UINT8 BlobDescriptionSize;\r
154//UINT8 BlobDescription[BlobDescriptionSize];\r
155//EFI_PHYSICAL_ADDRESS BlobBase;\r
156//UINT64 BlobLength;\r
157} UEFI_PLATFORM_FIRMWARE_BLOB2;\r
158\r
fb5148a0 159///\r
160/// EFI_IMAGE_LOAD_EVENT\r
161///\r
162/// This structure is used in EV_EFI_BOOT_SERVICES_APPLICATION,\r
163/// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER\r
164///\r
267669ba
LG
165typedef struct tdEFI_IMAGE_LOAD_EVENT {\r
166 EFI_PHYSICAL_ADDRESS ImageLocationInMemory;\r
167 UINTN ImageLengthInMemory;\r
168 UINTN ImageLinkTimeAddress;\r
169 UINTN LengthOfDevicePath;\r
170 EFI_DEVICE_PATH_PROTOCOL DevicePath[1];\r
171} EFI_IMAGE_LOAD_EVENT;\r
172\r
ec8c74e8
JY
173///\r
174/// UEFI_IMAGE_LOAD_EVENT\r
175///\r
176/// This structure is used in EV_EFI_BOOT_SERVICES_APPLICATION,\r
177/// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER\r
178///\r
179typedef struct tdUEFI_IMAGE_LOAD_EVENT {\r
180 EFI_PHYSICAL_ADDRESS ImageLocationInMemory;\r
181 UINT64 ImageLengthInMemory;\r
182 UINT64 ImageLinkTimeAddress;\r
183 UINT64 LengthOfDevicePath;\r
184 EFI_DEVICE_PATH_PROTOCOL DevicePath[1];\r
185} UEFI_IMAGE_LOAD_EVENT;\r
186\r
fb5148a0 187///\r
188/// EFI_HANDOFF_TABLE_POINTERS\r
189///\r
190/// This structure is used in EV_EFI_HANDOFF_TABLES event to facilitate\r
191/// the measurement of given configuration tables.\r
192///\r
267669ba 193typedef struct tdEFI_HANDOFF_TABLE_POINTERS {\r
3ed785e9 194 UINTN NumberOfTables;\r
267669ba
LG
195 EFI_CONFIGURATION_TABLE TableEntry[1];\r
196} EFI_HANDOFF_TABLE_POINTERS;\r
197\r
ec8c74e8
JY
198///\r
199/// UEFI_HANDOFF_TABLE_POINTERS\r
200///\r
201/// This structure is used in EV_EFI_HANDOFF_TABLES event to facilitate\r
202/// the measurement of given configuration tables.\r
203///\r
204typedef struct tdUEFI_HANDOFF_TABLE_POINTERS {\r
205 UINT64 NumberOfTables;\r
206 EFI_CONFIGURATION_TABLE TableEntry[1];\r
207} UEFI_HANDOFF_TABLE_POINTERS;\r
208\r
209///\r
210/// UEFI_HANDOFF_TABLE_POINTERS2\r
211///\r
212/// This structure is used in EV_EFI_HANDOFF_TABLES2 event to facilitate\r
213/// the measurement of given configuration tables.\r
214///\r
215typedef struct tdUEFI_HANDOFF_TABLE_POINTERS2 {\r
216 UINT8 TableDescriptionSize;\r
217//UINT8 TableDescription[TableDescriptionSize];\r
218//UINT64 NumberOfTables;\r
219//EFI_CONFIGURATION_TABLE TableEntry[1];\r
220} UEFI_HANDOFF_TABLE_POINTERS2;\r
221\r
fb5148a0 222///\r
223/// EFI_VARIABLE_DATA\r
224///\r
225/// This structure serves as the header for measuring variables. The name of the\r
226/// variable (in Unicode format) should immediately follow, then the variable\r
227/// data.\r
49945882 228/// This is defined in TCG EFI Platform Spec for TPM1.1 or 1.2 V1.22\r
fb5148a0 229///\r
267669ba
LG
230typedef struct tdEFI_VARIABLE_DATA {\r
231 EFI_GUID VariableName;\r
232 UINTN UnicodeNameLength;\r
233 UINTN VariableDataLength;\r
234 CHAR16 UnicodeName[1];\r
3ed785e9 235 INT8 VariableData[1]; ///< Driver or platform-specific data\r
267669ba
LG
236} EFI_VARIABLE_DATA;\r
237\r
49945882
ZC
238///\r
239/// UEFI_VARIABLE_DATA\r
240///\r
241/// This structure serves as the header for measuring variables. The name of the\r
242/// variable (in Unicode format) should immediately follow, then the variable\r
243/// data.\r
244/// This is defined in TCG PC Client Firmware Profile Spec 00.21\r
245///\r
246typedef struct tdUEFI_VARIABLE_DATA {\r
247 EFI_GUID VariableName;\r
248 UINT64 UnicodeNameLength;\r
249 UINT64 VariableDataLength;\r
250 CHAR16 UnicodeName[1];\r
251 INT8 VariableData[1]; ///< Driver or platform-specific data\r
252} UEFI_VARIABLE_DATA;\r
253\r
59b226d6
JY
254//\r
255// For TrEE1.0 compatibility\r
256//\r
257typedef struct {\r
258 EFI_GUID VariableName;\r
259 UINT64 UnicodeNameLength; // The TCG Definition used UINTN\r
260 UINT64 VariableDataLength; // The TCG Definition used UINTN\r
261 CHAR16 UnicodeName[1];\r
262 INT8 VariableData[1];\r
263} EFI_VARIABLE_DATA_TREE;\r
264\r
267669ba
LG
265typedef struct tdEFI_GPT_DATA {\r
266 EFI_PARTITION_TABLE_HEADER EfiPartitionHeader;\r
9095d37b 267 UINTN NumberOfPartitions;\r
267669ba
LG
268 EFI_PARTITION_ENTRY Partitions[1];\r
269} EFI_GPT_DATA;\r
270\r
ec8c74e8
JY
271typedef struct tdUEFI_GPT_DATA {\r
272 EFI_PARTITION_TABLE_HEADER EfiPartitionHeader;\r
273 UINT64 NumberOfPartitions;\r
274 EFI_PARTITION_ENTRY Partitions[1];\r
275} UEFI_GPT_DATA;\r
276\r
277#define TCG_DEVICE_SECURITY_EVENT_DATA_SIGNATURE "SPDM Device Sec"\r
b0f1b1c5 278#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION 1\r
ec8c74e8
JY
279\r
280#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_NULL 0\r
281#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_PCI 1\r
282#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_USB 2\r
283\r
284///\r
285/// TCG_DEVICE_SECURITY_EVENT_DATA_HEADER\r
286/// This is the header of TCG_DEVICE_SECURITY_EVENT_DATA, which is\r
287/// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG.\r
288///\r
289typedef struct {\r
290 UINT8 Signature[16];\r
291 UINT16 Version;\r
292 UINT16 Length;\r
293 UINT32 SpdmHashAlgo;\r
294 UINT32 DeviceType;\r
295//SPDM_MEASUREMENT_BLOCK SpdmMeasurementBlock;\r
296} TCG_DEVICE_SECURITY_EVENT_DATA_HEADER;\r
297\r
298#define TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT_VERSION 0\r
299\r
300///\r
301/// TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT\r
302/// This is the PCI context data of TCG_DEVICE_SECURITY_EVENT_DATA, which is\r
303/// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG.\r
304///\r
305typedef struct {\r
306 UINT16 Version;\r
307 UINT16 Length;\r
308 UINT16 VendorId;\r
309 UINT16 DeviceId;\r
310 UINT8 RevisionID;\r
311 UINT8 ClassCode[3];\r
312 UINT16 SubsystemVendorID;\r
313 UINT16 SubsystemID;\r
314} TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT;\r
315\r
316#define TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT_VERSION 0\r
317\r
318///\r
319/// TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT\r
320/// This is the USB context data of TCG_DEVICE_SECURITY_EVENT_DATA, which is\r
321/// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG.\r
322///\r
323typedef struct {\r
324 UINT16 Version;\r
325 UINT16 Length;\r
326//UINT8 DeviceDescriptor[DescLen];\r
327//UINT8 BodDescriptor[DescLen];\r
328//UINT8 ConfigurationDescriptor[DescLen][NumOfConfiguration];\r
329} TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT;\r
330\r
59b226d6
JY
331//\r
332// Crypto Agile Log Entry Format\r
333//\r
334typedef struct tdTCG_PCR_EVENT2 {\r
335 TCG_PCRINDEX PCRIndex;\r
336 TCG_EVENTTYPE EventType;\r
337 TPML_DIGEST_VALUES Digest;\r
338 UINT32 EventSize;\r
339 UINT8 Event[1];\r
340} TCG_PCR_EVENT2;\r
341\r
c5647c6c
ZC
342//\r
343// TCG PCR Event2 Header\r
344// Follow TCG EFI Protocol Spec 5.2 Crypto Agile Log Entry Format\r
345//\r
346typedef struct tdTCG_PCR_EVENT2_HDR{\r
347 TCG_PCRINDEX PCRIndex;\r
348 TCG_EVENTTYPE EventType;\r
349 TPML_DIGEST_VALUES Digests;\r
350 UINT32 EventSize;\r
351} TCG_PCR_EVENT2_HDR;\r
352\r
59b226d6
JY
353//\r
354// Log Header Entry Data\r
355//\r
356typedef struct {\r
357 //\r
358 // TCG defined hashing algorithm ID.\r
359 //\r
360 UINT16 algorithmId;\r
361 //\r
362 // The size of the digest for the respective hashing algorithm.\r
363 //\r
364 UINT16 digestSize;\r
365} TCG_EfiSpecIdEventAlgorithmSize;\r
366\r
367#define TCG_EfiSpecIDEventStruct_SIGNATURE_02 "Spec ID Event02"\r
368#define TCG_EfiSpecIDEventStruct_SIGNATURE_03 "Spec ID Event03"\r
369\r
370#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM12 1\r
371#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM12 2\r
372#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM12 2\r
373\r
374#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM2 2\r
375#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM2 0\r
376#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2 0\r
ec8c74e8 377#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_105 105\r
59b226d6
JY
378\r
379typedef struct {\r
380 UINT8 signature[16];\r
381 //\r
382 // The value for the Platform Class.\r
383 // The enumeration is defined in the TCG ACPI Specification Client Common Header.\r
384 //\r
385 UINT32 platformClass;\r
386 //\r
387 // The TCG EFI Platform Specification minor version number this BIOS supports.\r
388 // Any BIOS supporting version (1.22) MUST set this value to 02h.\r
389 // Any BIOS supporting version (2.0) SHALL set this value to 0x00.\r
390 //\r
391 UINT8 specVersionMinor;\r
392 //\r
393 // The TCG EFI Platform Specification major version number this BIOS supports.\r
394 // Any BIOS supporting version (1.22) MUST set this value to 01h.\r
395 // Any BIOS supporting version (2.0) SHALL set this value to 0x02.\r
396 //\r
397 UINT8 specVersionMajor;\r
398 //\r
399 // The TCG EFI Platform Specification errata for this specification this BIOS supports.\r
400 // Any BIOS supporting version and errata (1.22) MUST set this value to 02h.\r
401 // Any BIOS supporting version and errata (2.0) SHALL set this value to 0x00.\r
402 //\r
403 UINT8 specErrata;\r
404 //\r
405 // Specifies the size of the UINTN fields used in various data structures used in this specification.\r
406 // 0x01 indicates UINT32 and 0x02 indicates UINT64.\r
407 //\r
408 UINT8 uintnSize;\r
409 //\r
410 // This field is added in "Spec ID Event03".\r
411 // The number of hashing algorithms used in this event log (except the first event).\r
412 // All events in this event log use all hashing algorithms defined here.\r
413 //\r
414//UINT32 numberOfAlgorithms;\r
415 //\r
416 // This field is added in "Spec ID Event03".\r
417 // An array of size numberOfAlgorithms of value pairs.\r
418 //\r
419//TCG_EfiSpecIdEventAlgorithmSize digestSize[numberOfAlgorithms];\r
420 //\r
421 // Size in bytes of the VendorInfo field.\r
422 // Maximum value SHALL be FFh bytes.\r
423 //\r
424//UINT8 vendorInfoSize;\r
425 //\r
426 // Provided for use by the BIOS implementer.\r
427 // The value might be used, for example, to provide more detailed information about the specific BIOS such as BIOS revision numbers, etc.\r
428 // The values within this field are not standardized and are implementer-specific.\r
429 // Platform-specific or -unique information SHALL NOT be provided in this field.\r
430 //\r
431//UINT8 vendorInfo[vendorInfoSize];\r
432} TCG_EfiSpecIDEventStruct;\r
433\r
ec8c74e8
JY
434typedef struct tdTCG_PCClientTaggedEvent {\r
435 UINT32 taggedEventID;\r
436 UINT32 taggedEventDataSize;\r
437//UINT8 taggedEventData[taggedEventDataSize];\r
438} TCG_PCClientTaggedEvent;\r
439\r
440#define TCG_Sp800_155_PlatformId_Event_SIGNATURE "SP800-155 Event"\r
441#define TCG_Sp800_155_PlatformId_Event2_SIGNATURE "SP800-155 Event2"\r
6671cd74 442\r
ec8c74e8
JY
443typedef struct tdTCG_Sp800_155_PlatformId_Event2 {\r
444 UINT8 Signature[16];\r
445 //\r
446 // Where Vendor ID is an integer defined\r
447 // at http://www.iana.org/assignments/enterprisenumbers\r
448 //\r
449 UINT32 VendorId;\r
450 //\r
451 // 16-byte identifier of a given platform's static configuration of code\r
452 //\r
453 EFI_GUID ReferenceManifestGuid;\r
454 //\r
455 // Below structure is newly added in TCG_Sp800_155_PlatformId_Event2.\r
456 //\r
457//UINT8 PlatformManufacturerStrSize;\r
458//UINT8 PlatformManufacturerStr[PlatformManufacturerStrSize];\r
459//UINT8 PlatformModelSize;\r
460//UINT8 PlatformModel[PlatformModelSize];\r
461//UINT8 PlatformVersionSize;\r
462//UINT8 PlatformVersion[PlatformVersionSize];\r
463//UINT8 PlatformModelSize;\r
464//UINT8 PlatformModel[PlatformModelSize];\r
465//UINT8 FirmwareManufacturerStrSize;\r
466//UINT8 FirmwareManufacturerStr[FirmwareManufacturerStrSize];\r
467//UINT32 FirmwareManufacturerId;\r
468//UINT8 FirmwareVersion;\r
469//UINT8 FirmwareVersion[FirmwareVersionSize]];\r
470} TCG_Sp800_155_PlatformId_Event2;\r
6671cd74
ZC
471\r
472#define TCG_EfiStartupLocalityEvent_SIGNATURE "StartupLocality"\r
473\r
474\r
475//\r
ec8c74e8 476// The Locality Indicator which sent the TPM2_Startup command\r
6671cd74 477//\r
ec8c74e8
JY
478#define LOCALITY_0_INDICATOR 0x00\r
479#define LOCALITY_3_INDICATOR 0x03\r
6671cd74
ZC
480\r
481//\r
482// Startup Locality Event\r
483//\r
484typedef struct tdTCG_EfiStartupLocalityEvent{\r
485 UINT8 Signature[16];\r
486 //\r
487 // The Locality Indicator which sent the TPM2_Startup command\r
488 //\r
489 UINT8 StartupLocality;\r
490} TCG_EfiStartupLocalityEvent;\r
491\r
492\r
267669ba
LG
493//\r
494// Restore original structure alignment\r
495//\r
a04ad3f0 496#pragma pack ()\r
267669ba
LG
497\r
498#endif\r
499\r
500\r