summaryrefslogtreecommitdiffstats
path: root/src/config/defaults/pcbios.h
diff options
context:
space:
mode:
authorMichael Brown2023-02-17 17:56:11 +0100
committerMichael Brown2023-02-17 22:29:51 +0100
commit9f17d1116d27696ec76c48c5c77df34cba521380 (patch)
tree381ddb4988380ab1c5c4c59bb27ab7aea9bfc081 /src/config/defaults/pcbios.h
parent[iscsi] Limit maximum transfer size to MaxBurstLength (diff)
downloadipxe-9f17d1116d27696ec76c48c5c77df34cba521380.tar.gz
ipxe-9f17d1116d27696ec76c48c5c77df34cba521380.tar.xz
ipxe-9f17d1116d27696ec76c48c5c77df34cba521380.zip
[rng] Allow entropy source to be selected at runtime
As noted in commit 3c83843 ("[rng] Check for several functioning RTC interrupts"), experimentation shows that Hyper-V cannot be trusted to reliably generate RTC interrupts. (As noted in commit f3ba0fb ("[hyperv] Provide timer based on the 10MHz time reference count MSR"), Hyper-V appears to suffer from a general problem in reliably generating any legacy interrupts.) An alternative entropy source is therefore required for an image that may be used in a Hyper-V Gen1 virtual machine. The x86 RDRAND instruction provides a suitable alternative entropy source, but may not be supported by all CPUs. We must therefore allow for multiple entropy sources to be compiled in, with the single active entropy source selected only at runtime. Restructure the internal entropy API to allow a working entropy source to be detected and chosen at runtime. Enable the RDRAND entropy source for all x86 builds, since it is likely to be substantially faster than any other source. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/config/defaults/pcbios.h')
-rw-r--r--src/config/defaults/pcbios.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config/defaults/pcbios.h b/src/config/defaults/pcbios.h
index 83835805..ee342d41 100644
--- a/src/config/defaults/pcbios.h
+++ b/src/config/defaults/pcbios.h
@@ -20,6 +20,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define SMBIOS_PCBIOS
#define SANBOOT_PCBIOS
#define ENTROPY_RTC
+#define ENTROPY_RDRAND
#define TIME_RTC
#define REBOOT_PCBIOS
#define ACPI_RSDP