microsoft/mu_feature_ffa

Public

mirrored fromhttps://github.com/microsoft/mu_feature_ffaAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.1.4

Branches

Tags

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

Clone

HTTPS

Download ZIP

FfaFeaturePkg/Include/Library/TpmServiceStateTranslationLib.h

111lines · 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 Relinquish access to the given locality
78
79 @param Locality The locality to relinquish access to
80
81 @retval EFI_SUCCESS Success
82 @retval EFI_TIMEOUT Timeout
83
84**/
85EFI_STATUS
86TpmSstLocalityRelinquish (
87 UINT8 Locality
88 );
89
90/**
91 Returns if IdleBypass is supported
92
93 @retval TRUE Supported
94 @retval FALSE Unsupported
95
96**/
97BOOLEAN
98TpmSstIsIdleBypassSupported (
99 VOID
100 );
101
102/**
103 Initializes the TPM Service State Translation Library
104
105**/
106VOID
107TpmSstInit (
108 VOID
109 );
110
111#endif /* TPM_SST_LIB_H_ */
112