microsoft/mu_feature_ffa

Public

mirrored from https://github.com/microsoft/mu_feature_ffaAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
89ca181ebb27a1bf7b8d4e233fb5945e10880437

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

FfaFeaturePkg/Include/Library/TpmServiceStateTranslationLib.h

97lines · modecode

1/** @file
2 Definitions for the TPM Service State Translation Library. This library's
3 main purpose is to translate the states of the TPM service's CRB states to
4 the main TPM's interface states. (i.e. TPM PC CRB -> TPM FIFO) A user of the
5 TPM service should only need to update this library with the proper TPM
6 interface type for their device.
7
8 Copyright (c), Microsoft Corporation.
9 SPDX-License-Identifier: BSD-2-Clause-Patent
10
11**/
12
13#ifndef TPM_SST_LIB_H_
14#define TPM_SST_LIB_H_
15
16#include <IndustryStandard/TpmPtp.h>
17
18/**
19 Initiates the transition to the Idle state
20
21 @param Locality The locality of the TPM to set into Idle
22
23 @retval EFI_SUCCESS Success
24 @retval EFI_TIMEOUT Timeout
25
26**/
27EFI_STATUS
28TpmSstGoIdle (
29 UINT8 Locality
30 );
31
32/**
33 Initiates the transition to the commandReady state
34
35 @param Locality The locality of the TPM to set to commandReady
36
37 @retval EFI_SUCCESS Success
38 @retval EFI_TIMEOUT Timeout
39
40**/
41EFI_STATUS
42TpmSstCmdReady (
43 UINT8 Locality
44 );
45
46/**
47 Initiates command execution
48
49 @param Locality The locality of the TPM to initiate the command on
50 @param InternalTpmCrb The internal CRB to copy command data from
51
52 @retval EFI_SUCCESS Success
53 @retval EFI_TIMEOUT Timeout
54
55**/
56EFI_STATUS
57TpmSstStart (
58 UINT8 Locality,
59 PTP_CRB_REGISTERS_PTR InternalTpmCrb
60 );
61
62/**
63 Requests access to the given locality
64
65 @param Locality The locality to request access to
66
67 @retval EFI_SUCCESS Success
68 @retval EFI_TIMEOUT Timeout
69
70**/
71EFI_STATUS
72TpmSstLocalityRequest (
73 UINT8 Locality
74 );
75
76/**
77 Returns if IdleBypass is supported
78
79 @retval TRUE Supported
80 @retval FALSE Unsupported
81
82**/
83BOOLEAN
84TpmSstIsIdleBypassSupported (
85 VOID
86 );
87
88/**
89 Initializes the TPM Service State Translation Library
90
91**/
92VOID
93TpmSstInit (
94 VOID
95 );
96
97#endif /* TPM_SST_LIB_H_ */
98