-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CryptoPkg: Add CryptoStandaloneMm and StandaloneMmCryptLib
Adds a Standalone MM instance of BaseCryptLib intended to only be used with the CryptoStandaloneMm driver added. The library instance can be linked against Standalone MM drivers to the use the gEdkiiSmmCryptoProtocolGuid protocol instance produced by CryptoStandaloneMm. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
- Loading branch information
1 parent
eab839f
commit 5bbf055
Showing
5 changed files
with
661 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** @file | ||
Installs the EDK II Crypto SMM Protocol in Standalone MM. | ||
Copyright (C) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#include <PiMm.h> | ||
#include <Library/MmServicesTableLib.h> | ||
#include <Protocol/SmmCrypto.h> | ||
|
||
extern CONST EDKII_CRYPTO_PROTOCOL mEdkiiCrypto; | ||
|
||
/** | ||
The module Entry Point of the Crypto Standalone MM 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 | ||
CryptoStandaloneMmEntry ( | ||
IN EFI_HANDLE ImageHandle, | ||
IN EFI_MM_SYSTEM_TABLE *MmSystemTable | ||
) | ||
{ | ||
EFI_HANDLE Handle; | ||
|
||
Handle = NULL; | ||
return gMmst->MmInstallProtocolInterface ( | ||
&Handle, | ||
&gEdkiiSmmCryptoProtocolGuid, | ||
EFI_NATIVE_INTERFACE, | ||
(EDKII_CRYPTO_PROTOCOL *)&mEdkiiCrypto | ||
); | ||
} |
Oops, something went wrong.