summaryrefslogtreecommitdiff
path: root/sys/arch/i386/i386/machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386/i386/machdep.c')
-rw-r--r--sys/arch/i386/i386/machdep.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index e76449d9090..97591d87adb 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.511 2012/08/24 02:49:23 guenther Exp $ */
+/* $OpenBSD: machdep.c,v 1.512 2012/09/19 20:19:31 jsg Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -306,6 +306,8 @@ int allowaperture = 0;
#endif
#endif
+int has_rdrand;
+
void winchip_cpu_setup(struct cpu_info *);
void amd_family5_setperf_setup(struct cpu_info *);
void amd_family5_setup(struct cpu_info *);
@@ -1906,6 +1908,11 @@ identifycpu(struct cpu_info *ci)
}
}
+ if (ci->ci_flags & CPUF_PRIMARY) {
+ if (cpu_ecxfeature & CPUIDECX_RDRAND)
+ has_rdrand = 1;
+ }
+
#ifndef SMALL_KERNEL
if (cpuspeed != 0 && cpu_cpuspeed == NULL)
cpu_cpuspeed = pentium_cpuspeed;