summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/ivy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/random/ivy.c')
-rw-r--r--sys/dev/random/ivy.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/random/ivy.c b/sys/dev/random/ivy.c
index f9a9832..8ca291e 100644
--- a/sys/dev/random/ivy.c
+++ b/sys/dev/random/ivy.c
@@ -57,6 +57,15 @@ struct random_hardware_source random_ivy = {
.read = random_ivy_read
};
+#if 1
+static inline int
+ivy_rng_store(uint64_t *tmp)
+{
+ *tmp = 0xF001FACE;
+
+ return (sizeof(uint64_t));
+}
+#else
static inline int
ivy_rng_store(uint64_t *tmp)
{
@@ -82,6 +91,7 @@ ivy_rng_store(uint64_t *tmp)
return (0);
#endif
}
+#endif
static int
random_ivy_read(void *buf, int c)
@@ -114,6 +124,10 @@ rdrand_modevent(module_t mod, int type, void *unused)
switch (type) {
case MOD_LOAD:
+#if 1
+ live_entropy_source_register(&random_ivy);
+ printf("%s: CRAP RDRAND is present\n", random_ivy.ident);
+#else
if (cpu_feature2 & CPUID2_RDRAND)
live_entropy_source_register(&random_ivy);
else
@@ -122,6 +136,7 @@ rdrand_modevent(module_t mod, int type, void *unused)
#endif
printf("%s: RDRAND is not present\n",
random_ivy.ident);
+#endif
break;
case MOD_UNLOAD:
OpenPOWER on IntegriCloud