diff options
author | Michael Brown <mcb30@ipxe.org> | 2023-02-17 16:56:11 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2023-02-17 21:29:51 +0000 |
commit | 9f17d1116d27696ec76c48c5c77df34cba521380 (patch) | |
tree | 381ddb4988380ab1c5c4c59bb27ab7aea9bfc081 /src/arch/loong64/include | |
parent | 2733c4763a50b9eb0c206e7430d4d0638451e5e9 (diff) | |
download | ipxe-9f17d1116d27696ec76c48c5c77df34cba521380.tar.gz |
[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/arch/loong64/include')
-rw-r--r-- | src/arch/loong64/include/bits/entropy.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/arch/loong64/include/bits/entropy.h b/src/arch/loong64/include/bits/entropy.h deleted file mode 100644 index 8d3726930..000000000 --- a/src/arch/loong64/include/bits/entropy.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _BITS_ENTROPY_H -#define _BITS_ENTROPY_H - -/** @file - * - * LoongArch64-specific entropy API implementations - * - */ - -FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - -#endif /* _BITS_ENTROPY_H */ |