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
This commit is contained in:
@@ -1815,16 +1815,17 @@ DriverEntry (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
if (GetFirstGuidHob (&gTpmErrorHobGuid) != NULL) {
|
||||
DEBUG ((EFI_D_ERROR, "TPM2 error!\n"));
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
Status = Tpm2RequestUseTpm ();
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((EFI_D_ERROR, "TPM not detected!\n"));
|
||||
DEBUG ((EFI_D_ERROR, "TPM2 not detected!\n"));
|
||||
return Status;
|
||||
}
|
||||
|
||||
if (GetFirstGuidHob (&gTpmErrorHobGuid) != NULL) {
|
||||
mTcgDxeData.BsCap.TrEEPresentFlag = FALSE;
|
||||
}
|
||||
|
||||
//
|
||||
// Fill information
|
||||
//
|
||||
|
Reference in New Issue
Block a user