]>
Commit | Line | Data |
---|---|---|
1abfa4ce JY |
1 | /** @file\r |
2 | Header file for NV data structure definition.\r | |
3 | \r | |
4 | Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef __TCG2_CONFIG_NV_DATA_H__\r | |
16 | #define __TCG2_CONFIG_NV_DATA_H__\r | |
17 | \r | |
18 | #include <Guid/HiiPlatformSetupFormset.h>\r | |
19 | #include <Guid/Tcg2ConfigHii.h>\r | |
20 | #include <IndustryStandard/TcgPhysicalPresence.h>\r | |
21 | \r | |
22 | //\r | |
23 | // BUGBUG: In order to pass VfrCompiler, we have to redefine below MACRO, which already in <Protocol/Tcg2Protocol.h>.\r | |
24 | //\r | |
25 | #ifndef __TCG2_H__\r | |
26 | #define EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 0x00000001\r | |
27 | #define EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 0x00000002\r | |
28 | #endif\r | |
29 | #define EFI_TCG2_EVENT_LOG_FORMAT_ALL (EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 | EFI_TCG2_EVENT_LOG_FORMAT_TCG_2)\r | |
30 | \r | |
31 | #define TCG2_CONFIGURATION_VARSTORE_ID 0x0001\r | |
c41eeb44 | 32 | #define TCG2_CONFIGURATION_INFO_VARSTORE_ID 0x0002\r |
1abfa4ce JY |
33 | #define TCG2_CONFIGURATION_FORM_ID 0x0001\r |
34 | \r | |
35 | #define KEY_TPM_DEVICE 0x2000\r | |
36 | #define KEY_TPM2_OPERATION 0x2001\r | |
37 | #define KEY_TPM2_OPERATION_PARAMETER 0x2002\r | |
38 | #define KEY_TPM2_PCR_BANKS_REQUEST_0 0x2003\r | |
39 | #define KEY_TPM2_PCR_BANKS_REQUEST_1 0x2004\r | |
40 | #define KEY_TPM2_PCR_BANKS_REQUEST_2 0x2005\r | |
41 | #define KEY_TPM2_PCR_BANKS_REQUEST_3 0x2006\r | |
42 | #define KEY_TPM2_PCR_BANKS_REQUEST_4 0x2007\r | |
43 | \r | |
44 | #define TPM_DEVICE_NULL 0\r | |
45 | #define TPM_DEVICE_1_2 1\r | |
46 | #define TPM_DEVICE_2_0_DTPM 2\r | |
47 | #define TPM_DEVICE_MIN TPM_DEVICE_1_2\r | |
48 | #define TPM_DEVICE_MAX TPM_DEVICE_2_0_DTPM\r | |
49 | #define TPM_DEVICE_DEFAULT TPM_DEVICE_1_2\r | |
50 | \r | |
51 | #define TCG2_PROTOCOL_VERSION_DEFAULT 0x0001\r | |
52 | #define EFI_TCG2_EVENT_LOG_FORMAT_DEFAULT EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2\r | |
53 | \r | |
54 | //\r | |
55 | // Nv Data structure referenced by IFR, TPM device user desired\r | |
56 | //\r | |
57 | typedef struct {\r | |
58 | UINT8 TpmDevice;\r | |
59 | } TCG2_CONFIGURATION;\r | |
60 | \r | |
c41eeb44 JY |
61 | typedef struct {\r |
62 | UINT8 Sha1Supported;\r | |
63 | UINT8 Sha256Supported;\r | |
64 | UINT8 Sha384Supported;\r | |
65 | UINT8 Sha512Supported;\r | |
66 | UINT8 Sm3Supported;\r | |
67 | } TCG2_CONFIGURATION_INFO;\r | |
68 | \r | |
1abfa4ce JY |
69 | //\r |
70 | // Variable saved for S3, TPM detected, only valid in S3 path.\r | |
71 | // This variable is ReadOnly.\r | |
72 | //\r | |
73 | typedef struct {\r | |
74 | UINT8 TpmDeviceDetected;\r | |
75 | } TCG2_DEVICE_DETECTION;\r | |
76 | \r | |
c41eeb44 JY |
77 | #define TCG2_STORAGE_NAME L"TCG2_CONFIGURATION"\r |
78 | #define TCG2_STORAGE_INFO_NAME L"TCG2_CONFIGURATION_INFO"\r | |
1abfa4ce JY |
79 | #define TCG2_DEVICE_DETECTION_NAME L"TCG2_DEVICE_DETECTION"\r |
80 | \r | |
81 | #define TPM_INSTANCE_ID_LIST { \\r | |
82 | {TPM_DEVICE_INTERFACE_NONE, TPM_DEVICE_NULL}, \\r | |
83 | {TPM_DEVICE_INTERFACE_TPM12, TPM_DEVICE_1_2}, \\r | |
84 | {TPM_DEVICE_INTERFACE_TPM20_DTPM, TPM_DEVICE_2_0_DTPM}, \\r | |
85 | }\r | |
86 | \r | |
87 | //\r | |
88 | // BUGBUG: In order to pass VfrCompiler, we have to redefine GUID here.\r | |
89 | //\r | |
90 | #ifndef __BASE_H__\r | |
91 | typedef struct {\r | |
92 | UINT32 Data1;\r | |
93 | UINT16 Data2;\r | |
94 | UINT16 Data3;\r | |
95 | UINT8 Data4[8];\r | |
96 | } GUID;\r | |
97 | #endif\r | |
98 | \r | |
99 | typedef struct {\r | |
100 | GUID TpmInstanceGuid;\r | |
101 | UINT8 TpmDevice;\r | |
102 | } TPM_INSTANCE_ID;\r | |
103 | \r | |
104 | #endif\r |