55 if (FvHeader->
Signature != EFI_FVH_SIGNATURE) {
69 return &FvExtHeader->
FvName;
89 IN CHAR8 *Description OPTIONAL,
91 IN UINT64 FirmwareBlobLength
104 if (((Description !=
NULL) || (FvName !=
NULL)) &&
105 (
PcdGet32 (PcdTcgPfpMeasurementRevision) >= TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_105))
107 if (Description !=
NULL) {
108 AsciiSPrint ((CHAR8 *)FvBlob2.BlobDescription, sizeof (FvBlob2.BlobDescription),
"%a", Description);
110 AsciiSPrint ((CHAR8 *)FvBlob2.BlobDescription, sizeof (FvBlob2.BlobDescription),
"Fv(%g)", FvName);
113 FvBlob2.BlobDescriptionSize =
sizeof (FvBlob2.BlobDescription);
114 FvBlob2.BlobBase = FirmwareBlobBase;
115 FvBlob2.BlobLength = FirmwareBlobLength;
117 EventType = EV_EFI_PLATFORM_FIRMWARE_BLOB2;
119 EventLogSize =
sizeof (FvBlob2);
121 FvBlob.BlobBase = FirmwareBlobBase;
122 FvBlob.BlobLength = FirmwareBlobLength;
124 EventType = EV_EFI_PLATFORM_FIRMWARE_BLOB;
126 EventLogSize =
sizeof (FvBlob);
134 (VOID *)(
UINTN)FirmwareBlobBase,
159 IN CHAR8 *Description OPTIONAL,
161 IN VOID *TableAddress,
172 if ((Description !=
NULL) &&
173 (
PcdGet32 (PcdTcgPfpMeasurementRevision) >= TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_105))
175 AsciiSPrint ((CHAR8 *)HandoffTables2.TableDescription, sizeof (HandoffTables2.TableDescription),
"%a", Description);
177 HandoffTables2.TableDescriptionSize =
sizeof (HandoffTables2.TableDescription);
178 HandoffTables2.NumberOfTables = 1;
180 HandoffTables2.TableEntry[0].
VendorTable = TableAddress;
182 EventType = EV_EFI_HANDOFF_TABLES2;
183 EventLog = &HandoffTables2;
184 EventLogSize =
sizeof (HandoffTables2);
186 HandoffTables.NumberOfTables = 1;
188 HandoffTables.TableEntry[0].
VendorTable = TableAddress;
190 EventType = EV_EFI_HANDOFF_TABLES;
191 EventLog = &HandoffTables;
192 EventLogSize =
sizeof (HandoffTables);
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define PcdGet32(TokenName)
EFI_STATUS EFIAPI MeasureHandoffTable(IN UINT32 PcrIndex, IN CHAR8 *Description OPTIONAL, IN EFI_GUID *TableGuid, IN VOID *TableAddress, IN UINTN TableLength)
VOID * TpmMeasurementGetFvName(IN EFI_PHYSICAL_ADDRESS FvBase, IN UINT64 FvLength)
EFI_STATUS EFIAPI MeasureFirmwareBlob(IN UINT32 PcrIndex, IN CHAR8 *Description OPTIONAL, IN EFI_PHYSICAL_ADDRESS FirmwareBlobBase, IN UINT64 FirmwareBlobLength)
EFI_STATUS EFIAPI TpmMeasureAndLogData(IN UINT32 PcrIndex, IN UINT32 EventType, IN VOID *EventLog, IN UINT32 LogLen, IN VOID *HashData, IN UINT64 HashDataLen)
UINT64 EFI_PHYSICAL_ADDRESS