1 | /** @file
|
---|
2 | Handle TPM 2.0 physical presence requests from OS.
|
---|
3 |
|
---|
4 | This library will handle TPM 2.0 physical presence request from OS.
|
---|
5 |
|
---|
6 | Caution: This module requires additional review when modified.
|
---|
7 | This driver will have external input - variable.
|
---|
8 | This external input must be validated carefully to avoid security issue.
|
---|
9 |
|
---|
10 | Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction() and Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction()
|
---|
11 | will receive untrusted input and do validation.
|
---|
12 |
|
---|
13 | Copyright (c) 2015 - 2024, Intel Corporation. All rights reserved.<BR>
|
---|
14 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
15 |
|
---|
16 | **/
|
---|
17 |
|
---|
18 | #ifndef _MM_TCG2_PHYSICAL_PRESENCE_LIB_COMMON_H_
|
---|
19 | #define _MM_TCG2_PHYSICAL_PRESENCE_LIB_COMMON_H_
|
---|
20 |
|
---|
21 | #include <Guid/Tcg2PhysicalPresenceData.h>
|
---|
22 |
|
---|
23 | #include <Protocol/SmmVariable.h>
|
---|
24 |
|
---|
25 | #include <Library/BaseLib.h>
|
---|
26 | #include <Library/DebugLib.h>
|
---|
27 | #include <Library/BaseMemoryLib.h>
|
---|
28 | #include <Library/Tcg2PpVendorLib.h>
|
---|
29 | #include <Library/MmServicesTableLib.h>
|
---|
30 |
|
---|
31 | #define PP_INF_VERSION_1_2 "1.2"
|
---|
32 |
|
---|
33 | /**
|
---|
34 | The constructor function locates MmVariable protocol.
|
---|
35 |
|
---|
36 | It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
|
---|
37 |
|
---|
38 | @retval EFI_SUCCESS The constructor successfully added string package.
|
---|
39 | @retval Other value The constructor can't add string package.
|
---|
40 | **/
|
---|
41 | EFI_STATUS
|
---|
42 | Tcg2PhysicalPresenceLibCommonConstructor (
|
---|
43 | VOID
|
---|
44 | );
|
---|
45 |
|
---|
46 | /**
|
---|
47 | Check if Tcg2 PP version is lower than PP_INF_VERSION_1_3.
|
---|
48 |
|
---|
49 | @retval TRUE Tcg2 PP version is lower than PP_INF_VERSION_1_3.
|
---|
50 | @retval Other Tcg2 PP version is not lower than PP_INF_VERSION_1_3.
|
---|
51 | **/
|
---|
52 | BOOLEAN
|
---|
53 | IsTcg2PPVerLowerThan_1_3 (
|
---|
54 | VOID
|
---|
55 | );
|
---|
56 |
|
---|
57 | #endif
|
---|