TianoCore EDK2 master
Loading...
Searching...
No Matches
Tpm2Ptp.c
Go to the documentation of this file.
1
11
12#include <Library/BaseLib.h>
14#include <Library/IoLib.h>
15#include <Library/TimerLib.h>
16#include <Library/DebugLib.h>
18#include <Library/PcdLib.h>
19
22
23#include "Tpm2DeviceLibDTpm.h"
24
25//
26// Execution of the command may take from several seconds to minutes for certain
27// commands, such as key generation.
28//
29#define PTP_TIMEOUT_MAX (90000 * 1000) // 90s
30
31//
32// Max TPM command/response length
33//
34#define TPMCMDBUFLENGTH 0x500
35
36//
37// Max retry count according to Spec TCG PC Client Device Driver Design Principles
38// for TPM2.0, Version 1.1, Revision 0.04, Section 7.2.1
39//
40#define RETRY_CNT_MAX 3
41
50BOOLEAN
52 IN VOID *Reg
53 )
54{
55 UINT8 RegRead;
56
57 RegRead = MmioRead8 ((UINTN)Reg);
58 if (RegRead == 0xFF) {
59 //
60 // No TPM chip
61 //
62 return FALSE;
63 }
64
65 return TRUE;
66}
67
81 IN UINT32 *Register,
82 IN UINT32 BitSet,
83 IN UINT32 BitClear,
84 IN UINT32 TimeOut
85 )
86{
87 UINT32 RegRead;
88 UINT32 WaitTime;
89
90 for (WaitTime = 0; WaitTime < TimeOut; WaitTime += 30) {
91 RegRead = MmioRead32 ((UINTN)Register);
92 if (((RegRead & BitSet) == BitSet) && ((RegRead & BitClear) == 0)) {
93 return EFI_SUCCESS;
94 }
95
97 }
98
99 return EFI_TIMEOUT;
100}
101
115 )
116{
117 EFI_STATUS Status;
118
119 if (!Tpm2IsPtpPresence (CrbReg)) {
120 return EFI_NOT_FOUND;
121 }
122
123 MmioWrite32 ((UINTN)&CrbReg->LocalityControl, PTP_CRB_LOCALITY_CONTROL_REQUEST_ACCESS);
124 Status = PtpCrbWaitRegisterBits (
125 &CrbReg->LocalityStatus,
127 0,
128 PTP_TIMEOUT_A
129 );
130 return Status;
131}
132
151 IN UINT8 *BufferIn,
152 IN UINT32 SizeIn,
153 IN OUT UINT8 *BufferOut,
154 IN OUT UINT32 *SizeOut
155 )
156{
157 EFI_STATUS Status;
158 UINT32 Index;
159 UINT32 TpmOutSize;
160 UINT16 Data16;
161 UINT32 Data32;
162 UINT8 RetryCnt;
163
165 UINTN DebugSize;
166
167 DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Send - "));
168 if (SizeIn > 0x100) {
169 DebugSize = 0x40;
170 } else {
171 DebugSize = SizeIn;
172 }
173
174 for (Index = 0; Index < DebugSize; Index++) {
175 DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index]));
176 }
177
178 if (DebugSize != SizeIn) {
179 DEBUG ((DEBUG_VERBOSE, "...... "));
180 for (Index = SizeIn - 0x20; Index < SizeIn; Index++) {
181 DEBUG ((DEBUG_VERBOSE, "%02x ", BufferIn[Index]));
182 }
183 }
184
185 DEBUG ((DEBUG_VERBOSE, "\n"));
187 TpmOutSize = 0;
188
189 RetryCnt = 0;
190 while (TRUE) {
191 //
192 // STEP 0:
193 // if CapCRbIdelByPass == 0, enforce Idle state before sending command
194 //
195 if ((GetCachedIdleByPass () == 0) && ((MmioRead32 ((UINTN)&CrbReg->CrbControlStatus) & PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE) == 0)) {
196 Status = PtpCrbWaitRegisterBits (
197 &CrbReg->CrbControlStatus,
199 0,
200 PTP_TIMEOUT_C
201 );
202 if (EFI_ERROR (Status)) {
203 RetryCnt++;
204 if (RetryCnt < RETRY_CNT_MAX) {
205 MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE);
206 continue;
207 } else {
208 //
209 // Try to goIdle to recover TPM
210 //
211 Status = EFI_DEVICE_ERROR;
212 goto GoIdle_Exit;
213 }
214 }
215 }
216
217 //
218 // STEP 1:
219 // Ready is any time the TPM is ready to receive a command, following a write
220 // of 1 by software to Request.cmdReady, as indicated by the Status field
221 // being cleared to 0.
222 //
223 MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY);
224 Status = PtpCrbWaitRegisterBits (
225 &CrbReg->CrbControlRequest,
226 0,
228 PTP_TIMEOUT_C
229 );
230 if (EFI_ERROR (Status)) {
231 RetryCnt++;
232 if (RetryCnt < RETRY_CNT_MAX) {
233 MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE);
234 continue;
235 } else {
236 Status = EFI_DEVICE_ERROR;
237 goto GoIdle_Exit;
238 }
239 }
240
241 Status = PtpCrbWaitRegisterBits (
242 &CrbReg->CrbControlStatus,
243 0,
245 PTP_TIMEOUT_C
246 );
247 if (EFI_ERROR (Status)) {
248 RetryCnt++;
249 if (RetryCnt < RETRY_CNT_MAX) {
250 MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE);
251 continue;
252 } else {
253 Status = EFI_DEVICE_ERROR;
254 goto GoIdle_Exit;
255 }
256 }
257
258 break;
259 }
260
261 //
262 // STEP 2:
263 // Command Reception occurs following a Ready state between the write of the
264 // first byte of a command to the Command Buffer and the receipt of a write
265 // of 1 to Start.
266 //
267 for (Index = 0; Index < SizeIn; Index++) {
268 MmioWrite8 ((UINTN)&CrbReg->CrbDataBuffer[Index], BufferIn[Index]);
269 }
270
271 MmioWrite32 ((UINTN)&CrbReg->CrbControlCommandAddressHigh, (UINT32)RShiftU64 ((UINTN)CrbReg->CrbDataBuffer, 32));
272 MmioWrite32 ((UINTN)&CrbReg->CrbControlCommandAddressLow, (UINT32)(UINTN)CrbReg->CrbDataBuffer);
273 MmioWrite32 ((UINTN)&CrbReg->CrbControlCommandSize, sizeof (CrbReg->CrbDataBuffer));
274
275 MmioWrite64 ((UINTN)&CrbReg->CrbControlResponseAddrss, (UINT32)(UINTN)CrbReg->CrbDataBuffer);
276 MmioWrite32 ((UINTN)&CrbReg->CrbControlResponseSize, sizeof (CrbReg->CrbDataBuffer));
277
278 //
279 // STEP 3:
280 // Command Execution occurs after receipt of a 1 to Start and the TPM
281 // clearing Start to 0.
282 //
283 MmioWrite32 ((UINTN)&CrbReg->CrbControlStart, PTP_CRB_CONTROL_START);
284 Status = PtpCrbWaitRegisterBits (
285 &CrbReg->CrbControlStart,
286 0,
288 PTP_TIMEOUT_MAX
289 );
290 if (EFI_ERROR (Status)) {
291 //
292 // Command Completion check timeout. Cancel the currently executing command by writing TPM_CRB_CTRL_CANCEL,
293 // Expect TPM_RC_CANCELLED or successfully completed response.
294 //
295 MmioWrite32 ((UINTN)&CrbReg->CrbControlCancel, PTP_CRB_CONTROL_CANCEL);
296 Status = PtpCrbWaitRegisterBits (
297 &CrbReg->CrbControlStart,
298 0,
300 PTP_TIMEOUT_B
301 );
302 MmioWrite32 ((UINTN)&CrbReg->CrbControlCancel, 0);
303
304 if (EFI_ERROR (Status)) {
305 //
306 // Still in Command Execution state. Try to goIdle, the behavior is agnostic.
307 //
308 Status = EFI_DEVICE_ERROR;
309 goto GoIdle_Exit;
310 }
311 }
312
313 //
314 // STEP 4:
315 // Command Completion occurs after completion of a command (indicated by the
316 // TPM clearing TPM_CRB_CTRL_Start_x to 0) and before a write of a 1 by the
317 // software to Request.goIdle.
318 //
319
320 //
321 // Get response data header
322 //
323 for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
324 BufferOut[Index] = MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]);
325 }
326
328 DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand ReceiveHeader - "));
329 for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
330 DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
331 }
332
333 DEBUG ((DEBUG_VERBOSE, "\n"));
335 //
336 // Check the response data header (tag, parasize and returncode)
337 //
338 CopyMem (&Data16, BufferOut, sizeof (UINT16));
339 // TPM2 should not use this RSP_COMMAND
340 if (SwapBytes16 (Data16) == TPM_ST_RSP_COMMAND) {
341 DEBUG ((DEBUG_ERROR, "TPM2: TPM_ST_RSP error - %x\n", TPM_ST_RSP_COMMAND));
342 Status = EFI_UNSUPPORTED;
343 goto GoIdle_Exit;
344 }
345
346 CopyMem (&Data32, (BufferOut + 2), sizeof (UINT32));
347 TpmOutSize = SwapBytes32 (Data32);
348 if (*SizeOut < TpmOutSize) {
349 //
350 // Command completed, but buffer is not enough
351 //
352 Status = EFI_BUFFER_TOO_SMALL;
353 goto GoIdle_Exit;
354 }
355
356 *SizeOut = TpmOutSize;
357 //
358 // Continue reading the remaining data
359 //
360 for (Index = sizeof (TPM2_RESPONSE_HEADER); Index < TpmOutSize; Index++) {
361 BufferOut[Index] = MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]);
362 }
363
365 DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Receive - "));
366 for (Index = 0; Index < TpmOutSize; Index++) {
367 DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
368 }
369
370 DEBUG ((DEBUG_VERBOSE, "\n"));
372
373 //
374 // Do not wait for state transition for TIMEOUT_C
375 // This function will try to wait 2 TIMEOUT_C at the beginning in next call.
376 //
377GoIdle_Exit:
378
379 //
380 // Return to Idle state by setting TPM_CRB_CTRL_STS_x.Status.goIdle to 1.
381 //
382 MmioWrite32 ((UINTN)&CrbReg->CrbControlRequest, PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE);
383
384 return Status;
385}
386
405 IN UINT8 *BufferIn,
406 IN UINT32 SizeIn,
407 IN OUT UINT8 *BufferOut,
408 IN OUT UINT32 *SizeOut
409 );
410
425 );
426
434TPM2_PTP_INTERFACE_TYPE
436 IN VOID *Register
437 )
438{
440 PTP_FIFO_INTERFACE_CAPABILITY InterfaceCapability;
441
443 return Tpm2PtpInterfaceMax;
444 }
445
446 //
447 // Check interface id
448 //
449 InterfaceId.Uint32 = MmioRead32 ((UINTN)&((PTP_CRB_REGISTERS *)Register)->InterfaceId);
450 InterfaceCapability.Uint32 = MmioRead32 ((UINTN)&((PTP_FIFO_REGISTERS *)Register)->InterfaceCapability);
451
452 if ((InterfaceId.Bits.InterfaceType == PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_CRB) &&
453 (InterfaceId.Bits.InterfaceVersion == PTP_INTERFACE_IDENTIFIER_INTERFACE_VERSION_CRB) &&
454 (InterfaceId.Bits.CapCRB != 0))
455 {
456 return Tpm2PtpInterfaceCrb;
457 }
458
459 if ((InterfaceId.Bits.InterfaceType == PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_FIFO) &&
460 (InterfaceId.Bits.InterfaceVersion == PTP_INTERFACE_IDENTIFIER_INTERFACE_VERSION_FIFO) &&
461 (InterfaceId.Bits.CapFIFO != 0) &&
462 (InterfaceCapability.Bits.InterfaceVersion == INTERFACE_CAPABILITY_INTERFACE_VERSION_PTP))
463 {
464 return Tpm2PtpInterfaceFifo;
465 }
466
467 if (InterfaceId.Bits.InterfaceType == PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_TIS) {
468 return Tpm2PtpInterfaceTis;
469 }
470
471 return Tpm2PtpInterfaceMax;
472}
473
481UINT8
483 IN VOID *Register
484 )
485{
487
488 //
489 // Check interface id
490 //
491 InterfaceId.Uint32 = MmioRead32 ((UINTN)&((PTP_CRB_REGISTERS *)Register)->InterfaceId);
492
493 return (UINT8)(InterfaceId.Bits.CapCRBIdleBypass);
494}
495
501VOID
503 IN VOID *Register
504 )
505{
507 PTP_FIFO_INTERFACE_CAPABILITY InterfaceCapability;
508 UINT8 StatusEx;
509 UINT16 Vid;
510 UINT16 Did;
511 UINT8 Rid;
512 TPM2_PTP_INTERFACE_TYPE PtpInterface;
513
515 return;
516 }
517
518 InterfaceId.Uint32 = MmioRead32 ((UINTN)&((PTP_CRB_REGISTERS *)Register)->InterfaceId);
519 InterfaceCapability.Uint32 = MmioRead32 ((UINTN)&((PTP_FIFO_REGISTERS *)Register)->InterfaceCapability);
520 StatusEx = MmioRead8 ((UINTN)&((PTP_FIFO_REGISTERS *)Register)->StatusEx);
521
522 //
523 // Dump InterfaceId Register for PTP
524 //
525 DEBUG ((DEBUG_INFO, "InterfaceId - 0x%08x\n", InterfaceId.Uint32));
526 DEBUG ((DEBUG_INFO, " InterfaceType - 0x%02x\n", InterfaceId.Bits.InterfaceType));
527 if (InterfaceId.Bits.InterfaceType != PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_TIS) {
528 DEBUG ((DEBUG_INFO, " InterfaceVersion - 0x%02x\n", InterfaceId.Bits.InterfaceVersion));
529 DEBUG ((DEBUG_INFO, " CapFIFO - 0x%x\n", InterfaceId.Bits.CapFIFO));
530 DEBUG ((DEBUG_INFO, " CapCRB - 0x%x\n", InterfaceId.Bits.CapCRB));
531 }
532
533 //
534 // Dump Capability Register for TIS and FIFO
535 //
536 DEBUG ((DEBUG_INFO, "InterfaceCapability - 0x%08x\n", InterfaceCapability.Uint32));
537 if ((InterfaceId.Bits.InterfaceType == PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_TIS) ||
538 (InterfaceId.Bits.InterfaceType == PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_FIFO))
539 {
540 DEBUG ((DEBUG_INFO, " InterfaceVersion - 0x%x\n", InterfaceCapability.Bits.InterfaceVersion));
541 }
542
543 //
544 // Dump StatusEx Register for PTP FIFO
545 //
546 DEBUG ((DEBUG_INFO, "StatusEx - 0x%02x\n", StatusEx));
547 if (InterfaceCapability.Bits.InterfaceVersion == INTERFACE_CAPABILITY_INTERFACE_VERSION_PTP) {
548 DEBUG ((DEBUG_INFO, " TpmFamily - 0x%x\n", (StatusEx & PTP_FIFO_STS_EX_TPM_FAMILY) >> PTP_FIFO_STS_EX_TPM_FAMILY_OFFSET));
549 }
550
551 Vid = 0xFFFF;
552 Did = 0xFFFF;
553 Rid = 0xFF;
554 PtpInterface = GetCachedPtpInterface ();
555 DEBUG ((DEBUG_INFO, "PtpInterface - %x\n", PtpInterface));
556 switch (PtpInterface) {
557 case Tpm2PtpInterfaceCrb:
558 Vid = MmioRead16 ((UINTN)&((PTP_CRB_REGISTERS *)Register)->Vid);
559 Did = MmioRead16 ((UINTN)&((PTP_CRB_REGISTERS *)Register)->Did);
560 Rid = (UINT8)InterfaceId.Bits.Rid;
561 break;
562 case Tpm2PtpInterfaceFifo:
563 case Tpm2PtpInterfaceTis:
564 Vid = MmioRead16 ((UINTN)&((PTP_FIFO_REGISTERS *)Register)->Vid);
565 Did = MmioRead16 ((UINTN)&((PTP_FIFO_REGISTERS *)Register)->Did);
566 Rid = MmioRead8 ((UINTN)&((PTP_FIFO_REGISTERS *)Register)->Rid);
567 break;
568 default:
569 break;
570 }
571
572 DEBUG ((DEBUG_INFO, "VID - 0x%04x\n", Vid));
573 DEBUG ((DEBUG_INFO, "DID - 0x%04x\n", Did));
574 DEBUG ((DEBUG_INFO, "RID - 0x%02x\n", Rid));
575}
576
590EFIAPI
592 IN UINT32 InputParameterBlockSize,
593 IN UINT8 *InputParameterBlock,
594 IN OUT UINT32 *OutputParameterBlockSize,
595 IN UINT8 *OutputParameterBlock
596 )
597{
598 TPM2_PTP_INTERFACE_TYPE PtpInterface;
599
600 PtpInterface = GetCachedPtpInterface ();
601 switch (PtpInterface) {
602 case Tpm2PtpInterfaceCrb:
603 return PtpCrbTpmCommand (
604 (PTP_CRB_REGISTERS_PTR)(UINTN)PcdGet64 (PcdTpmBaseAddress),
605 InputParameterBlock,
606 InputParameterBlockSize,
607 OutputParameterBlock,
608 OutputParameterBlockSize
609 );
610 case Tpm2PtpInterfaceFifo:
611 case Tpm2PtpInterfaceTis:
612 return Tpm2TisTpmCommand (
613 (TIS_PC_REGISTERS_PTR)(UINTN)PcdGet64 (PcdTpmBaseAddress),
614 InputParameterBlock,
615 InputParameterBlockSize,
616 OutputParameterBlock,
617 OutputParameterBlockSize
618 );
619 default:
620 return EFI_NOT_FOUND;
621 }
622}
623
632EFIAPI
634 VOID
635 )
636{
637 TPM2_PTP_INTERFACE_TYPE PtpInterface;
638
639 PtpInterface = GetCachedPtpInterface ();
640 switch (PtpInterface) {
641 case Tpm2PtpInterfaceCrb:
642 return PtpCrbRequestUseTpm ((PTP_CRB_REGISTERS_PTR)(UINTN)PcdGet64 (PcdTpmBaseAddress));
643 case Tpm2PtpInterfaceFifo:
644 case Tpm2PtpInterfaceTis:
645 return TisPcRequestUseTpm ((TIS_PC_REGISTERS_PTR)(UINTN)PcdGet64 (PcdTpmBaseAddress));
646 default:
647 return EFI_NOT_FOUND;
648 }
649}
UINT64 UINTN
UINTN EFIAPI MicroSecondDelay(IN UINTN MicroSeconds)
UINT16 EFIAPI SwapBytes16(IN UINT16 Value)
Definition: SwapBytes16.c:25
UINT32 EFIAPI SwapBytes32(IN UINT32 Value)
Definition: SwapBytes32.c:25
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: RShiftU64.c:28
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
UINT64 EFIAPI MmioWrite64(IN UINTN Address, IN UINT64 Value)
Definition: IoLib.c:400
UINT16 EFIAPI MmioRead16(IN UINTN Address)
Definition: IoLib.c:170
UINT8 EFIAPI MmioRead8(IN UINTN Address)
Definition: IoLib.c:82
UINT8 EFIAPI MmioWrite8(IN UINTN Address, IN UINT8 Value)
Definition: IoLib.c:126
UINT32 EFIAPI MmioRead32(IN UINTN Address)
Definition: IoLib.c:262
UINT32 EFIAPI MmioWrite32(IN UINTN Address, IN UINT32 Value)
Definition: IoLib.c:309
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define DEBUG_CODE_BEGIN()
Definition: DebugLib.h:564
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define DEBUG_CODE_END()
Definition: DebugLib.h:578
#define PcdGet64(TokenName)
Definition: PcdLib.h:375
EFI_STATUS EFIAPI Register(IN EFI_PEI_RSC_HANDLER_CALLBACK Callback)
TPM2_PTP_INTERFACE_TYPE GetCachedPtpInterface(VOID)
UINT8 GetCachedIdleByPass(VOID)
UINT8 Tpm2GetIdleByPass(IN VOID *Register)
Definition: Tpm2Ptp.c:482
EFI_STATUS Tpm2TisTpmCommand(IN TIS_PC_REGISTERS_PTR TisReg, IN UINT8 *BufferIn, IN UINT32 SizeIn, IN OUT UINT8 *BufferOut, IN OUT UINT32 *SizeOut)
Definition: Tpm2Tis.c:210
TPM2_PTP_INTERFACE_TYPE Tpm2GetPtpInterface(IN VOID *Register)
Definition: Tpm2Ptp.c:435
EFI_STATUS EFIAPI DTpm2SubmitCommand(IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, IN OUT UINT32 *OutputParameterBlockSize, IN UINT8 *OutputParameterBlock)
Definition: Tpm2Ptp.c:591
EFI_STATUS TisPcRequestUseTpm(IN TIS_PC_REGISTERS_PTR TisReg)
Definition: Tpm2Tis.c:170
VOID DumpPtpInfo(IN VOID *Register)
Definition: Tpm2Ptp.c:502
BOOLEAN Tpm2IsPtpPresence(IN VOID *Reg)
Definition: Tpm2Ptp.c:51
EFI_STATUS EFIAPI DTpm2RequestUseTpm(VOID)
Definition: Tpm2Ptp.c:633
EFI_STATUS PtpCrbWaitRegisterBits(IN UINT32 *Register, IN UINT32 BitSet, IN UINT32 BitClear, IN UINT32 TimeOut)
Definition: Tpm2Ptp.c:80
EFI_STATUS PtpCrbRequestUseTpm(IN PTP_CRB_REGISTERS_PTR CrbReg)
Definition: Tpm2Ptp.c:113
EFI_STATUS PtpCrbTpmCommand(IN PTP_CRB_REGISTERS_PTR CrbReg, IN UINT8 *BufferIn, IN UINT32 SizeIn, IN OUT UINT8 *BufferOut, IN OUT UINT32 *SizeOut)
Definition: Tpm2Ptp.c:149
#define PTP_CRB_CONTROL_START
Definition: TpmPtp.h:500
#define PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE
Definition: TpmPtp.h:471
#define PTP_CRB_LOCALITY_STATUS_GRANTED
Definition: TpmPtp.h:439
#define PTP_CRB_CONTROL_CANCEL
Definition: TpmPtp.h:489
#define PTP_INTERFACE_IDENTIFIER_INTERFACE_VERSION_FIFO
Definition: TpmPtp.h:357
#define PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY
Definition: TpmPtp.h:459
#define PTP_INTERFACE_IDENTIFIER_INTERFACE_TYPE_FIFO
Definition: TpmPtp.h:350
#define PTP_CRB_LOCALITY_CONTROL_REQUEST_ACCESS
Definition: TpmPtp.h:423
#define PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE
Definition: TpmPtp.h:451
#define PTP_FIFO_STS_EX_TPM_FAMILY
Definition: TpmPtp.h:222
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112