]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/TpmMeasurementLib.h
MdeModulePkg: Move TpmMeasurementLib LibraryClass from SecurityPkg
[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 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _TPM_MEASUREMENT_LIB_H_
16 #define _TPM_MEASUREMENT_LIB_H_
17
18 /**
19 Tpm measure and log data, and extend the measurement result into a specific PCR.
20
21 @param[in] PcrIndex PCR Index.
22 @param[in] EventType Event type.
23 @param[in] EventLog Measurement event log.
24 @param[in] LogLen Event log length in bytes.
25 @param[in] HashData The start of the data buffer to be hashed, extended.
26 @param[in] HashDataLen The length, in bytes, of the buffer referenced by HashData
27
28 @retval EFI_SUCCESS Operation completed successfully.
29 @retval EFI_UNSUPPORTED TPM device not available.
30 @retval EFI_OUT_OF_RESOURCES Out of memory.
31 @retval EFI_DEVICE_ERROR The operation was unsuccessful.
32 **/
33 EFI_STATUS
34 EFIAPI
35 TpmMeasureAndLogData (
36 IN UINT32 PcrIndex,
37 IN UINT32 EventType,
38 IN VOID *EventLog,
39 IN UINT32 LogLen,
40 IN VOID *HashData,
41 IN UINT64 HashDataLen
42 );
43
44 #endif