]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigNvData.h
SecurityPkg: Tcg2Dxe: Report correct FinalEventLog size
[mirror_edk2.git] / SecurityPkg / Tcg / Tcg2Config / Tcg2ConfigNvData.h
CommitLineData
1abfa4ce
JY
1/** @file\r
2 Header file for NV data structure definition.\r
3\r
518b6f65 4Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
1abfa4ce
JY
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 __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
518b6f65 43#define KEY_TPM_DEVICE_INTERFACE 0x2008\r
1abfa4ce
JY
44\r
45#define TPM_DEVICE_NULL 0\r
46#define TPM_DEVICE_1_2 1\r
47#define TPM_DEVICE_2_0_DTPM 2\r
48#define TPM_DEVICE_MIN TPM_DEVICE_1_2\r
49#define TPM_DEVICE_MAX TPM_DEVICE_2_0_DTPM\r
50#define TPM_DEVICE_DEFAULT TPM_DEVICE_1_2\r
51\r
518b6f65
JY
52#define TPM_DEVICE_INTERFACE_TIS 0\r
53#define TPM_DEVICE_INTERFACE_PTP_FIFO 1\r
54#define TPM_DEVICE_INTERFACE_PTP_CRB 2\r
55#define TPM_DEVICE_INTERFACE_MAX TPM_DEVICE_INTERFACE_PTP_FIFO\r
56#define TPM_DEVICE_INTERFACE_DEFAULT TPM_DEVICE_INTERFACE_PTP_CRB\r
57\r
1abfa4ce
JY
58#define TCG2_PROTOCOL_VERSION_DEFAULT 0x0001\r
59#define EFI_TCG2_EVENT_LOG_FORMAT_DEFAULT EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2\r
60\r
61//\r
62// Nv Data structure referenced by IFR, TPM device user desired\r
63//\r
64typedef struct {\r
65 UINT8 TpmDevice;\r
66} TCG2_CONFIGURATION;\r
67\r
c41eeb44 68typedef struct {\r
518b6f65
JY
69 BOOLEAN Sha1Supported;\r
70 BOOLEAN Sha256Supported;\r
71 BOOLEAN Sha384Supported;\r
72 BOOLEAN Sha512Supported;\r
73 BOOLEAN Sm3Supported;\r
74 UINT8 TpmDeviceInterfaceAttempt;\r
75 BOOLEAN TpmDeviceInterfacePtpFifoSupported;\r
76 BOOLEAN TpmDeviceInterfacePtpCrbSupported;\r
c41eeb44
JY
77} TCG2_CONFIGURATION_INFO;\r
78\r
1abfa4ce
JY
79//\r
80// Variable saved for S3, TPM detected, only valid in S3 path.\r
81// This variable is ReadOnly.\r
82//\r
83typedef struct {\r
84 UINT8 TpmDeviceDetected;\r
85} TCG2_DEVICE_DETECTION;\r
86\r
c41eeb44
JY
87#define TCG2_STORAGE_NAME L"TCG2_CONFIGURATION"\r
88#define TCG2_STORAGE_INFO_NAME L"TCG2_CONFIGURATION_INFO"\r
1abfa4ce
JY
89#define TCG2_DEVICE_DETECTION_NAME L"TCG2_DEVICE_DETECTION"\r
90\r
91#define TPM_INSTANCE_ID_LIST { \\r
92 {TPM_DEVICE_INTERFACE_NONE, TPM_DEVICE_NULL}, \\r
93 {TPM_DEVICE_INTERFACE_TPM12, TPM_DEVICE_1_2}, \\r
94 {TPM_DEVICE_INTERFACE_TPM20_DTPM, TPM_DEVICE_2_0_DTPM}, \\r
95}\r
96\r
97//\r
98// BUGBUG: In order to pass VfrCompiler, we have to redefine GUID here.\r
99//\r
100#ifndef __BASE_H__\r
101typedef struct {\r
102 UINT32 Data1;\r
103 UINT16 Data2;\r
104 UINT16 Data3;\r
105 UINT8 Data4[8];\r
106} GUID;\r
107#endif\r
108\r
109typedef struct {\r
110 GUID TpmInstanceGuid;\r
111 UINT8 TpmDevice;\r
112} TPM_INSTANCE_ID;\r
113\r
114#endif\r