diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2024-09-03 09:58:49 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-09-03 22:47:09 +0000 |
commit | afba5358c816c88f2b202a45c31fe80e34dd9368 (patch) | |
tree | 98c874e0022be7d6dcfce71115feff4f2072d49d /ArmVirtPkg | |
parent | 8504d2be17c98265049ec334711aad4c0baed1d7 (diff) | |
download | edk2-afba5358c816c88f2b202a45c31fe80e34dd9368.tar.gz edk2-afba5358c816c88f2b202a45c31fe80e34dd9368.tar.bz2 edk2-afba5358c816c88f2b202a45c31fe80e34dd9368.zip |
ArmVirtPkg: Resolve RngLib via RngDxe for TRNG support
Gerd reports that ArmVirtQemu running under KVM lost network boot
support on systems that do not implement the RNDR/RNDRRS system
registers, which provide an architectural, CPU-based source of random
numbers. Under KVM, the TRNG SMCCC is available as a fallback, which is
exposed via RngDxe but not via the base RngLib library. This means that
direct users of RngLib, such as OpensslLib, have no access to the TRNG
based entropy source.
Let's fix this by resolving RngLib dependencies for UEFI_DRIVER type
drivers via DxeRngLib, which uses the protocol exposed by RngDxe
internally.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'ArmVirtPkg')
-rw-r--r-- | ArmVirtPkg/ArmVirt.dsc.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 3462adf9b6..4f35da9a2a 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -232,6 +232,10 @@ DebugLib|ArmVirtPkg/Library/DebugLibFdtPL011Uart/DebugLibFdtPL011UartFlash.inf
!endif
+[LibraryClasses.common.UEFI_DRIVER]
+ # resolve RngLib via RngDxe's EFI_RNG_PROTOCOL for UEFI_DRIVER type drivers such as TlsDxe
+ RngLib|MdePkg/Library/DxeRngLib/DxeRngLib.inf
+
[LibraryClasses.common.DXE_CORE]
HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
|