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
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
fi

- name: Upload Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ovmf-artifacts # Name for the artifact
path: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/CacheMaintenanceLib.h>

#include <Library/Tcg2PhysicalPresenceLib.h>

Expand Down Expand Up @@ -732,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;
}

Expand Down Expand Up @@ -762,6 +765,7 @@ Tcg2ExecutePendingTpmRequest (
mPpi->RequestParameter = 0;

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

Expand Down Expand Up @@ -790,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);
}
Expand Down Expand Up @@ -902,6 +907,7 @@ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (

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

return TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
UefiLib
UefiRuntimeServicesTableLib
Tcg2PhysicalPresencePlatformLib
CacheMaintenanceLib

[Protocols]
gEfiTcg2ProtocolGuid ## SOMETIMES_CONSUMES
Expand Down
Loading