mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
f5c941b177
commit
055c829c42
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue