Fix always reboot issue for an invalid physical presence operation request.
Signed-off by: Dong Guo <guo.dong@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang, Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13297 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Execute pending TPM requests from OS or BIOS and Lock TPM.
|
Execute pending TPM requests from OS or BIOS and Lock TPM.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@@ -936,6 +936,23 @@ ExecutePendingTpmRequest (
|
|||||||
case PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_FALSE:
|
case PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_FALSE:
|
||||||
RequestConfirmed = TRUE;
|
RequestConfirmed = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
//
|
||||||
|
// Invalid operation request.
|
||||||
|
//
|
||||||
|
TcgPpData->PPResponse = TPM_PP_BIOS_FAILURE;
|
||||||
|
TcgPpData->LastPPRequest = TcgPpData->PPRequest;
|
||||||
|
TcgPpData->PPRequest = PHYSICAL_PRESENCE_NO_ACTION;
|
||||||
|
DataSize = sizeof (EFI_PHYSICAL_PRESENCE);
|
||||||
|
Status = gRT->SetVariable (
|
||||||
|
PHYSICAL_PRESENCE_VARIABLE,
|
||||||
|
&gEfiPhysicalPresenceGuid,
|
||||||
|
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
|
DataSize,
|
||||||
|
TcgPpData
|
||||||
|
);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Flags & FLAG_RESET_TRACK) != 0) {
|
if ((Flags & FLAG_RESET_TRACK) != 0) {
|
||||||
@@ -965,7 +982,7 @@ ExecutePendingTpmRequest (
|
|||||||
//
|
//
|
||||||
if ((TcgPpData->Flags & FLAG_RESET_TRACK) == 0) {
|
if ((TcgPpData->Flags & FLAG_RESET_TRACK) == 0) {
|
||||||
TcgPpData->LastPPRequest = TcgPpData->PPRequest;
|
TcgPpData->LastPPRequest = TcgPpData->PPRequest;
|
||||||
TcgPpData->PPRequest = 0;
|
TcgPpData->PPRequest = PHYSICAL_PRESENCE_NO_ACTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1004,7 +1021,7 @@ ExecutePendingTpmRequest (
|
|||||||
case PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE:
|
case PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (TcgPpData->PPRequest != 0) {
|
if (TcgPpData->PPRequest != PHYSICAL_PRESENCE_NO_ACTION) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user