iPXE
|
Hardware random number generator. More...
Go to the source code of this file.
Macros | |
#define | RDRAND_RETRY_COUNT 16 |
Number of times to retry RDRAND instruction. More... | |
#define | colour &rdrand_entropy |
Colour for debug messages. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
struct entropy_source rdrand_entropy | __entropy_source (ENTROPY_PREFERRED) |
Hardware random number generator entropy source. More... | |
static int | rdrand_entropy_enable (void) |
Enable entropy gathering. More... | |
static int | rdrand_get_noise (noise_sample_t *noise) |
Get noise sample. More... | |
Hardware random number generator.
Definition in file rdrand.c.
#define RDRAND_RETRY_COUNT 16 |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
struct entropy_source rdrand_entropy __entropy_source | ( | ENTROPY_PREFERRED | ) |
Hardware random number generator entropy source.
|
static |
Enable entropy gathering.
rc | Return status code |
Definition at line 50 of file rdrand.c.
References colour, CPUID_FEATURES_INTEL_ECX_RDRAND, DBGC, DRBG_SECURITY_STRENGTH, ENOTSUP, entropy_init(), features, MIN_ENTROPY, and x86_features().
|
static |
Get noise sample.
noise | Noise sample |
rc | Return status code |
Definition at line 77 of file rdrand.c.
References __asm__(), colour, DBGC, discard_c, EBUSY, ok, RDRAND_RETRY_COUNT, and result.