TianoCore EDK2 master
|
#include <PiSmm.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/SmmServicesTableLib.h>
#include <Protocol/SmmCrypto.h>
Go to the source code of this file.
Functions | |
VOID * | GetCryptoServices (VOID) |
EFI_STATUS EFIAPI | SmmCryptLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
EDKII_SMM_CRYPTO_PROTOCOL * | mSmmCryptoProtocol = NULL |
Implements the GetCryptoServices() API that retuns a pointer to the EDK II SMM Crypto Protocol.
Copyright (C) Microsoft Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SmmCryptLib.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 SmmCryptLib.c.
EFI_STATUS EFIAPI SmmCryptLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
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. |
SystemTable | A pointer to the EFI 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 SmmCryptLib.c.
EDKII_SMM_CRYPTO_PROTOCOL* mSmmCryptoProtocol = NULL |
Definition at line 16 of file SmmCryptLib.c.