As noted in commit3c83843("[rng] Check for several functioning RTC interrupts"), experimentation shows that Hyper-V cannot be trusted to reliably generate RTC interrupts. (As noted in commitf3ba0fb("[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>
41 lines
725 B
C
41 lines
725 B
C
#ifndef CONFIG_DEFAULTS_LINUX_H
|
|
#define CONFIG_DEFAULTS_LINUX_H
|
|
|
|
/** @file
|
|
*
|
|
* Configuration defaults for linux
|
|
*
|
|
*/
|
|
|
|
FILE_LICENCE ( GPL2_OR_LATER );
|
|
|
|
#define CONSOLE_LINUX
|
|
#define TIMER_LINUX
|
|
#define UACCESS_LINUX
|
|
#define UMALLOC_LINUX
|
|
#define NAP_LINUX
|
|
#define SMBIOS_LINUX
|
|
#define SANBOOT_DUMMY
|
|
#define ENTROPY_LINUX
|
|
#define TIME_LINUX
|
|
#define REBOOT_NULL
|
|
#define PCIAPI_LINUX
|
|
#define DMAAPI_FLAT
|
|
#define ACPI_LINUX
|
|
|
|
#define DRIVERS_LINUX
|
|
|
|
#define IMAGE_SCRIPT
|
|
|
|
#define SANBOOT_PROTO_ISCSI
|
|
#define SANBOOT_PROTO_AOE
|
|
#define SANBOOT_PROTO_IB_SRP
|
|
#define SANBOOT_PROTO_FCP
|
|
#define SANBOOT_PROTO_HTTP
|
|
|
|
#if defined ( __i386__ ) || defined ( __x86_64__ )
|
|
#define ENTROPY_RDRAND
|
|
#endif
|
|
|
|
#endif /* CONFIG_DEFAULTS_LINUX_H */
|