]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/TpmMeasurementLib.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Include / Library / TpmMeasurementLib.h
1 /** @file
2 This library is used by other modules to measure data to TPM.
3
4 Copyright (c) 2012, Intel Corporation. All rights reserved. <BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _TPM_MEASUREMENT_LIB_H_
10 #define _TPM_MEASUREMENT_LIB_H_
11
12 /**
13 Tpm measure and log data, and extend the measurement result into a specific PCR.
14
15 @param[in] PcrIndex PCR Index.
16 @param[in] EventType Event type.
17 @param[in] EventLog Measurement event log.
18 @param[in] LogLen Event log length in bytes.
19 @param[in] HashData The start of the data buffer to be hashed, extended.
20 @param[in] HashDataLen The length, in bytes, of the buffer referenced by HashData
21
22 @retval EFI_SUCCESS Operation completed successfully.
23 @retval EFI_UNSUPPORTED TPM device not available.
24 @retval EFI_OUT_OF_RESOURCES Out of memory.
25 @retval EFI_DEVICE_ERROR The operation was unsuccessful.
26 **/
27 EFI_STATUS
28 EFIAPI
29 TpmMeasureAndLogData (
30 IN UINT32 PcrIndex,
31 IN UINT32 EventType,
32 IN VOID *EventLog,
33 IN UINT32 LogLen,
34 IN VOID *HashData,
35 IN UINT64 HashDataLen
36 );
37
38 #endif