5#define TCG_EFI_EVENT_H 1
10#include "tss2_common.h"
17#define EV_PREBOOT_CERT 0x0
18#define EV_POST_CODE 0x1
20#define EV_NO_ACTION 0x3
21#define EV_SEPARATOR 0x4
23#define EV_EVENT_TAG 0x6
24#define EV_S_CRTM_CONTENTS 0x7
25#define EV_S_CRTM_VERSION 0x8
26#define EV_CPU_MICROCODE 0x9
27#define EV_PLATFORM_CONFIG_FLAGS 0xa
28#define EV_TABLE_OF_DEVICES 0xb
29#define EV_COMPACT_HASH 0xc
31#define EV_IPL_PARTITION_DATA 0xe
32#define EV_NONHOST_CODE 0xf
33#define EV_NONHOST_CONFIG 0x10
34#define EV_NONHOST_INFO 0x11
35#define EV_OMIT_BOOT_DEVICE_EVENTS 0x12
38#define EV_EFI_EVENT_BASE 0x80000000
39#define EV_EFI_VARIABLE_DRIVER_CONFIG (EV_EFI_EVENT_BASE + 0x1)
40#define EV_EFI_VARIABLE_BOOT (EV_EFI_EVENT_BASE + 0x2)
41#define EV_EFI_BOOT_SERVICES_APPLICATION (EV_EFI_EVENT_BASE + 0x3)
42#define EV_EFI_BOOT_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 0x4)
43#define EV_EFI_RUNTIME_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 0x5)
44#define EV_EFI_GPT_EVENT (EV_EFI_EVENT_BASE + 0x6)
45#define EV_EFI_ACTION (EV_EFI_EVENT_BASE + 0x7)
46#define EV_EFI_PLATFORM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 0x8)
47#define EV_EFI_HANDOFF_TABLES (EV_EFI_EVENT_BASE + 0x9)
48#define EV_EFI_PLATFORM_FIRMWARE_BLOB2 (EV_EFI_EVENT_BASE + 0xa)
49#define EV_EFI_HANDOFF_TABLES2 (EV_EFI_EVENT_BASE + 0xb)
50#define EV_EFI_VARIABLE_BOOT2 (EV_EFI_EVENT_BASE + 0xc)
51#define EV_EFI_HCRTM_EVENT (EV_EFI_EVENT_BASE + 0x10)
52#define EV_EFI_VARIABLE_AUTHORITY (EV_EFI_EVENT_BASE + 0xe0)
55#define PACKED __attribute__((__packed__))
72 TCG_DIGEST2 Digests[];
74} PACKED TCG_EVENT_HEADER2;
83 UINT64 UnicodeNameLength;
84 UINT64 VariableDataLength;
85 char16_t UnicodeName[];
87} PACKED UEFI_VARIABLE_DATA;
89typedef UINT64 UEFI_PHYSICAL_ADDRESS;
91 UEFI_PHYSICAL_ADDRESS BlobBase;
93} PACKED UEFI_PLATFORM_FIRMWARE_BLOB;
106} PACKED TCG_SPECID_ALG;
109 UINT8 vendorInfoSize;
111} PACKED TCG_VENDOR_INFO;
115 UINT32 platformClass;
116 UINT8 specVersionMinor;
117 UINT8 specVersionMajor;
120 UINT32 numberOfAlgorithms;
121 TCG_SPECID_ALG digestSizes[];
123} PACKED TCG_SPECID_EVENT;
126 UEFI_PHYSICAL_ADDRESS ImageLocationInMemory;
127 UINT64 ImageLengthInMemory;
128 UINT64 ImageLinkTimeAddress;
129 UINT64 LengthOfDevicePath;
131} PACKED UEFI_IMAGE_LOAD_EVENT;
141 BYTE StartupLocality;
143} PACKED EV_NO_ACTION_STRUCT;
145static const BYTE STARTUP_LOCALITY_SIGNATURE[16] = { 0x53, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x4C,
146 0x6F, 0x63, 0x61, 0x6C, 0x69, 0x74, 0x79, 0 };