1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
//*************************************************************************
//*************************************************************************
//** **
//** (C)Copyright 1985-2010, American Megatrends, Inc. **
//** **
//** All Rights Reserved. **
//** **
//** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 **
//** **
//** Phone: (770)-246-8600 **
//** **
//*************************************************************************
//*************************************************************************
//*************************************************************************
// $Header: /Alaska/SOURCE/Modules/TCG2/Common/Tpm20PlatformDxe/Tpm20Acpi/Tpm20Acpi.h 1 4/21/14 2:19p Fredericko $
//
// $Revision: 1 $
//
// $Date: 4/21/14 2:19p $
//*************************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/TCG2/Common/Tpm20PlatformDxe/Tpm20Acpi/Tpm20Acpi.h $
//
// 1 4/21/14 2:19p Fredericko
//
// 1 10/08/13 12:06p Fredericko
// Initial Check-In for Tpm-Next module
//
// 1 7/10/13 5:58p Fredericko
// [TAG] EIP120969
// [Category] New Feature
// [Description] TCG (TPM20)
//
//
//*************************************************************************
//<AMI_FHDR_START>
//
// Name:
//
// Description:
//
//<AMI_FHDR_END>
//*************************************************************************
#ifndef _TPM20ACPI_H_
#define _TPM20ACPI_H_
#include <Efi.h>
#include <Protocol\AcpiTable.h>
#include <Hob.h>
#define ME_DATA_HOB_GUID \
{ 0x1e94f097, 0x5acd, 0x4089, 0xb2, 0xe3, 0xb9, 0xa5, 0xc8, 0x79, 0xa7, 0x0c }
#define INTERNAL_NVS_AREA_PROTOCOL_GUID \
{ \
0x74e1e48, 0x8132, 0x47a1, 0x8c, 0x2c, 0x3f, 0x14, 0xad, 0x9a, 0x66, 0xdc \
}
#define EFI_SIGNATURE_16(A, B) ((A) | (B << 8))
#define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))
#ifndef EFI_ACPI_5_0_TRUSTED_COMPUTING_PLATFORM_2_TABLE_SIGNATURE
#define EFI_ACPI_5_0_TRUSTED_COMPUTING_PLATFORM_2_TABLE_SIGNATURE EFI_SIGNATURE_32('T', 'P', 'M', '2')
#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) \
(EFI_SIGNATURE_32 (A, B, C, D) | ((UINT64) (EFI_SIGNATURE_32 (E, F, G, H)) << 32))
#endif
#define TPM20TABLEOEMREVISION 1
#define CREATOR_ID_AMI 0x20494D41 //" IMA""AMI "(AMI)
#define EFI_TPM2_ACPI_TABLE_START_METHOD_ACPI 2
#define EFI_TPM2_ACPI_TABLE_REVISION 3
#pragma pack (1)
typedef struct {
UINT32 Signature;
UINT32 Length;
UINT8 Revision;
UINT8 Checksum;
UINT8 OemId[6];
UINT64 OemTableId;
UINT32 OemRevision;
UINT32 CreatorId;
UINT32 CreatorRevision;
} EFI_ACPI_DESCRIPTION_HEADER;
typedef struct {
EFI_ACPI_DESCRIPTION_HEADER Header;
UINT32 Flags;
UINT64 AddressOfControlArea;
UINT32 StartMethod;
} EFI_TPM2_ACPI_TABLE;
typedef struct {
UINT32 Reserved;
UINT32 Error;
UINT32 Cancel;
UINT32 Start;
UINT64 InterruptControl;
UINT32 CommandSize;
UINT64 Command;
UINT32 ResponseSize;
UINT64 Response;
} EFI_TPM2_ACPI_CONTROL_AREA;
typedef struct {
UINT64 BufferAddress;
}INTEL_PTT_HOB_DATA;
#pragma pack ()
#define GET_HOB_TYPE( Hob ) ((Hob).Header->HobType)
#define GET_HOB_LENGTH( Hob ) ((Hob).Header->HobLength)
#define GET_NEXT_HOB( Hob ) ((Hob).Raw + GET_HOB_LENGTH( Hob ))
#define END_OF_HOB_LIST( Hob ) (GET_HOB_TYPE( Hob ) ==\
EFI_HOB_TYPE_END_OF_HOB_LIST)
EFI_STATUS GetNextGuidHob(
IN OUT VOID **HobStart,
IN EFI_GUID * Guid,
OUT VOID **Buffer,
OUT UINTN *BufferSize OPTIONAL );
#endif
//**********************************************************************
//**********************************************************************
//** **
//** (C)Copyright 1985-2005, American Megatrends, Inc. **
//** **
//** All Rights Reserved. **
//** **
//** 6145-F Northbelt Pkwy, Norcross, GA 30071 **
//** **
//** Phone: (770)-246-8600 **
//** **
//**********************************************************************
//**********************************************************************
|