iPXE
efi_entropy.h
Go to the documentation of this file.
00001 #ifndef _IPXE_EFI_ENTROPY_H
00002 #define _IPXE_EFI_ENTROPY_H
00003 
00004 /** @file
00005  *
00006  * EFI entropy source
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 #include <stdint.h>
00013 
00014 #ifdef ENTROPY_EFI
00015 #define ENTROPY_PREFIX_efi
00016 #else
00017 #define ENTROPY_PREFIX_efi __efi_
00018 #endif
00019 
00020 /**
00021  * min-entropy per sample
00022  *
00023  * @ret min_entropy     min-entropy of each sample
00024  */
00025 static inline __always_inline min_entropy_t
00026 ENTROPY_INLINE ( efi, min_entropy_per_sample ) ( void ) {
00027 
00028         /* We use essentially the same mechanism as for the BIOS
00029          * RTC-based entropy source, and so assume the same
00030          * min-entropy per sample.
00031          */
00032         return MIN_ENTROPY ( 1.3 );
00033 }
00034 
00035 #endif /* _IPXE_EFI_ENTROPY_H */