TianoCore EDK2 master
Loading...
Searching...
No Matches
Tpm2InstanceLibDTpm.c
Go to the documentation of this file.
1
11#include <Library/BaseLib.h>
13#include <Library/DebugLib.h>
15#include <Library/PcdLib.h>
16
17#include <Guid/TpmInstance.h>
18
19#include "Tpm2DeviceLibDTpm.h"
20
26VOID
28 IN VOID *Register
29 );
30
44EFIAPI
46 IN UINT32 InputParameterBlockSize,
47 IN UINT8 *InputParameterBlock,
48 IN OUT UINT32 *OutputParameterBlockSize,
49 IN UINT8 *OutputParameterBlock
50 );
51
60EFIAPI
62 VOID
63 );
64
65TPM2_DEVICE_INTERFACE mDTpm2InternalTpm2Device = {
66 TPM_DEVICE_INTERFACE_TPM20_DTPM,
69};
70
77EFIAPI
79 VOID
80 )
81{
82 EFI_STATUS Status;
83
84 Status = Tpm2RegisterTpm2DeviceLib (&mDTpm2InternalTpm2Device);
85 if ((Status == EFI_SUCCESS) || (Status == EFI_UNSUPPORTED)) {
86 //
87 // Unsupported means platform policy does not need this instance enabled.
88 //
89 if (Status == EFI_SUCCESS) {
91 DumpPtpInfo ((VOID *)(UINTN)PcdGet64 (PcdTpmBaseAddress));
92 }
93
94 return EFI_SUCCESS;
95 }
96
97 return Status;
98}
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define PcdGet64(TokenName)
Definition: PcdLib.h:375
EFI_STATUS EFIAPI Register(IN EFI_PEI_RSC_HANDLER_CALLBACK Callback)
EFI_STATUS EFIAPI Tpm2RegisterTpm2DeviceLib(IN TPM2_DEVICE_INTERFACE *Tpm2Device)
EFI_STATUS InternalTpm2DeviceLibDTpmCommonConstructor(VOID)
EFI_STATUS EFIAPI Tpm2InstanceLibDTpmConstructor(VOID)
EFI_STATUS EFIAPI DTpm2SubmitCommand(IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, IN OUT UINT32 *OutputParameterBlockSize, IN UINT8 *OutputParameterBlock)
Definition: Tpm2Ptp.c:591
VOID DumpPtpInfo(IN VOID *Register)
Definition: Tpm2Ptp.c:502
EFI_STATUS EFIAPI DTpm2RequestUseTpm(VOID)
Definition: Tpm2Ptp.c:633
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112