FSOpen: Open '\net\Udp4Dxe.efi' Success FSOpen: Open '\net\Udp4Dxe.efi' Success [Security] 3rd party image[0] can be loaded after EndOfDxe:
PciRoot(0x0)/Pci(0x1,0x1)/Ata(Primary,Master,0x0)/HD(1,MBR,0xBE1AFDFA,0x3F,0xFBFC1)/\net\Udp4Dxe.efi.
None of Tcg2Protocol/CcMeasurementProtocol is installed.
InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B 3E154040
Loading driver at 0x0003E127000 EntryPoint=0x0003E12E5C5 Udp4Dxe.efi
InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 3E154E98
ProtectUefiImageCommon - 0x3E154040 - 0x000000003E127000 - 0x0000000000009840
Failed to locate EFI_RNG_PROTOCOL: Not Found
ASSERT_EFI_ERROR (Status = Not Found)
ASSERT [Udp4Dxe] /home/uefi/edk2/NetworkPkg/Library/DxeNetLib/DxeNetLib.c(938): !(((RETURN_STATUS)(Status)) >= 0x8000000000000000ULL)
但是当我使用EDK2模拟器运行UEFI时,我仍然可以正常加载这些驱动程序。
!include OvmfPkg/Include/Dsc/OvmfRngComponents.dsc.inc
指定所需的 LibraryClass。文件内容如下:
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf {
<LibraryClasses>
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
}
这是UEFI中指定LibraryClasses的最高优先级方法,因此它涵盖了其他库以提供Rng的实现。 BaseRngLib使用CPU RNG指令来提供随机数(文件注释如下),但我在qemu上运行ovmf固件。
## @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
#
##
所以当我注释掉这个库后,Rng服务现在就可以正常运行了。