## @file
# Instance of RNG (Random Number Generator) Library.
#
# BaseRng Library that uses CPU RNG instructions (e.g. RdRand) to
# provide random numbers.
#
# Copyright (c) 2023, Arm Limited. All rights reserved.
# Copyright (c) 2021, NUVIA Inc. All rights reserved.
# Copyright (c) 2015, Intel Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = BaseRngLib
MODULE_UNI_FILE = BaseRngLib.uni
FILE_GUID = 626440D8-1971-41D9-9AB2-FB25F4AE79BC
MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = RngLib
CONSTRUCTOR = BaseRngLibConstructor
#
# VALID_ARCHITECTURES = IA32 X64 AARCH64
#
[Sources]
BaseRng.c
BaseRngLibInternals.h
[Sources.Ia32, Sources.X64]
Rand/RdRand.c
[Sources.AARCH64]
AArch64/Rndr.c
AArch64/ArmRng.h
AArch64/ArmRng.S | GCC
AArch64/ArmRng.asm | MSFT
[Guids.AARCH64]
gEfiRngAlgorithmArmRndr
[Guids.Ia32, Guids.X64]
gEfiRngAlgorithmSp80090Ctr256Guid
[Sources.RISCV64]
Riscv/Rng.c
Riscv/Seed.S | GCC
[Packages]
MdePkg/MdePkg.dec
[Pcd.AARCH64]
gEfiMdePkgTokenSpaceGuid.PcdCpuRngSupportedAlgorithm
[LibraryClasses]
BaseLib
DebugLib
[Pcd.RISCV64]
# Does the CPU support the Zkr extension (for the `Seed` CSR)
gEfiMdePkgTokenSpaceGuid.PcdRiscVFeatureOverride ## CONSUMES