From 6f6c7857c27272da66205b0257f95689aabb6e88 Mon Sep 17 00:00:00 2001 From: czhang46 Date: Mon, 22 Oct 2012 04:35:59 +0000 Subject: Remove TPM selftest on S3 boot path to save time Signed-off-by : Chao Zhang Reviewed-by : Dong Guo Reviewed-by : Yao Jiewen git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13873 6f19259b-4bc3-4df7-8a09-765794883524 --- SecurityPkg/Tcg/TcgPei/TcgPei.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'SecurityPkg') diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPei.c index 60d9192103..350e60e561 100644 --- a/SecurityPkg/Tcg/TcgPei/TcgPei.c +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c @@ -707,10 +707,17 @@ PeimEntryMA ( if (EFI_ERROR (Status) ) { return Status; } - Status = TpmCommContinueSelfTest ((EFI_PEI_SERVICES**)PeiServices, TpmHandle); - if (EFI_ERROR (Status)) { - return Status; + + // + // TpmSelfTest is optional on S3 path, skip it to save S3 time + // + if (BootMode != BOOT_ON_S3_RESUME) { + Status = TpmCommContinueSelfTest ((EFI_PEI_SERVICES**)PeiServices, TpmHandle); + if (EFI_ERROR (Status)) { + return Status; + } } + Status = PeiServicesInstallPpi (&mTpmInitializedPpiList); ASSERT_EFI_ERROR (Status); } -- cgit v1.2.3