65#define EFIRNG_MAX_RETRY 16
76 DBGC ( &
efirng,
"EFIRNG has no RNG protocol\n" );
120 *noise =
crc32_le ( 0, buf,
sizeof ( buf ) );
124 DBGC ( &
efirng,
"ENTROPY could not read from RNG: %s\n",
#define NULL
NULL pointer (VOID *)
EFI_RNG_PROTOCOL as defined in UEFI 2.4.
EFI_RNG_INTERFACE EFI_RNG_PROTOCOL
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
struct arbelprm_rc_send_wqe rc
#define assert(condition)
Assert a condition at run-time.
u32 crc32_le(u32 seed, const void *data, size_t len)
Calculate 32-bit little-endian CRC checksum.
#define EFIRNG_LEN
Minimum number of bytes to request from RNG.
static int efirng_enable(void)
Enable entropy gathering.
static int efirng_get_noise(noise_sample_t *noise)
Get noise sample from RNG protocol.
#define EFIRNG_MAX_RETRY
Maximum number of times to attempting requesting data from RNG.
static EFI_RNG_PROTOCOL * efirng
Random number generator protocol.
#define ENTROPY_NORMAL
Normal entropy source.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ENOTSUP
Operation not supported.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
#define EFI_REQUEST_PROTOCOL(_protocol, _ptr)
Declare an EFI protocol to be requested by iPXE.
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
static void entropy_init(struct entropy_source *source, min_entropy_t min_entropy_per_sample)
Initialise entropy source.
#define MIN_ENTROPY(bits)
Construct a min-entropy fixed-point value.
uint8_t noise_sample_t
A noise sample.
#define __entropy_source(order)
Declare an entropy source.
char * strerror(int errno)
Retrieve string representation of error number.