]> git.proxmox.com Git - mirror_edk2.git/blob - SecurityPkg/Include/Library/TpmMeasurementLib.h
1.Measure ACPI table data comes from flash event type EV_POST_CODE ACPI DATA to PCR[0]
[mirror_edk2.git] / SecurityPkg / 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
34 EFI_STATUS
35 EFIAPI
36 TpmMeasureAndLogData (
37 IN UINT32 PcrIndex,
38 IN UINT32 EventType,
39 IN VOID *EventLog,
40 IN UINT32 LogLen,
41 IN VOID *HashData,
42 IN UINT64 HashDataLen
43 );
44
45 #endif