Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/random/ivy.c
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
x86_unimpl_store(u_long *buf __unused) | x86_unimpl_store(u_long *buf __unused) | ||||
{ | { | ||||
panic("%s called", __func__); | panic("%s called", __func__); | ||||
} | } | ||||
DEFINE_IFUNC(static, int, x86_rng_store, (u_long *buf), static) | DEFINE_IFUNC(static, int, x86_rng_store, (u_long *buf)) | ||||
{ | { | ||||
has_rdrand = (cpu_feature2 & CPUID2_RDRAND); | has_rdrand = (cpu_feature2 & CPUID2_RDRAND); | ||||
has_rdseed = (cpu_stdext_feature & CPUID_STDEXT_RDSEED); | has_rdseed = (cpu_stdext_feature & CPUID_STDEXT_RDSEED); | ||||
if (has_rdseed) | if (has_rdseed) | ||||
return (x86_rdseed_store); | return (x86_rdseed_store); | ||||
else if (has_rdrand) | else if (has_rdrand) | ||||
return (x86_rdrand_store); | return (x86_rdrand_store); | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |