From afba5358c816c88f2b202a45c31fe80e34dd9368 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Tue, 3 Sep 2024 09:58:49 +0200 Subject: 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 --- ArmVirtPkg/ArmVirt.dsc.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ArmVirtPkg') 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 -- cgit v1.2.3