diff options
author | Yao, Jiewen <jiewen.yao@intel.com> | 2015-03-04 01:15:08 +0000 |
---|---|---|
committer | jyao1 <jyao1@Edk2> | 2015-03-04 01:15:08 +0000 |
commit | 3dd05ac3e6a047cd0e85f590a9886a8cd4fd7a16 (patch) | |
tree | 8adc7b3f44ab9cec7fbafa0b1ce6bf46a09b73a0 /SecurityPkg/Tcg/TcgDxe | |
parent | 4c9ed23eb6051ea2cd80cb5c8d9a935964b06b1f (diff) | |
download | edk2-platforms-3dd05ac3e6a047cd0e85f590a9886a8cd4fd7a16.tar.xz |
Add performance optimization for Tcg/TrEE.
Add error check for Tcg/TrEE Pei/Dxe driver to avoid unnecessary hardware check for performance optimization.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zeng, Star" <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17004 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/Tcg/TcgDxe')
-rw-r--r-- | SecurityPkg/Tcg/TcgDxe/TcgDxe.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c index db7951cd9a..f15e94353c 100644 --- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c +++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c @@ -1355,6 +1355,11 @@ DriverEntry ( return EFI_UNSUPPORTED;
}
+ if (GetFirstGuidHob (&gTpmErrorHobGuid) != NULL) {
+ DEBUG ((EFI_D_ERROR, "TPM error!\n"));
+ return EFI_DEVICE_ERROR;
+ }
+
mTcgDxeData.TpmHandle = (TIS_TPM_HANDLE)(UINTN)TPM_BASE_ADDRESS;
Status = TisPcRequestUseTpm (mTcgDxeData.TpmHandle);
if (EFI_ERROR (Status)) {
@@ -1362,10 +1367,6 @@ DriverEntry ( return Status;
}
- if (GetFirstGuidHob (&gTpmErrorHobGuid) != NULL) {
- mTcgDxeData.BsCap.TPMPresentFlag = FALSE;
- }
-
Status = GetTpmStatus (&mTcgDxeData.BsCap.TPMDeactivatedFlag);
if (EFI_ERROR (Status)) {
DEBUG ((
|