TianoCore EDK2 master
Loading...
Searching...
No Matches
UefiTcgPlatform.h
Go to the documentation of this file.
1
10#ifndef __UEFI_TCG_PLATFORM_H__
11#define __UEFI_TCG_PLATFORM_H__
12
15#include <Uefi.h>
16
17//
18// Standard event types
19//
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)
36
37//
38// EFI specific event types
39//
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)
56#define EV_EFI_SPDM_DEVICE_BLOB EV_EFI_SPDM_FIRMWARE_BLOB
57#define EV_EFI_SPDM_DEVICE_CONFIG EV_EFI_SPDM_FIRMWARE_CONFIG
58//
59// The SPDM policy database for SPDM verification.
60// It goes to PCR7
61//
62#define EV_EFI_SPDM_DEVICE_POLICY (EV_EFI_EVENT_BASE + 0xE3)
63//
64// The SPDM policy authority for SPDM verification for the signature
65// of GET_MEASUREMENT or CHALLENGE_AUTH. It goes to PCR7.
66//
67#define EV_EFI_SPDM_DEVICE_AUTHORITY (EV_EFI_EVENT_BASE + 0xE4)
68
69#define EFI_CALLING_EFI_APPLICATION \
70 "Calling EFI Application from Boot Option"
71#define EFI_RETURNING_FROM_EFI_APPLICATION \
72 "Returning from EFI Application from Boot Option"
73#define EFI_EXIT_BOOT_SERVICES_INVOCATION \
74 "Exit Boot Services Invocation"
75#define EFI_EXIT_BOOT_SERVICES_FAILED \
76 "Exit Boot Services Returned with Failure"
77#define EFI_EXIT_BOOT_SERVICES_SUCCEEDED \
78 "Exit Boot Services Returned with Success"
79
80#define EV_POSTCODE_INFO_POST_CODE "POST CODE"
81#define POST_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_POST_CODE) - 1)
82
83#define EV_POSTCODE_INFO_SMM_CODE "SMM CODE"
84#define SMM_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_SMM_CODE) - 1)
85
86#define EV_POSTCODE_INFO_ACPI_DATA "ACPI DATA"
87#define ACPI_DATA_LEN (sizeof(EV_POSTCODE_INFO_ACPI_DATA) - 1)
88
89#define EV_POSTCODE_INFO_BIS_CODE "BIS CODE"
90#define BIS_CODE_LEN (sizeof(EV_POSTCODE_INFO_BIS_CODE) - 1)
91
92#define EV_POSTCODE_INFO_UEFI_PI "UEFI PI"
93#define UEFI_PI_LEN (sizeof(EV_POSTCODE_INFO_UEFI_PI) - 1)
94
95#define EV_POSTCODE_INFO_OPROM "Embedded Option ROM"
96#define OPROM_LEN (sizeof(EV_POSTCODE_INFO_OPROM) - 1)
97
98#define EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER "Embedded UEFI Driver"
99#define EMBEDDED_UEFI_DRIVER_LEN (sizeof(EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER) - 1)
100
101#define FIRMWARE_DEBUGGER_EVENT_STRING "UEFI Debug Mode"
102#define FIRMWARE_DEBUGGER_EVENT_STRING_LEN (sizeof(FIRMWARE_DEBUGGER_EVENT_STRING) - 1)
103
104//
105// Set structure alignment to 1-byte
106//
107#pragma pack (1)
108
109typedef UINT32 TCG_EVENTTYPE;
110typedef TPM_PCRINDEX TCG_PCRINDEX;
111typedef TPM_DIGEST TCG_DIGEST;
115typedef struct tdTCG_PCR_EVENT {
116 TCG_PCRINDEX PCRIndex;
117 TCG_EVENTTYPE EventType;
119 UINT32 EventSize;
120 UINT8 Event[1];
122
123#define TSS_EVENT_DATA_MAX_SIZE 256
124
128typedef struct tdTCG_PCR_EVENT_HDR {
129 TCG_PCRINDEX PCRIndex;
130 TCG_EVENTTYPE EventType;
131 TCG_DIGEST Digest;
132 UINT32 EventSize;
134
142 EFI_PHYSICAL_ADDRESS BlobBase;
143 UINT64 BlobLength;
145
153 EFI_PHYSICAL_ADDRESS BlobBase;
154 UINT64 BlobLength;
156
164 UINT8 BlobDescriptionSize;
165 // UINT8 BlobDescription[BlobDescriptionSize];
166 // EFI_PHYSICAL_ADDRESS BlobBase;
167 // UINT64 BlobLength;
169
177 EFI_PHYSICAL_ADDRESS ImageLocationInMemory;
178 UINTN ImageLengthInMemory;
179 UINTN ImageLinkTimeAddress;
180 UINTN LengthOfDevicePath;
181 EFI_DEVICE_PATH_PROTOCOL DevicePath[1];
183
191 EFI_PHYSICAL_ADDRESS ImageLocationInMemory;
192 UINT64 ImageLengthInMemory;
193 UINT64 ImageLinkTimeAddress;
194 UINT64 LengthOfDevicePath;
195 EFI_DEVICE_PATH_PROTOCOL DevicePath[1];
197
205 UINTN NumberOfTables;
206 EFI_CONFIGURATION_TABLE TableEntry[1];
208
216 UINT64 NumberOfTables;
217 EFI_CONFIGURATION_TABLE TableEntry[1];
219
227 UINT8 TableDescriptionSize;
228 // UINT8 TableDescription[TableDescriptionSize];
229 // UINT64 NumberOfTables;
230 // EFI_CONFIGURATION_TABLE TableEntry[1];
232
241typedef struct tdEFI_VARIABLE_DATA {
242 EFI_GUID VariableName;
243 UINTN UnicodeNameLength;
244 UINTN VariableDataLength;
245 CHAR16 UnicodeName[1];
246 INT8 VariableData[1];
248
257typedef struct tdUEFI_VARIABLE_DATA {
258 EFI_GUID VariableName;
259 UINT64 UnicodeNameLength;
260 UINT64 VariableDataLength;
261 CHAR16 UnicodeName[1];
262 INT8 VariableData[1];
264
265//
266// For TrEE1.0 compatibility
267//
268typedef struct {
269 EFI_GUID VariableName;
270 UINT64 UnicodeNameLength; // The TCG Definition used UINTN
271 UINT64 VariableDataLength; // The TCG Definition used UINTN
272 CHAR16 UnicodeName[1];
273 INT8 VariableData[1];
275
276typedef struct tdEFI_GPT_DATA {
277 EFI_PARTITION_TABLE_HEADER EfiPartitionHeader;
278 UINTN NumberOfPartitions;
279 EFI_PARTITION_ENTRY Partitions[1];
281
282typedef struct tdUEFI_GPT_DATA {
283 EFI_PARTITION_TABLE_HEADER EfiPartitionHeader;
284 UINT64 NumberOfPartitions;
285 EFI_PARTITION_ENTRY Partitions[1];
287
288#define TCG_DEVICE_SECURITY_EVENT_DATA_SIGNATURE "SPDM Device Sec"
289#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION 1
290
291#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_NULL 0
292#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_PCI 1
293#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_USB 2
294
300typedef struct {
301 UINT8 Signature[16];
302 UINT16 Version;
303 UINT16 Length;
304 UINT32 SpdmHashAlgo;
305 UINT32 DeviceType;
306 // SPDM_MEASUREMENT_BLOCK SpdmMeasurementBlock;
308
309#define TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT_VERSION 0
310
316typedef struct {
317 UINT16 Version;
318 UINT16 Length;
319 UINT16 VendorId;
320 UINT16 DeviceId;
321 UINT8 RevisionID;
322 UINT8 ClassCode[3];
323 UINT16 SubsystemVendorID;
324 UINT16 SubsystemID;
326
327#define TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT_VERSION 0
328
334typedef struct {
335 UINT16 Version;
336 UINT16 Length;
337 // UINT8 DeviceDescriptor[DescLen];
338 // UINT8 BodDescriptor[DescLen];
339 // UINT8 ConfigurationDescriptor[DescLen][NumOfConfiguration];
341
342//
343// Crypto Agile Log Entry Format
344//
345typedef struct tdTCG_PCR_EVENT2 {
346 TCG_PCRINDEX PCRIndex;
347 TCG_EVENTTYPE EventType;
348 TPML_DIGEST_VALUES Digest;
349 UINT32 EventSize;
350 UINT8 Event[1];
352
353//
354// TCG PCR Event2 Header
355// Follow TCG EFI Protocol Spec 5.2 Crypto Agile Log Entry Format
356//
357typedef struct tdTCG_PCR_EVENT2_HDR {
358 TCG_PCRINDEX PCRIndex;
359 TCG_EVENTTYPE EventType;
360 TPML_DIGEST_VALUES Digests;
361 UINT32 EventSize;
363
364//
365// Log Header Entry Data
366//
367typedef struct {
368 //
369 // TCG defined hashing algorithm ID.
370 //
371 UINT16 algorithmId;
372 //
373 // The size of the digest for the respective hashing algorithm.
374 //
375 UINT16 digestSize;
377
378#define TCG_EfiSpecIDEventStruct_SIGNATURE_02 "Spec ID Event02"
379#define TCG_EfiSpecIDEventStruct_SIGNATURE_03 "Spec ID Event03"
380
381#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM12 1
382#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM12 2
383#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM12 2
384
385#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM2 2
386#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM2 0
387#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2 0
388#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_105 105
389#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_106 106
390
391typedef struct {
392 UINT8 signature[16];
393 //
394 // The value for the Platform Class.
395 // The enumeration is defined in the TCG ACPI Specification Client Common Header.
396 //
397 UINT32 platformClass;
398 //
399 // The TCG EFI Platform Specification minor version number this BIOS supports.
400 // Any BIOS supporting version (1.22) MUST set this value to 02h.
401 // Any BIOS supporting version (2.0) SHALL set this value to 0x00.
402 //
403 UINT8 specVersionMinor;
404 //
405 // The TCG EFI Platform Specification major version number this BIOS supports.
406 // Any BIOS supporting version (1.22) MUST set this value to 01h.
407 // Any BIOS supporting version (2.0) SHALL set this value to 0x02.
408 //
409 UINT8 specVersionMajor;
410 //
411 // The TCG EFI Platform Specification errata for this specification this BIOS supports.
412 // Any BIOS supporting version and errata (1.22) MUST set this value to 02h.
413 // Any BIOS supporting version and errata (2.0) SHALL set this value to 0x00.
414 //
415 UINT8 specErrata;
416 //
417 // Specifies the size of the UINTN fields used in various data structures used in this specification.
418 // 0x01 indicates UINT32 and 0x02 indicates UINT64.
419 //
420 UINT8 uintnSize;
421 //
422 // This field is added in "Spec ID Event03".
423 // The number of hashing algorithms used in this event log (except the first event).
424 // All events in this event log use all hashing algorithms defined here.
425 //
426 // UINT32 numberOfAlgorithms;
427 //
428 // This field is added in "Spec ID Event03".
429 // An array of size numberOfAlgorithms of value pairs.
430 //
431 // TCG_EfiSpecIdEventAlgorithmSize digestSize[numberOfAlgorithms];
432 //
433 // Size in bytes of the VendorInfo field.
434 // Maximum value SHALL be FFh bytes.
435 //
436 // UINT8 vendorInfoSize;
437 //
438 // Provided for use by the BIOS implementer.
439 // The value might be used, for example, to provide more detailed information about the specific BIOS such as BIOS revision numbers, etc.
440 // The values within this field are not standardized and are implementer-specific.
441 // Platform-specific or -unique information SHALL NOT be provided in this field.
442 //
443 // UINT8 vendorInfo[vendorInfoSize];
445
447 UINT32 taggedEventID;
448 UINT32 taggedEventDataSize;
449 // UINT8 taggedEventData[taggedEventDataSize];
451
452#define TCG_Sp800_155_PlatformId_Event_SIGNATURE "SP800-155 Event"
453#define TCG_Sp800_155_PlatformId_Event2_SIGNATURE "SP800-155 Event2"
454#define TCG_Sp800_155_PlatformId_Event3_SIGNATURE "SP800-155 Event3"
455
457 UINT8 Signature[16];
458 //
459 // Where Vendor ID is an integer defined
460 // at http://www.iana.org/assignments/enterprisenumbers
461 //
462 UINT32 VendorId;
463 //
464 // 16-byte identifier of a given platform's static configuration of code
465 //
466 EFI_GUID ReferenceManifestGuid;
467 //
468 // Below structure is newly added in TCG_Sp800_155_PlatformId_Event2.
469 //
470 // UINT8 PlatformManufacturerStrSize;
471 // UINT8 PlatformManufacturerStr[PlatformManufacturerStrSize];
472 // UINT8 PlatformModelSize;
473 // UINT8 PlatformModel[PlatformModelSize];
474 // UINT8 PlatformVersionSize;
475 // UINT8 PlatformVersion[PlatformVersionSize];
476 // UINT8 FirmwareManufacturerStrSize;
477 // UINT8 FirmwareManufacturerStr[FirmwareManufacturerStrSize];
478 // UINT32 FirmwareManufacturerId;
479 // UINT8 FirmwareVersion;
480 // UINT8 FirmwareVersion[FirmwareVersionSize];
482
484 UINT8 Signature[16];
485 //
486 // Where Vendor ID is an integer defined
487 // at http://www.iana.org/assignments/enterprisenumbers
488 //
489 UINT32 VendorId;
490 //
491 // 16-byte identifier of a given platform's static configuration of code
492 //
493 EFI_GUID ReferenceManifestGuid;
494 // UINT8 PlatformManufacturerStrSize;
495 // UINT8 PlatformManufacturerStr[PlatformManufacturerStrSize];
496 // UINT8 PlatformModelSize;
497 // UINT8 PlatformModel[PlatformModelSize];
498 // UINT8 PlatformVersionSize;
499 // UINT8 PlatformVersion[PlatformVersionSize];
500 // UINT8 FirmwareManufacturerStrSize;
501 // UINT8 FirmwareManufacturerStr[FirmwareManufacturerStrSize];
502 // UINT32 FirmwareManufacturerId;
503 // UINT8 FirmwareVersion;
504 // UINT8 FirmwareVersion[FirmwareVersionSize];
505 //
506 // Below structure is newly added in TCG_Sp800_155_PlatformId_Event3
507 //
508 // UINT32 RimLocatorType;
509 // UINT32 RimLocatorLength;
510 // UINT8 RimLocator[RimLocatorLength];
511 // UINT32 PlatformCertLocatorType;
512 // UINT32 PlatformCertLocatorLength;
513 // UINT8 PlatformCertLocator[PlatformCertLocatorLength];
515
523#define TCG_LOCATOR_TYPE_RAW_DATA 0
524#define TCG_LOCATOR_TYPE_URI 1
525#define TCG_LOCATOR_TYPE_DEVICE_PATH 2
526#define TCG_LOCATOR_TYPE_UEFI_VARIABLE 3
527
528#define TCG_EfiStartupLocalityEvent_SIGNATURE "StartupLocality"
529
530//
531// The Locality Indicator which sent the TPM2_Startup command
532//
533#define LOCALITY_0_INDICATOR 0x00
534#define LOCALITY_3_INDICATOR 0x03
535
536//
537// Startup Locality Event
538//
540 UINT8 Signature[16];
541 //
542 // The Locality Indicator which sent the TPM2_Startup command
543 //
544 UINT8 StartupLocality;
546
547//
548// Restore original structure alignment
549//
550#pragma pack ()
551
552//
553// ======================================================================================================================
554// Event Type PCR Event Log Usage
555// ======================================================================================================================
556// EV_EFI_SPDM_DEVICE_BLOB 2 SPDM_MEASUREMENT_BLOCK (subtype) MEASUREMENT from device
557// EV_EFI_SPDM_DEVICE_CONFIG 3 SPDM_MEASUREMENT_BLOCK (subtype) MEASUREMENT from device
558// EV_EFI_SPDM_DEVICE_BLOB 2 SPDM_MEASUREMENT_SUMMARY_HASH.TCB (subtype) SUMMARY_HASH from device
559
560// EV_EFI_SPDM_DEVICE_POLICY 7 UEFI_VARIABLE_DATA with EFI_SIGNATURE_LIST Provisioned device public cert.
561// EV_EFI_SPDM_DEVICE_AUTHORITY 7 UEFI_VARIABLE_DATA with EFI_SIGNATURE_DATA CHALLENGE_AUTH signature verification
562// ======================================================================================================================
563//
564
565#define PCR_INDEX_FOR_SIGNATURE_DB 7
566
567#pragma pack(1)
568
569#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION_1 1
570#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION_2 2
571#define TCG_DEVICE_SECURITY_EVENT_DATA_SIGNATURE_2 "SPDM Device Sec2"
572
573typedef struct {
574 UINT8 Signature[16];
575 UINT16 Version;
576 UINT8 AuthState;
577 UINT8 Reserved;
578 UINT32 Length; // Length in bytes for all following structures.
579 UINT32 DeviceType;
580 UINT32 SubHeaderType;
581 UINT32 SubHeaderLength; // Length in bytes of the sub header followed by.
582 UINT64 SubHeaderUID; // Universal identifier assigned by the event log creator. It can be used to bind two sub header structure together.
583 // UINT64 DevicePathLength;
584 // UINT8 DevicePath[DevicePathLength];
586
587#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_SUCCESS 0
588#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_NO_AUTH 1
589#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_NO_BINDING 2
590#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_FAIL_NO_SIG 3
591#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_FAIL_INVALID 4
592#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_AUTH_STATE_NO_SPDM 0xFF
593
594#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_SUB_HEADER_TYPE_SPDM_MEASUREMENT_BLOCK 0
595#define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_SUB_HEADER_TYPE_SPDM_CERT_CHAIN 1
596
597typedef struct {
598 UINT16 SpdmVersion;
599 UINT8 SpdmMeasurementBlockCount;
600 UINT8 Reserved;
601 UINT32 SpdmMeasurementHashAlgo;
602 // SPDM_MEASUREMENT_BLOCK SpdmMeasurementBlock;
604
605typedef struct {
606 UINT16 SpdmVersion;
607 UINT8 SpdmSlotId;
608 UINT8 Reserved;
609 UINT32 SpdmHashAlgo;
610 // SPDM_CERT_CHAIN SpdmCertChain;
612
613typedef struct {
614 UINT32 Type;
615 UINT32 Length;
616 UINT8 Value[1];
618
619typedef union {
624
625typedef union {
629
630typedef struct {
635
636#pragma pack()
637
638//
639// EventType:EV_NO_ACTION
640// ======================================================================================================================
641// NVIndex Name PCR/NvIndex Event Log Usage
642// ======================================================================================================================
643// NV_EXTEND_INDEX_FOR_INSTANCE 0x01C40200 NV_INDEX_INSTANCE_EVENT_LOG_STRUCT NV Extend Record for instance data (CertChain)
644// NV_EXTEND_INDEX_FOR_DYNAMIC 0x01C40201 NV_INDEX_DYNAMIC_EVENT_LOG_STRUCT NV Extend Record for dynamic data (Nonce)
645
646// EVENT_LOG_INTEGRITY_NV_INDEX_EXIT_PM_AUTH 0x01C40202 EVENT_LOG_INTEGRITY_NV_INDEX_STRUCT Event Log Integrity for ExitPmAuth
647// EVENT_LOG_INTEGRITY_NV_INDEX_READY_TO_BOOT 0x01C40203 EVENT_LOG_INTEGRITY_NV_INDEX_STRUCT Event Log Integrity for ReadyToBoot
648// ======================================================================================================================
649//
650
651#define TCG_NV_EXTEND_INDEX_FOR_INSTANCE 0x01C40200
652#define TCG_NV_EXTEND_INDEX_FOR_DYNAMIC 0x01C40201
653#define TCG_EVENT_LOG_INTEGRITY_NV_INDEX_EXIT_PM_AUTH 0x01C40202
654#define TCG_EVENT_LOG_INTEGRITY_NV_INDEX_READY_TO_BOOT 0x01C40203
655
656#pragma pack(1)
657
658#define TCG_NV_EXTEND_INDEX_FOR_INSTANCE_SIGNATURE "NvIndexInstance"
659#define TCG_NV_INDEX_INSTANCE_EVENT_LOG_STRUCT_VERSION 1
660
661typedef struct {
662 UINT8 Signature[16];
663 UINT16 Version;
664 UINT8 Reserved[6];
665 // TCG_DEVICE_SECURITY_EVENT_DATA2 Data;
667
668#define TCG_NV_EXTEND_INDEX_FOR_DYNAMIC_SIGNATURE "NvIndexDynamic "
669#define TCG_NV_INDEX_DYNAMIC_EVENT_LOG_STRUCT_VERSION 1
670
671#define TCG_SPDM_CHALLENGE_DESCRIPTION "SPDM CHALLENGE"
672#define TCG_SPDM_CHALLENGE_AUTH_DESCRIPTION "SPDM CHALLENGE_AUTH"
673#define TCG_SPDM_GET_MEASUREMENTS_DESCRIPTION "SPDM GET_MEASUREMENTS"
674#define TCG_SPDM_MEASUREMENTS_DESCRIPTION "SPDM MEASUREMENTS"
675
676typedef struct {
677 UINT8 Signature[16];
678 UINT16 Version;
679 UINT8 Reserved[6];
680 UINT64 Uid;
681 // UINT16 DescriptionSize;
682 // UINT8 Description[DescriptionSize];
683 // UINT16 DataSize;
684 // UINT8 Data[DataSize];
686
687typedef struct {
689 UINT16 DescriptionSize;
690 UINT8 Description[sizeof (TCG_SPDM_CHALLENGE_DESCRIPTION)];
691 UINT16 DataSize;
692 UINT8 Data[32];
694
695typedef struct {
697 UINT16 DescriptionSize;
698 UINT8 Description[sizeof (TCG_SPDM_CHALLENGE_AUTH_DESCRIPTION)];
699 UINT16 DataSize;
700 UINT8 Data[32];
702
703typedef struct {
705 UINT16 DescriptionSize;
706 UINT8 Description[sizeof (TCG_SPDM_GET_MEASUREMENTS_DESCRIPTION)];
707 UINT16 DataSize;
708 UINT8 Data[32];
710
711typedef struct {
713 UINT16 DescriptionSize;
714 UINT8 Description[sizeof (TCG_SPDM_MEASUREMENTS_DESCRIPTION)];
715 UINT16 DataSize;
716 UINT8 Data[32];
718
719#pragma pack()
720
721#endif
UINT64 UINTN
UINT32 TPM_PCRINDEX
Definition: Tpm12.h:133
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
struct tdUEFI_PLATFORM_FIRMWARE_BLOB UEFI_PLATFORM_FIRMWARE_BLOB
struct tdTCG_PCR_EVENT TCG_PCR_EVENT
struct tdUEFI_IMAGE_LOAD_EVENT UEFI_IMAGE_LOAD_EVENT
struct tdEFI_IMAGE_LOAD_EVENT EFI_IMAGE_LOAD_EVENT
struct tdEFI_VARIABLE_DATA EFI_VARIABLE_DATA
struct tdUEFI_PLATFORM_FIRMWARE_BLOB2 UEFI_PLATFORM_FIRMWARE_BLOB2
struct tdUEFI_VARIABLE_DATA UEFI_VARIABLE_DATA
struct tdEFI_PLATFORM_FIRMWARE_BLOB EFI_PLATFORM_FIRMWARE_BLOB
struct tdUEFI_HANDOFF_TABLE_POINTERS2 UEFI_HANDOFF_TABLE_POINTERS2
struct tdUEFI_HANDOFF_TABLE_POINTERS UEFI_HANDOFF_TABLE_POINTERS
struct tdEFI_HANDOFF_TABLE_POINTERS EFI_HANDOFF_TABLE_POINTERS
struct tdTCG_PCR_EVENT_HDR TCG_PCR_EVENT_HDR
Definition: Base.h:213
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.