]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/Tcg2Smm/Tcg2MmDependencyDxe.c
SecurityPkg: Tcg2Smm: Added support for Standalone Mm
[mirror_edk2.git] / SecurityPkg / Tcg / Tcg2Smm / Tcg2MmDependencyDxe.c
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2MmDependencyDxe.c b/SecurityPkg/Tcg/Tcg2Smm/Tcg2MmDependencyDxe.c
new file mode 100644 (file)
index 0000000..4f2d7c5
--- /dev/null
@@ -0,0 +1,48 @@
+/** @file\r
+  Runtime DXE part corresponding to StandaloneMM Tcg2 module.\r
+\r
+This module installs gTcg2MmSwSmiRegisteredGuid to notify readiness of\r
+StandaloneMM Tcg2 module.\r
+\r
+Copyright (c) 2019 - 2021, Arm Ltd. All rights reserved.\r
+Copyright (c) Microsoft Corporation.\r
+\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include <PiDxe.h>\r
+\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+\r
+/**\r
+  The constructor function installs gTcg2MmSwSmiRegisteredGuid to notify\r
+  readiness of StandaloneMM Tcg2 module.\r
+\r
+  @param  ImageHandle   The firmware allocated handle for the EFI image.\r
+  @param  SystemTable   A pointer to the Management mode System Table.\r
+\r
+  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Tcg2MmDependencyDxeEntryPoint (\r
+  IN EFI_HANDLE                           ImageHandle,\r
+  IN EFI_SYSTEM_TABLE                     *SystemTable\r
+  )\r
+{\r
+  EFI_STATUS            Status;\r
+  EFI_HANDLE            Handle;\r
+\r
+  Handle = NULL;\r
+  Status = gBS->InstallProtocolInterface (\r
+                  &Handle,\r
+                  &gTcg2MmSwSmiRegisteredGuid,\r
+                  EFI_NATIVE_INTERFACE,\r
+                  NULL\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
+  return EFI_SUCCESS;\r
+}\r