TianoCore EDK2 master
Loading...
Searching...
No Matches
Tpm2DeviceLibDTpmStandaloneMm.c
Go to the documentation of this file.
1
11
12#include "Tpm2DeviceLibDTpm.h"
13
14TPM2_PTP_INTERFACE_TYPE mActiveTpmInterfaceType;
15UINT8 mCRBIdleByPass;
16
22UINT8
24 VOID
25 )
26{
27 return mCRBIdleByPass;
28}
29
35TPM2_PTP_INTERFACE_TYPE
37 VOID
38 )
39{
40 return mActiveTpmInterfaceType;
41}
42
50 VOID
51 )
52{
53 mActiveTpmInterfaceType = 0xFF;
54 mCRBIdleByPass = 0xFF;
55
56 //
57 // Always cache current active TpmInterfaceType for StandaloneMm implementation
58 //
59 mActiveTpmInterfaceType = Tpm2GetPtpInterface ((VOID *)(UINTN)PcdGet64 (PcdTpmBaseAddress));
60
61 if (mActiveTpmInterfaceType == Tpm2PtpInterfaceCrb) {
62 mCRBIdleByPass = Tpm2GetIdleByPass ((VOID *)(UINTN)PcdGet64 (PcdTpmBaseAddress));
63 }
64
65 return EFI_SUCCESS;
66}
UINT64 UINTN
#define PcdGet64(TokenName)
Definition: PcdLib.h:375
UINT8 Tpm2GetIdleByPass(IN VOID *Register)
Definition: Tpm2Ptp.c:482
TPM2_PTP_INTERFACE_TYPE Tpm2GetPtpInterface(IN VOID *Register)
Definition: Tpm2Ptp.c:435
TPM2_PTP_INTERFACE_TYPE GetCachedPtpInterface(VOID)
EFI_STATUS InternalTpm2DeviceLibDTpmCommonConstructor(VOID)
UINT8 GetCachedIdleByPass(VOID)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112