MdePkg: BaseRngLibDxe: Add RngLib that uses RngDxe

This adds a RngLib that uses the RngProtocol to provide randomness.
This means that the RngLib is meant to be used with DXE_DRIVERS.

Ref: https://github.com/tianocore/edk2/pull/845
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1871

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
This commit is contained in:
Matthew Carlson
2020-07-31 13:07:17 -07:00
committed by mergify[bot]
parent f56ed0e51d
commit ed0dce7d54
4 changed files with 255 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
# @file
# Provides implementation of the library class RngLib that uses the RngProtocol
#
# @copyright
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 1.27
BASE_NAME = DxeRngLib
MODULE_UNI_FILE = DxeRngLib.uni
FILE_GUID = FF9F84C5-A33E-44E3-9BB5-0D654B2D4149
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = RngLib|DXE_DRIVER UEFI_APPLICATION UEFI_DRIVER
[Packages]
MdePkg/MdePkg.dec
[Sources]
DxeRngLib.c
[LibraryClasses]
DebugLib
UefiBootServicesTableLib
[Protocols]
gEfiRngProtocolGuid ## CONSUMES
[Depex]
gEfiRngProtocolGuid
[Guids]
gEfiRngAlgorithmSp80090Ctr256Guid
gEfiRngAlgorithmSp80090Hash256Guid
gEfiRngAlgorithmSp80090Hmac256Guid