Skip to content

Commit 30b237f

Browse files
ardbiesheuvellgao4
authored andcommitted
ArmVirtPkg/ArmVirtQemu: Add RngDxe driver
Add the RngDxe driver to the build, backed by either RNDR or TRNG, one of which is expected to be available in most cases: - RNDR is implemented by the 'max' CPU that QEMU implements in TCG mode - TRNG is implemented by the KVM hypervisor, which backs QEMU's 'host' CPU Other TCG modes (e.g., the 'cortex-a*' CPUs) implement neither, which should prevent the RngDxe driver from dispatching entirely, resulting in the same situation as before. Cc: Ard Biesheuvel <[email protected]> Cc: Leif Lindholm <[email protected]> Cc: Sami Mujawar <[email protected]> Cc: Gerd Hoffmann <[email protected]> Committed-by: Ard Biesheuvel <[email protected]> Signed-off-by: Doug Flick [MSFT] <[email protected]> Reviewed-by: Ard Biesheuvel <[email protected]>
1 parent 1ceaa1c commit 30b237f

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

ArmVirtPkg/ArmVirt.dsc.inc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@
156156
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
157157
!endif
158158
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
159-
RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
159+
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
160+
ArmTrngLib|ArmPkg/Library/ArmTrngLib/ArmTrngLib.inf
161+
ArmMonitorLib|ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.inf
160162

161163
#
162164
# Secure Boot dependencies
@@ -266,6 +268,7 @@
266268

267269
[LibraryClasses.ARM]
268270
ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
271+
RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
269272

270273
[BuildOptions]
271274
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG

ArmVirtPkg/ArmVirtQemu.dsc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@
432432
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
433433
}
434434
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
435+
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
435436

436437
#
437438
# Status Code Routing

ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ READ_LOCK_STATUS = TRUE
7575
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
7676
INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
7777
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
78+
INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
7879

7980
#
8081
# FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs

ArmVirtPkg/ArmVirtQemuKernel.dsc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@
341341
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
342342
}
343343
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
344+
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
344345

345346
#
346347
# Status Code Routing

0 commit comments

Comments
 (0)