diff options
author | Min M Xu <min.m.xu@intel.com> | 2023-02-02 17:04:14 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-02-04 12:30:47 +0000 |
commit | ff8485179c1cb847bff17725fd95043976108a54 (patch) | |
tree | 69e5a8e8e0d3b7b1a3e3095da667a41053180841 /SecurityPkg | |
parent | cc18c503e03e64860e3587f7aa54b6beccd41fb2 (diff) | |
download | edk2-ff8485179c1cb847bff17725fd95043976108a54.tar.gz edk2-ff8485179c1cb847bff17725fd95043976108a54.tar.bz2 edk2-ff8485179c1cb847bff17725fd95043976108a54.zip |
SecurityPkg/TdTcg2Dxe: td-guest shall halt when CcMeasurement install fail
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4335
CcMeasurement protocol is installed when it is supported in a td-guest. If
the installation of the protocol failed, the guest shall go into
CpuDeadLoop. Because the measurement feature is crucial to a td-guest and
it shall stop running immediately at this situation.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'SecurityPkg')
-rw-r--r-- | SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c b/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c index 59341a8c02..b34da724ac 100644 --- a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c +++ b/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c @@ -2510,6 +2510,12 @@ DriverEntry ( //
// Create event callback to install CC EventLog ACPI Table
EfiCreateProtocolNotifyEvent (&gEfiAcpiTableProtocolGuid, TPL_CALLBACK, InstallAcpiTable, NULL, &Registration);
+ } else {
+ //
+ // Cc measurement feature is crucial to a td-guest and it shall stop running immediately
+ // when it is failed to be installed.
+ DEBUG ((DEBUG_ERROR, "%a: CcMeasurement protocol failed to be installed - %r\n", __FUNCTION__, Status));
+ CpuDeadLoop ();
}
return Status;
|