]> git.proxmox.com Git - mirror_edk2.git/blob - SecurityPkg/Tcg/TrEEConfig/TrEEConfigNvData.h
Add TPM2 implementation.
[mirror_edk2.git] / SecurityPkg / Tcg / TrEEConfig / TrEEConfigNvData.h
1 /** @file
2 Header file for NV data structure definition.
3
4 Copyright (c) 2013, 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 __TREE_CONFIG_NV_DATA_H__
16 #define __TREE_CONFIG_NV_DATA_H__
17
18 #include <Guid/HiiPlatformSetupFormset.h>
19 #include <Guid/TrEEPhysicalPresenceData.h>
20 #include <Guid/TrEEConfigHii.h>
21
22 #define TREE_CONFIGURATION_VARSTORE_ID 0x0001
23 #define TREE_CONFIGURATION_FORM_ID 0x0001
24
25 #define KEY_TPM_DEVICE 0x2000
26
27 #define TPM_DEVICE_NULL 0
28 #define TPM_DEVICE_1_2 1
29 #define TPM_DEVICE_2_0_DTPM 2
30 #define TPM_DEVICE_MAX TPM_DEVICE_2_0_DTPM
31 #define TPM_DEVICE_DEFAULT TPM_DEVICE_1_2
32
33 //
34 // Nv Data structure referenced by IFR
35 //
36 typedef struct {
37 UINT8 TpmDevice;
38 UINT8 Tpm2Operation;
39 } TREE_CONFIGURATION;
40
41 #define TREE_STORAGE_NAME L"TREE_CONFIGURATION"
42
43 #define TPM_INSTANCE_ID_LIST { \
44 {TPM_DEVICE_INTERFACE_NONE, TPM_DEVICE_NULL}, \
45 {TPM_DEVICE_INTERFACE_TPM12, TPM_DEVICE_1_2}, \
46 {TPM_DEVICE_INTERFACE_TPM20_DTPM, TPM_DEVICE_2_0_DTPM}, \
47 }
48
49 //
50 // BUGBUG: In order to pass VfrCompiler, we have to redefine GUID here.
51 //
52 #ifndef __BASE_H__
53 typedef struct {
54 UINT32 Data1;
55 UINT16 Data2;
56 UINT16 Data3;
57 UINT8 Data4[8];
58 } GUID;
59 #endif
60
61 typedef struct {
62 GUID TpmInstanceGuid;
63 UINT8 TpmDevice;
64 } TPM_INSTANCE_ID;
65
66 #endif