10#ifndef __UEFI_TCG_PLATFORM_H__
11#define __UEFI_TCG_PLATFORM_H__
20#define EV_PREBOOT_CERT ((TCG_EVENTTYPE) 0x00000000)
21#define EV_POST_CODE ((TCG_EVENTTYPE) 0x00000001)
22#define EV_NO_ACTION ((TCG_EVENTTYPE) 0x00000003)
23#define EV_SEPARATOR ((TCG_EVENTTYPE) 0x00000004)
24#define EV_ACTION ((TCG_EVENTTYPE) 0x00000005)
25#define EV_EVENT_TAG ((TCG_EVENTTYPE) 0x00000006)
26#define EV_S_CRTM_CONTENTS ((TCG_EVENTTYPE) 0x00000007)
27#define EV_S_CRTM_VERSION ((TCG_EVENTTYPE) 0x00000008)
28#define EV_CPU_MICROCODE ((TCG_EVENTTYPE) 0x00000009)
29#define EV_PLATFORM_CONFIG_FLAGS ((TCG_EVENTTYPE) 0x0000000A)
30#define EV_TABLE_OF_DEVICES ((TCG_EVENTTYPE) 0x0000000B)
31#define EV_COMPACT_HASH ((TCG_EVENTTYPE) 0x0000000C)
32#define EV_NONHOST_CODE ((TCG_EVENTTYPE) 0x0000000F)
33#define EV_NONHOST_CONFIG ((TCG_EVENTTYPE) 0x00000010)
34#define EV_NONHOST_INFO ((TCG_EVENTTYPE) 0x00000011)
35#define EV_OMIT_BOOT_DEVICE_EVENTS ((TCG_EVENTTYPE) 0x00000012)
40#define EV_EFI_EVENT_BASE ((TCG_EVENTTYPE) 0x80000000)
41#define EV_EFI_VARIABLE_DRIVER_CONFIG (EV_EFI_EVENT_BASE + 1)
42#define EV_EFI_VARIABLE_BOOT (EV_EFI_EVENT_BASE + 2)
43#define EV_EFI_BOOT_SERVICES_APPLICATION (EV_EFI_EVENT_BASE + 3)
44#define EV_EFI_BOOT_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 4)
45#define EV_EFI_RUNTIME_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 5)
46#define EV_EFI_GPT_EVENT (EV_EFI_EVENT_BASE + 6)
47#define EV_EFI_ACTION (EV_EFI_EVENT_BASE + 7)
48#define EV_EFI_PLATFORM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 8)
49#define EV_EFI_HANDOFF_TABLES (EV_EFI_EVENT_BASE + 9)
50#define EV_EFI_PLATFORM_FIRMWARE_BLOB2 (EV_EFI_EVENT_BASE + 0xA)
51#define EV_EFI_HANDOFF_TABLES2 (EV_EFI_EVENT_BASE + 0xB)
52#define EV_EFI_HCRTM_EVENT (EV_EFI_EVENT_BASE + 0x10)
53#define EV_EFI_VARIABLE_AUTHORITY (EV_EFI_EVENT_BASE + 0xE0)
54#define EV_EFI_SPDM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 0xE1)
55#define EV_EFI_SPDM_FIRMWARE_CONFIG (EV_EFI_EVENT_BASE + 0xE2)
57#define EFI_CALLING_EFI_APPLICATION \
58 "Calling EFI Application from Boot Option"
59#define EFI_RETURNING_FROM_EFI_APPLICATION \
60 "Returning from EFI Application from Boot Option"
61#define EFI_EXIT_BOOT_SERVICES_INVOCATION \
62 "Exit Boot Services Invocation"
63#define EFI_EXIT_BOOT_SERVICES_FAILED \
64 "Exit Boot Services Returned with Failure"
65#define EFI_EXIT_BOOT_SERVICES_SUCCEEDED \
66 "Exit Boot Services Returned with Success"
68#define EV_POSTCODE_INFO_POST_CODE "POST CODE"
69#define POST_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_POST_CODE) - 1)
71#define EV_POSTCODE_INFO_SMM_CODE "SMM CODE"
72#define SMM_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_SMM_CODE) - 1)
74#define EV_POSTCODE_INFO_ACPI_DATA "ACPI DATA"
75#define ACPI_DATA_LEN (sizeof(EV_POSTCODE_INFO_ACPI_DATA) - 1)
77#define EV_POSTCODE_INFO_BIS_CODE "BIS CODE"
78#define BIS_CODE_LEN (sizeof(EV_POSTCODE_INFO_BIS_CODE) - 1)
80#define EV_POSTCODE_INFO_UEFI_PI "UEFI PI"
81#define UEFI_PI_LEN (sizeof(EV_POSTCODE_INFO_UEFI_PI) - 1)
83#define EV_POSTCODE_INFO_OPROM "Embedded Option ROM"
84#define OPROM_LEN (sizeof(EV_POSTCODE_INFO_OPROM) - 1)
86#define EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER "Embedded UEFI Driver"
87#define EMBEDDED_UEFI_DRIVER_LEN (sizeof(EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER) - 1)
89#define FIRMWARE_DEBUGGER_EVENT_STRING "UEFI Debug Mode"
90#define FIRMWARE_DEBUGGER_EVENT_STRING_LEN (sizeof(FIRMWARE_DEBUGGER_EVENT_STRING) - 1)
97typedef UINT32 TCG_EVENTTYPE;
111#define TSS_EVENT_DATA_MAX_SIZE 256
117 TCG_PCRINDEX PCRIndex;
118 TCG_EVENTTYPE EventType;
152 UINT8 BlobDescriptionSize;
166 UINTN ImageLengthInMemory;
167 UINTN ImageLinkTimeAddress;
168 UINTN LengthOfDevicePath;
180 UINT64 ImageLengthInMemory;
181 UINT64 ImageLinkTimeAddress;
182 UINT64 LengthOfDevicePath;
193 UINTN NumberOfTables;
204 UINT64 NumberOfTables;
215 UINT8 TableDescriptionSize;
231 UINTN UnicodeNameLength;
232 UINTN VariableDataLength;
233 CHAR16 UnicodeName[1];
247 UINT64 UnicodeNameLength;
248 UINT64 VariableDataLength;
249 CHAR16 UnicodeName[1];
258 UINT64 UnicodeNameLength;
259 UINT64 VariableDataLength;
260 CHAR16 UnicodeName[1];
261 INT8 VariableData[1];
266 UINTN NumberOfPartitions;
272 UINT64 NumberOfPartitions;
276#define TCG_DEVICE_SECURITY_EVENT_DATA_SIGNATURE "SPDM Device Sec"
277#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION 1
279#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_NULL 0
280#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_PCI 1
281#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_USB 2
297#define TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT_VERSION 0
311 UINT16 SubsystemVendorID;
315#define TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT_VERSION 0
334 TCG_PCRINDEX PCRIndex;
335 TCG_EVENTTYPE EventType;
346 TCG_PCRINDEX PCRIndex;
347 TCG_EVENTTYPE EventType;
366#define TCG_EfiSpecIDEventStruct_SIGNATURE_02 "Spec ID Event02"
367#define TCG_EfiSpecIDEventStruct_SIGNATURE_03 "Spec ID Event03"
369#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM12 1
370#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM12 2
371#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM12 2
373#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM2 2
374#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM2 0
375#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2 0
376#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_105 105
384 UINT32 platformClass;
390 UINT8 specVersionMinor;
396 UINT8 specVersionMajor;
434 UINT32 taggedEventID;
435 UINT32 taggedEventDataSize;
439#define TCG_Sp800_155_PlatformId_Event_SIGNATURE "SP800-155 Event"
440#define TCG_Sp800_155_PlatformId_Event2_SIGNATURE "SP800-155 Event2"
471#define TCG_EfiStartupLocalityEvent_SIGNATURE "StartupLocality"
476#define LOCALITY_0_INDICATOR 0x00
477#define LOCALITY_3_INDICATOR 0x03
487 UINT8 StartupLocality;
UINT64 EFI_PHYSICAL_ADDRESS
INT8 VariableData[1]
Driver or platform-specific data.
UINT8 Event[1]
The event data.
UINT32 EventSize
Size of the event data.
TCG_DIGEST Digest
Value extended into PCRIndex.
TCG_EVENTTYPE EventType
TCG EFI event type.
TCG_PCRINDEX PCRIndex
PCRIndex event extended to.
INT8 VariableData[1]
Driver or platform-specific data.