diff options
author | czhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-28 03:16:10 +0000 |
---|---|---|
committer | czhang46 <czhang46@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-08-28 03:16:10 +0000 |
commit | 055c829c4212f12614ad80dcd161a2b4f5cf6713 (patch) | |
tree | a6c239054a24809dc6a3ffb2a43539906d80b9e6 /SecurityPkg/Tcg | |
parent | f5c941b1770df6d9ffd83e9044e7fa698f71de44 (diff) | |
download | edk2-055c829c4212f12614ad80dcd161a2b4f5cf6713.zip edk2-055c829c4212f12614ad80dcd161a2b4f5cf6713.tar.gz edk2-055c829c4212f12614ad80dcd161a2b4f5cf6713.tar.bz2 |
TcgPei need to measure anything to PCR in S3 bootpath, so skip shadow logic.
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by : Fu, Siyuan <siyuan.fu@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13685 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/Tcg')
-rw-r--r-- | SecurityPkg/Tcg/TcgPei/TcgPei.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPei.c index 08d8293..37302fd 100644 --- a/SecurityPkg/Tcg/TcgPei/TcgPei.c +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c @@ -583,20 +583,25 @@ PeimEntryMA ( return EFI_UNSUPPORTED;
}
- Status = (**PeiServices).RegisterForShadow(FileHandle);
- if (Status == EFI_ALREADY_STARTED) {
- mImageInMemory = TRUE;
- } else if (Status == EFI_NOT_FOUND) {
- ASSERT_EFI_ERROR (Status);
+ //
+ // Initialize TPM device
+ //
+ Status = PeiServicesGetBootMode (&BootMode);
+ ASSERT_EFI_ERROR (Status);
+
+ //
+ // In S3 path, skip shadow logic. no measurement is required
+ //
+ if (BootMode != BOOT_ON_S3_RESUME) {
+ Status = (**PeiServices).RegisterForShadow(FileHandle);
+ if (Status == EFI_ALREADY_STARTED) {
+ mImageInMemory = TRUE;
+ } else if (Status == EFI_NOT_FOUND) {
+ ASSERT_EFI_ERROR (Status);
+ }
}
if (!mImageInMemory) {
- //
- // Initialize TPM device
- //
- Status = PeiServicesGetBootMode (&BootMode);
- ASSERT_EFI_ERROR (Status);
-
TpmHandle = (TIS_TPM_HANDLE)(UINTN)TPM_BASE_ADDRESS;
Status = TisPcRequestUseTpm ((TIS_PC_REGISTERS_PTR)TpmHandle);
if (EFI_ERROR (Status)) {
|