audk/MdePkg/Library/BaseRngLib/BaseRngLib.inf
Pierre Gondois 1715d67231 MdePkg/BaseRngLib: Prefer ArmReadIdAA64Isar0Reg() over ArmReadIdIsar0()
A ArmReadIdAA64Isar0Reg() function was recently added
to BaseLib. Use it instead of its ArmReadIdIsar0() equivalent,
which was private to the BaseRngLib library.

This also allows to avoid the confusion between the following
registers:
- ID_ISAR0_EL1: allows to probe for Divide instructions, Debug
  instructions, ...
- ID_AA64ISAR0_EL1: AARCH64 specific register allowing to probe
  for AESE, RNDR, ... instructions

Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2024-08-01 13:41:01 +00:00

68 lines
1.6 KiB
INI

## @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.<BR>
# Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
# Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
#
# 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