Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OvmfPkg: DxeTcg2PhysicalPresenceLib: fix changing of PCR banks #164

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
OvmfPkg: DxeTcg2PhysicalPresenceLib: fix bootloop
Flush cache not only when placing request in PPI, but also after
clearing old request from PPI.

Signed-off-by: Artur Kowalski <[email protected]>
  • Loading branch information
arturkow2000 committed Sep 11, 2024
commit 2dfe3b29e4df555de5db3fdc7c547d533bfeb8e4
Original file line number Diff line number Diff line change
@@ -733,6 +733,8 @@ Tcg2ExecutePendingTpmRequest (
mPpi->LastRequest = mPpi->Request;
mPpi->Request = TCG2_PHYSICAL_PRESENCE_NO_ACTION;
mPpi->RequestParameter = 0;

WriteBackDataCacheRange((VOID*)mPpi, sizeof(QEMU_TPM_PPI));
return;
}

@@ -763,6 +765,7 @@ Tcg2ExecutePendingTpmRequest (
mPpi->RequestParameter = 0;

if (mPpi->Response == TCG_PP_OPERATION_RESPONSE_USER_ABORT) {
WriteBackDataCacheRange((VOID*)mPpi, sizeof(QEMU_TPM_PPI));
return;
}

@@ -791,6 +794,7 @@ Tcg2ExecutePendingTpmRequest (
}

Print (L"Rebooting system to make TPM2 settings in effect\n");
WriteBackDataCacheRange((VOID*)mPpi, sizeof(QEMU_TPM_PPI));
gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL);
ASSERT (FALSE);
}
@@ -903,7 +907,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (

mPpi->Request = OperationRequest;
mPpi->RequestParameter = RequestParameter;
WriteBackDataCache();
WriteBackDataCacheRange((VOID*)mPpi, sizeof(QEMU_TPM_PPI));

return TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS;
}
Loading