summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/EFI/Firmware/CryptoPkg/Driver/CryptoSmm.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:49:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:49:04 +0000
commit16f504a9dca3fe3b70568f67b7d41241ae485288 (patch)
treec60f36ada0496ba928b7161059ba5ab1ab224f9d /src/VBox/Devices/EFI/Firmware/CryptoPkg/Driver/CryptoSmm.c
parentInitial commit. (diff)
downloadvirtualbox-upstream.tar.xz
virtualbox-upstream.zip
Adding upstream version 7.0.6-dfsg.upstream/7.0.6-dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Devices/EFI/Firmware/CryptoPkg/Driver/CryptoSmm.c')
-rw-r--r--src/VBox/Devices/EFI/Firmware/CryptoPkg/Driver/CryptoSmm.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/VBox/Devices/EFI/Firmware/CryptoPkg/Driver/CryptoSmm.c b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Driver/CryptoSmm.c
new file mode 100644
index 00000000..f7a17f74
--- /dev/null
+++ b/src/VBox/Devices/EFI/Firmware/CryptoPkg/Driver/CryptoSmm.c
@@ -0,0 +1,41 @@
+/** @file
+ Installs the EDK II Crypto SMM Protocol
+
+ Copyright (C) Microsoft Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <PiSmm.h>
+#include <Library/SmmServicesTableLib.h>
+#include <Protocol/SmmCrypto.h>
+
+extern CONST EDKII_CRYPTO_PROTOCOL mEdkiiCrypto;
+
+/**
+ The module Entry Point of the Crypto SMM Driver.
+
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.
+ @param[in] SystemTable A pointer to the EFI System Table.
+
+ @retval EFI_SUCCESS The entry point is executed successfully.
+ @retval Other Some error occurs when executing this entry point.
+
+**/
+EFI_STATUS
+EFIAPI
+CryptoSmmEntry (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ EFI_HANDLE Handle;
+
+ Handle = NULL;
+ return gSmst->SmmInstallProtocolInterface (
+ &Handle,
+ &gEdkiiSmmCryptoProtocolGuid,
+ EFI_NATIVE_INTERFACE,
+ (EDKII_CRYPTO_PROTOCOL *) &mEdkiiCrypto
+ );
+}