17#ifndef CC_MEASUREMENT_PROTOCOL_H_
18#define CC_MEASUREMENT_PROTOCOL_H_
22#define EFI_CC_MEASUREMENT_PROTOCOL_GUID \
23 { 0x96751a3d, 0x72f4, 0x41a6, { 0xa7, 0x94, 0xed, 0x5d, 0x0e, 0x67, 0xae, 0x6b }}
24extern EFI_GUID gEfiCcMeasurementProtocolGuid;
36#define EFI_CC_TYPE_NONE 0
37#define EFI_CC_TYPE_SEV 1
38#define EFI_CC_TYPE_TDX 2
45typedef UINT32 EFI_CC_EVENT_LOG_BITMAP;
46typedef UINT32 EFI_CC_EVENT_LOG_FORMAT;
47typedef UINT32 EFI_CC_EVENT_ALGORITHM_BITMAP;
48typedef UINT32 EFI_CC_MR_INDEX;
53#define TDX_MR_INDEX_MRTD 0
54#define TDX_MR_INDEX_RTMR0 1
55#define TDX_MR_INDEX_RTMR1 2
56#define TDX_MR_INDEX_RTMR2 3
57#define TDX_MR_INDEX_RTMR3 4
59#define EFI_CC_EVENT_LOG_FORMAT_TCG_2 0x00000002
60#define EFI_CC_BOOT_HASH_ALG_SHA384 0x00000004
65#define EFI_CC_FLAG_EXTEND_ONLY 0x0000000000000001
69#define EFI_CC_FLAG_PE_COFF_IMAGE 0x0000000000000010
73#define EFI_CC_EVENT_HEADER_VERSION 1
87 EFI_CC_MR_INDEX MrIndex;
125 EFI_CC_EVENT_ALGORITHM_BITMAP HashAlgorithmBitmap;
129 EFI_CC_EVENT_LOG_BITMAP SupportedEventLogs;
183 IN EFI_CC_EVENT_LOG_FORMAT EventLogFormat,
186 OUT BOOLEAN *EventLogTruncated
214 IN UINT64 DataToHashLen,
234 IN TCG_PCRINDEX PcrIndex,
235 OUT EFI_CC_MR_INDEX *MrIndex
256 EFI_CC_MR_INDEX MrIndex;
268 EFI_CC_MR_INDEX MrIndex;
280#define EFI_CC_FINAL_EVENTS_TABLE_VERSION 1
290 UINT64 NumberOfEvents;
297#define EFI_CC_FINAL_EVENTS_TABLE_GUID \
298 {0xdd4a4648, 0x2de7, 0x4665, {0x96, 0x4d, 0x21, 0xd9, 0xef, 0x5f, 0xb4, 0x46}}
300extern EFI_GUID gEfiCcFinalEventsTableGuid;
320#define EFI_CC_EVENTLOG_ACPI_TABLE_SIGNATURE SIGNATURE_32('C', 'C', 'E', 'L')
321#define EFI_CC_EVENTLOG_ACPI_TABLE_REVISION 1
EFI_STATUS(EFIAPI * EFI_CC_GET_CAPABILITY)(IN EFI_CC_MEASUREMENT_PROTOCOL *This, IN OUT EFI_CC_BOOT_SERVICE_CAPABILITY *ProtocolCapability)
EFI_STATUS(EFIAPI * EFI_CC_GET_EVENT_LOG)(IN EFI_CC_MEASUREMENT_PROTOCOL *This, IN EFI_CC_EVENT_LOG_FORMAT EventLogFormat, OUT EFI_PHYSICAL_ADDRESS *EventLogLocation, OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry, OUT BOOLEAN *EventLogTruncated)
EFI_STATUS(EFIAPI * EFI_CC_MAP_PCR_TO_MR_INDEX)(IN EFI_CC_MEASUREMENT_PROTOCOL *This, IN TCG_PCRINDEX PcrIndex, OUT EFI_CC_MR_INDEX *MrIndex)
EFI_STATUS(EFIAPI * EFI_CC_HASH_LOG_EXTEND_EVENT)(IN EFI_CC_MEASUREMENT_PROTOCOL *This, IN UINT64 Flags, IN EFI_PHYSICAL_ADDRESS DataToHash, IN UINT64 DataToHashLen, IN EFI_CC_EVENT *EfiCcEvent)
UINT64 EFI_PHYSICAL_ADDRESS