diff options
author | Zhang, Chao B <chao.b.zhang@intel.com> | 2016-09-27 09:46:40 +0800 |
---|---|---|
committer | Zhang, Chao B <chao.b.zhang@intel.com> | 2016-09-29 10:30:30 +0800 |
commit | edb0fda25ea9b2ef73db18bf5cf0798340209f28 (patch) | |
tree | dfff33287fc1b5ff8b9aa3177be3089a51bd5416 /SecurityPkg/Tcg/Tcg2Smm | |
parent | ab970515d2c6ec657fceab0ce571054bb43a22f2 (diff) | |
download | edk2-edb0fda25ea9b2ef73db18bf5cf0798340209f28.tar.gz edk2-edb0fda25ea9b2ef73db18bf5cf0798340209f28.tar.bz2 edk2-edb0fda25ea9b2ef73db18bf5cf0798340209f28.zip |
SecurityPkg: Tcg2: Fix TCG2 PP issues
Several issues exist in TCG2 PP
1. TCG2 PP use NVS PPRQ/PPRM as PP parameter as well as current
PP state cache. But it doesn't handle PP set failure case
2. TCG2 PP Submit TPM Operation Request to Pre-OS Environment forgets
to clean PPRM
3. Potential alignment issue
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
Diffstat (limited to 'SecurityPkg/Tcg/Tcg2Smm')
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 14 | ||||
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Smm/Tpm.asl | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c index f3b76418a2..d02123dfa6 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c @@ -119,6 +119,9 @@ PhysicalPresenceCallback ( {
UINT32 MostRecentRequest;
UINT32 Response;
+ UINT32 OperationRequest;
+ UINT32 RequestParameter;
+
if (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_RETURN_REQUEST_RESPONSE_TO_OS) {
mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (
@@ -130,10 +133,15 @@ PhysicalPresenceCallback ( return EFI_SUCCESS;
} else if ((mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS)
|| (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2)) {
- mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (
- mTcgNvs->PhysicalPresence.Request,
- mTcgNvs->PhysicalPresence.RequestParameter
+
+ OperationRequest = mTcgNvs->PhysicalPresence.Request;
+ RequestParameter = mTcgNvs->PhysicalPresence.RequestParameter;
+ mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (
+ &OperationRequest,
+ &RequestParameter
);
+ mTcgNvs->PhysicalPresence.Request = OperationRequest;
+ mTcgNvs->PhysicalPresence.RequestParameter = RequestParameter;
} else if (mTcgNvs->PhysicalPresence.Parameter == TCG_ACPI_FUNCTION_GET_USER_CONFIRMATION_STATUS_FOR_REQUEST) {
mTcgNvs->PhysicalPresence.ReturnCode = Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (mTcgNvs->PPRequestUserConfirm);
}
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl index 84143cfce9..2083a3e2ce 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl +++ b/SecurityPkg/Tcg/Tcg2Smm/Tpm.asl @@ -198,6 +198,7 @@ DefinitionBlock ( //
Store (DerefOf (Index (Arg2, 0x00)), PPRQ)
+ Store (0, PPRM)
Store (0x02, PPIP)
//
|