summaryrefslogtreecommitdiffstats
path: root/SecurityPkg/Tcg
diff options
context:
space:
mode:
authorMatthew Carlson <macarl@microsoft.com>2020-06-19 20:49:33 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-08-31 09:17:27 +0000
commit96b90e150c2f107c64a827e82451b642a42df686 (patch)
tree8141b901fec1e83308b7fd9665e5d3d477bebcc2 /SecurityPkg/Tcg
parentbaecba68a32b26778e902faed64f2e701e584531 (diff)
downloadedk2-96b90e150c2f107c64a827e82451b642a42df686.tar.gz
edk2-96b90e150c2f107c64a827e82451b642a42df686.tar.bz2
edk2-96b90e150c2f107c64a827e82451b642a42df686.zip
SecurityPkg: Measure Invoke EBS even in failure case
This patch measures the ExitBootServices invocation to the TPM even in the case of ExitBootServices failing, per TCG PC Client Platform Firmware Profile Version 1.06 Revision 52 Family 2.0 section 8.2.4(i). Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
Diffstat (limited to 'SecurityPkg/Tcg')
-rw-r--r--SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index b55b6c12d2..4d0c241f4d 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -2616,6 +2616,17 @@ OnExitBootServicesFailed (
EFI_STATUS Status;
//
+ // Measure invocation of ExitBootServices,
+ //
+ Status = TcgMeasureAction (
+ 5,
+ EFI_EXIT_BOOT_SERVICES_INVOCATION
+ );
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "%a not Measured. Error!\n", EFI_EXIT_BOOT_SERVICES_INVOCATION));
+ }
+
+ //
// Measure Failure of ExitBootServices,
//
Status = TcgMeasureAction (