]> git.proxmox.com Git - mirror_edk2.git/blob - SecurityPkg/Include/Library/TcgPhysicalPresenceLib.h
f6f1d50f806ce4639838600c1af05d193527434c
[mirror_edk2.git] / SecurityPkg / Include / Library / TcgPhysicalPresenceLib.h
1 /** @file
2 This library is intended to be used by BDS modules.
3 This library will lock TPM after executing TPM request.
4
5 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _TCG_PHYSICAL_PRESENCE_LIB_H_
17 #define _TCG_PHYSICAL_PRESENCE_LIB_H_
18
19 /**
20 Check and execute the pending TPM request and Lock TPM.
21
22 The TPM request may come from OS or BIOS. This API will display request information and wait
23 for user confirmation if TPM request exists. The TPM request will be sent to TPM device after
24 the TPM request is confirmed, and one or more reset may be required to make TPM request to
25 take effect. At last, it will lock TPM to prevent TPM state change by malware.
26
27 This API should be invoked after console in and console out are all ready as they are required
28 to display request information and get user input to confirm the request. This API should also
29 be invoked as early as possible as TPM is locked in this function.
30
31 **/
32 VOID
33 EFIAPI
34 TcgPhysicalPresenceLibProcessRequest (
35 VOID
36 );
37
38 /**
39 Check if the pending TPM request needs user input to confirm.
40
41 The TPM request may come from OS. This API will check if TPM request exists and need user
42 input to confirmation.
43
44 @retval TRUE TPM needs input to confirm user physical presence.
45 @retval FALSE TPM doesn't need input to confirm user physical presence.
46
47 **/
48 BOOLEAN
49 EFIAPI
50 TcgPhysicalPresenceLibNeedUserConfirm(
51 VOID
52 );
53
54 #endif