TianoCore EDK2 master
|
#include <PiMm.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/MmServicesTableLib.h>
#include <Protocol/SmmCrypto.h>
Go to the source code of this file.
Functions | |
VOID * | GetCryptoServices (VOID) |
EFI_STATUS EFIAPI | StandaloneMmCryptLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_MM_SYSTEM_TABLE *MmSystemTable) |
Variables | |
EDKII_SMM_CRYPTO_PROTOCOL * | mSmmCryptoProtocol = NULL |
Implements the GetCryptoServices() API that retuns a pointer to the EDK II SMM Crypto Protocol.
Copyright (c) 2024, American Megatrends International LLC. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file StandaloneMmCryptLib.c.
VOID * GetCryptoServices | ( | VOID | ) |
Internal worker function that returns the pointer to an EDK II Crypto Protocol/PPI. The layout of the PPI, DXE Protocol, and SMM Protocol are identical which allows the implementation of the BaseCryptLib functions that call through a Protocol/PPI to be shared for the PEI, DXE, and SMM implementations.
This SMM implementation returns the pointer to the EDK II SMM Crypto Protocol that was found in the library constructor SmmCryptLibConstructor().
Definition at line 29 of file StandaloneMmCryptLib.c.
EFI_STATUS EFIAPI StandaloneMmCryptLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_MM_SYSTEM_TABLE * | MmSystemTable | ||
) |
Constructor looks up the EDK II SMM Crypto Protocol and verifies that it is not NULL and has a high enough version value to support all the BaseCryptLib functions.
ImageHandle | The firmware allocated handle for the EFI image. |
MmSystemTable | A pointer to the MM System Table. |
EFI_SUCCESS | The EDK II SMM Crypto Protocol was found. |
EFI_NOT_FOUND | The EDK II SMM Crypto Protocol was not found. |
Definition at line 49 of file StandaloneMmCryptLib.c.
EDKII_SMM_CRYPTO_PROTOCOL* mSmmCryptoProtocol = NULL |
Definition at line 16 of file StandaloneMmCryptLib.c.