You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

efi_entropy.h 652B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _IPXE_EFI_ENTROPY_H
  2. #define _IPXE_EFI_ENTROPY_H
  3. /** @file
  4. *
  5. * EFI entropy source
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. #include <stdint.h>
  10. #ifdef ENTROPY_EFI
  11. #define ENTROPY_PREFIX_efi
  12. #else
  13. #define ENTROPY_PREFIX_efi __efi_
  14. #endif
  15. /**
  16. * min-entropy per sample
  17. *
  18. * @ret min_entropy min-entropy of each sample
  19. */
  20. static inline __always_inline min_entropy_t
  21. ENTROPY_INLINE ( efi, min_entropy_per_sample ) ( void ) {
  22. /* We use essentially the same mechanism as for the BIOS
  23. * RTC-based entropy source, and so assume the same
  24. * min-entropy per sample.
  25. */
  26. return MIN_ENTROPY ( 1.3 );
  27. }
  28. #endif /* _IPXE_EFI_ENTROPY_H */