iPXE
efi_entropy.h
Go to the documentation of this file.
1 #ifndef _IPXE_EFI_ENTROPY_H
2 #define _IPXE_EFI_ENTROPY_H
3 
4 /** @file
5  *
6  * EFI entropy source
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <stdint.h>
13 
14 #ifdef ENTROPY_EFI
15 #define ENTROPY_PREFIX_efi
16 #else
17 #define ENTROPY_PREFIX_efi __efi_
18 #endif
19 
20 /**
21  * min-entropy per sample
22  *
23  * @ret min_entropy min-entropy of each sample
24  */
25 static inline __always_inline min_entropy_t
27 
28  /* We use essentially the same mechanism as for the BIOS
29  * RTC-based entropy source, and so assume the same
30  * min-entropy per sample.
31  */
32  return MIN_ENTROPY ( 1.3 );
33 }
34 
35 #endif /* _IPXE_EFI_ENTROPY_H */
min_entropy_t min_entropy_per_sample(void)
min-entropy per sample
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define __always_inline
Declare a function to be always inline.
Definition: compiler.h:611
#define MIN_ENTROPY(bits)
Construct a min-entropy fixed-point value.
Definition: entropy.h:71
unsigned int min_entropy_t
An amount of min-entropy.
Definition: entropy.h:60
static __always_inline min_entropy_t ENTROPY_INLINE(efi, min_entropy_per_sample)(void)
min-entropy per sample
Definition: efi_entropy.h:26