summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseRngLib/BaseRngLib.inf
blob: a1614a900f80f668982456a01f44d07452adf0a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
## @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/ArmReadIdIsar0.S   | GCC
  AArch64/ArmRng.S           | GCC

  AArch64/ArmReadIdIsar0.asm | MSFT
  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