Skip to content

Commit

Permalink
ArmVirtPkg/ArmVirtQemu: Add RngDxe driver
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ardbiesheuvel authored and mergify[bot] committed May 24, 2024
1 parent 66c6987 commit 3e72240
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ArmVirtPkg/ArmVirt.dsc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
!endif
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
RngLib|MdeModulePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
ArmTrngLib|ArmPkg/Library/ArmTrngLib/ArmTrngLib.inf
ArmMonitorLib|ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.inf

#
# Secure Boot dependencies
Expand Down Expand Up @@ -266,6 +268,7 @@

[LibraryClasses.ARM]
ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf

[BuildOptions]
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG
Expand Down
1 change: 1 addition & 0 deletions ArmVirtPkg/ArmVirtQemu.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
}
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf

#
# Status Code Routing
Expand Down
1 change: 1 addition & 0 deletions ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ READ_LOCK_STATUS = TRUE
INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
INF SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf

#
# FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs
Expand Down
1 change: 1 addition & 0 deletions ArmVirtPkg/ArmVirtQemuKernel.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
}
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf

#
# Status Code Routing
Expand Down

0 comments on commit 3e72240

Please sign in to comment.