TianoCore EDK2 master
Loading...
Searching...
No Matches
TcgEventLogRecordLib.c File Reference

Go to the source code of this file.

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 data to TPM.

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

Definition in file TcgEventLogRecordLib.c.

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]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.