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