diff options
| author | Michael Brown | 2018-03-20 19:42:39 +0100 |
|---|---|---|
| committer | Michael Brown | 2018-03-20 19:56:01 +0100 |
| commit | 0d35411f88dd37dda755d52b4549337f8299c698 (patch) | |
| tree | 9129fb0cee236f97af83024b5910cb2cb2b83b08 /src/include/ipxe/efi | |
| parent | [golan] Set log_max_qp to 1 (diff) | |
| download | ipxe-0d35411f88dd37dda755d52b4549337f8299c698.tar.gz ipxe-0d35411f88dd37dda755d52b4549337f8299c698.tar.xz ipxe-0d35411f88dd37dda755d52b4549337f8299c698.zip | |
[rng] Use fixed-point calculations for min-entropy quantities
We currently perform various min-entropy calculations using build-time
floating-point arithmetic. No floating-point code ends up in the
final binary, since the results are eventually converted to integers
and asserted to be compile-time constants.
Though this mechanism is undoubtedly cute, it inhibits us from using
"-mno-sse" to prevent the use of SSE registers by the compiler.
Fix by using fixed-point arithmetic instead.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/efi')
| -rw-r--r-- | src/include/ipxe/efi/efi_entropy.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/ipxe/efi/efi_entropy.h b/src/include/ipxe/efi/efi_entropy.h index 39a667355..5b16fd7f9 100644 --- a/src/include/ipxe/efi/efi_entropy.h +++ b/src/include/ipxe/efi/efi_entropy.h @@ -22,14 +22,14 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); * * @ret min_entropy min-entropy of each sample */ -static inline __always_inline double +static inline __always_inline min_entropy_t ENTROPY_INLINE ( efi, min_entropy_per_sample ) ( void ) { /* We use essentially the same mechanism as for the BIOS * RTC-based entropy source, and so assume the same * min-entropy per sample. */ - return 1.3; + return MIN_ENTROPY ( 1.3 ); } #endif /* _IPXE_EFI_ENTROPY_H */ |
