summaryrefslogtreecommitdiff
path: root/Core/EM/TCG2/Common/PPI/TpmDevice/TpmDevice.h
blob: 08b4b434ddfb246ba34685a881bc4a7f98cf21cd (plain)
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2013, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**     5555 Oakbrook Pkwy, Suite 200, Norcross, GA 30093            **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************
/*++

   Copyright (c)  2005 Intel Corporation. All rights reserved
   This software and associated documentation (if any) is furnished
   under a license and may only be used or copied in accordance
   with the terms of the license. Except as permitted by such
   license, no part of this software or documentation may be
   reproduced, stored in a retrieval system, or transmitted in any
   form or by any means without the express written consent of
   Intel Corporation.

   Abstract:

   TPM PPI as defined in EFI 2.0

   --*/
//*************************************************************************
// $Header: /Alaska/SOURCE/Modules/TCG2/CommonHeaders/TpmDevice_PPI/TpmDevice/TpmDevice.h 1     4/21/14 2:15p Fredericko $
//
// $Revision: 1 $
//
// $Date: 4/21/14 2:15p $
//*************************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/TCG2/CommonHeaders/TpmDevice_PPI/TpmDevice/TpmDevice.h $
// 
// 1     4/21/14 2:15p Fredericko
// 
// 1     10/08/13 12:01p Fredericko
// Initial Check-In for Tpm-Next module
// 
// 1     7/10/13 5:59p Fredericko
// [TAG]  		EIP120969
// [Category]  	New Feature
// [Description]  	TCG (TPM20)
// 
// 8     3/31/13 6:42p Fredericko
// [TAG]  		EIP113715
// [Category]  	Improvement
// [Description]  	Please update the copyright header according to AMI
// copyright rule
// [Files]  		Multiple Files
// 
// 7     3/29/11 3:09p Fredericko
// 
// 6     3/28/11 3:25p Fredericko
// [TAG]        EIP 54642
// [Category] Improvement
// [Description] 1. Checkin Files related to TCG function override 
// 2. Include TCM and TPM auto detection
// [Files] Affects all TCG files
// 
// 5     5/20/10 8:45a Fredericko
// Included File Header
// Included File Revision History 
// EIP 37653
//
//*************************************************************************
//*************************************************************************
//<AMI_FHDR_START>
//
// Name:  TpmDevice.h
//
// Description: 
//  Header file for TpmDevice.c[Ppi]
//
//<AMI_FHDR_END>
//*************************************************************************
#ifndef _PEI_TPMDEVICE_H_
#define _PEI_TPMDEVICE_H_

#include <TcgEfiTpm.h>
#include <TcgEfi12.h>

#define PEI_TPM_PPI_GUID \
    {0xca4853f4, 0xe94b, 0x42b4, 0x86, 0x42, 0xcd, 0xe2, 0x8a, 0x7f, 0xac, 0x2d}

#define TPM_DEACTIVATED_VARIABLE_NAME \
    L"IsTpmDeactivated"

struct _PEI_TPM_PPI;
typedef struct _PEI_TPM_PPI PEI_TPM_PPI;

typedef
EFI_STATUS
(EFIAPI * PEI_TPM_INIT)(
    IN PEI_TPM_PPI      *This,
    IN EFI_PEI_SERVICES **PeiServices
    );

typedef
EFI_STATUS
(EFIAPI * PEI_TPM_CLOSE)(
    IN PEI_TPM_PPI      *This,
    IN EFI_PEI_SERVICES **PeiServices
    );

typedef
EFI_STATUS
(EFIAPI * PEI_TPM_GET_STATUS_INFO)(
    IN PEI_TPM_PPI      *This,
    IN EFI_PEI_SERVICES **PeiServices
    );


VOID FillDriverLoc (
    UINT32           * Offset,
    EFI_PEI_SERVICES **ps,
    EFI_GUID         *Driveguid );

VOID MAFillDriverLoc (
    MASTRUCT         *Data,
    EFI_PEI_SERVICES **ps,
    EFI_GUID         *Driveguid );

EFI_STATUS FillDriverLocByFile (
    UINT32           * Offset,
    EFI_PEI_SERVICES **ps,
    EFI_GUID         *Driveguid,
    void             **MAStart,
    UINTN            *MASize );


EFI_STATUS
EFIAPI TpmPeiEntry (
    IN EFI_FFS_FILE_HEADER *FfsHeader,
    IN EFI_PEI_SERVICES    **PeiServices );


typedef
EFI_STATUS
(EFIAPI * PEI_TPM_TRANSMIT)(
    IN PEI_TPM_PPI             *This,
    IN EFI_PEI_SERVICES        **PeiServices,
    IN UINTN                   NoInputBuffers,
    IN TPM_TRANSMIT_BUFFER     *InputBuffers,
    IN UINTN                   NoOutputBuffers,
    IN OUT TPM_TRANSMIT_BUFFER *OutputBuffers
    );

typedef struct _PEI_TPM_PPI
{
    PEI_TPM_INIT            Init;
    PEI_TPM_CLOSE           Close;
    PEI_TPM_GET_STATUS_INFO GetStatusInfo;
    PEI_TPM_TRANSMIT        Transmit;
} PEI_TPM_PPI;

extern EFI_GUID gPeiTpmPpiGuid;

#endif

//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2013, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**     5555 Oakbrook Pkwy, Suite 200, Norcross, GA 30093            **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************