diff options
Diffstat (limited to 'SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c')
-rw-r--r-- | SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c index 691eaa40c0..053e597d2e 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.c @@ -16,29 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include <Guid/TpmInstance.h>
-/**
- Return PTP interface type.
-
- @param[in] Register Pointer to PTP register.
-
- @return PTP interface type.
-**/
-TPM2_PTP_INTERFACE_TYPE
-Tpm2GetPtpInterface (
- IN VOID *Register
- );
-
-/**
- Return PTP CRB interface IdleByPass state.
-
- @param[in] Register Pointer to PTP register.
-
- @return PTP CRB interface IdleByPass state.
-**/
-UINT8
-Tpm2GetIdleByPass (
- IN VOID *Register
- );
+#include "Tpm2DeviceLibDTpm.h"
/**
Dump PTP register information.
@@ -102,8 +80,6 @@ Tpm2InstanceLibDTpmConstructor ( )
{
EFI_STATUS Status;
- TPM2_PTP_INTERFACE_TYPE PtpInterface;
- UINT8 IdleByPass;
Status = Tpm2RegisterTpm2DeviceLib (&mDTpm2InternalTpm2Device);
if ((Status == EFI_SUCCESS) || (Status == EFI_UNSUPPORTED)) {
@@ -111,19 +87,7 @@ Tpm2InstanceLibDTpmConstructor ( // Unsupported means platform policy does not need this instance enabled.
//
if (Status == EFI_SUCCESS) {
- //
- // Cache current active TpmInterfaceType only when needed
- //
- if (PcdGet8(PcdActiveTpmInterfaceType) == 0xFF) {
- PtpInterface = Tpm2GetPtpInterface ((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));
- PcdSet8S(PcdActiveTpmInterfaceType, PtpInterface);
- }
-
- if (PcdGet8(PcdActiveTpmInterfaceType) == Tpm2PtpInterfaceCrb && PcdGet8(PcdCRBIdleByPass) == 0xFF) {
- IdleByPass = Tpm2GetIdleByPass((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));
- PcdSet8S(PcdCRBIdleByPass, IdleByPass);
- }
-
+ Status = InternalTpm2DeviceLibDTpmCommonConstructor ();
DumpPtpInfo ((VOID *) (UINTN) PcdGet64 (PcdTpmBaseAddress));
}
return EFI_SUCCESS;
|