TianoCore EDK2 master
Loading...
Searching...
No Matches
TcgEventLogRecordLib.h File Reference
#include <Uefi.h>

Go to the source code of this file.

Data Structures

struct  PLATFORM_FIRMWARE_BLOB2_STRUCT
 
struct  HANDOFF_TABLE_POINTERS2_STRUCT
 

Macros

#define PLATFORM_FIRMWARE_BLOB_DESC   "Fv(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)"
 
#define HANDOFF_TABLE_POINTER_DESC   "1234567890ABCDEF"
 

Functions

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 MeasureHandoffTable (IN UINT32 PcrIndex, IN CHAR8 *Description OPTIONAL, IN EFI_GUID *TableGuid, IN VOID *TableAddress, IN UINTN TableLength)
 

Detailed Description

This library is used by other modules to measure Firmware to TPM.

Copyright (c) 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file TcgEventLogRecordLib.h.

Macro Definition Documentation

◆ HANDOFF_TABLE_POINTER_DESC

#define HANDOFF_TABLE_POINTER_DESC   "1234567890ABCDEF"

Definition at line 24 of file TcgEventLogRecordLib.h.

◆ PLATFORM_FIRMWARE_BLOB_DESC

#define PLATFORM_FIRMWARE_BLOB_DESC   "Fv(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)"

Definition at line 16 of file TcgEventLogRecordLib.h.

Function Documentation

◆ MeasureFirmwareBlob()

EFI_STATUS EFIAPI MeasureFirmwareBlob ( IN UINT32  PcrIndex,
IN CHAR8 *Description  OPTIONAL,
IN EFI_PHYSICAL_ADDRESS  FirmwareBlobBase,
IN UINT64  FirmwareBlobLength 
)

Measure a FirmwareBlob.

Parameters
[in]PcrIndexPCR Index.
[in]DescriptionDescription for this FirmwareBlob.
[in]FirmwareBlobBaseBase address of this FirmwareBlob.
[in]FirmwareBlobLengthSize in bytes of this FirmwareBlob.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_UNSUPPORTEDTPM device not available.
EFI_OUT_OF_RESOURCESOut of memory.
EFI_DEVICE_ERRORThe operation was unsuccessful.

Measure a FirmwareBlob.

Parameters
[in]PcrIndexPcrIndex of the measurement.
[in]DescriptionDescription for this FirmwareBlob.
[in]FirmwareBlobBaseBase address of this FirmwareBlob.
[in]FirmwareBlobLengthSize in bytes of this FirmwareBlob.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_UNSUPPORTEDTPM device not available.
EFI_OUT_OF_RESOURCESOut of memory.
EFI_DEVICE_ERRORThe operation was unsuccessful.

Definition at line 87 of file TcgEventLogRecordLib.c.

◆ MeasureHandoffTable()

EFI_STATUS EFIAPI MeasureHandoffTable ( IN UINT32  PcrIndex,
IN CHAR8 *Description  OPTIONAL,
IN EFI_GUID TableGuid,
IN VOID *  TableAddress,
IN UINTN  TableLength 
)

Measure a HandoffTable.

Parameters
[in]PcrIndexPcrIndex of the measurement.
[in]DescriptionDescription for this HandoffTable.
[in]TableGuidGUID of this HandoffTable.
[in]TableAddressBase address of this HandoffTable.
[in]TableLengthSize in bytes of this HandoffTable.
Return values
EFI_SUCCESSOperation completed successfully.
EFI_UNSUPPORTEDTPM device not available.
EFI_OUT_OF_RESOURCESOut of memory.
EFI_DEVICE_ERRORThe operation was unsuccessful.

Definition at line 157 of file TcgEventLogRecordLib.c.

◆ TpmMeasurementGetFvName()

VOID * TpmMeasurementGetFvName ( IN EFI_PHYSICAL_ADDRESS  FvBase,
IN UINT64  FvLength 
)

Get the FvName from the FV header.

Causion: The FV is untrusted input.

Parameters
[in]FvBaseBase address of FV image.
[in]FvLengthLength of FV image.
Returns
FvName pointer
Return values
NULLFvName is NOT found

Definition at line 34 of file TcgEventLogRecordLib.c.