summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTom Cosgrove <tom@cvs.openbsd.org>2004-06-15 21:12:32 +0000
committerTom Cosgrove <tom@cvs.openbsd.org>2004-06-15 21:12:32 +0000
commite48e502f91a9c1d5711fc8c814eef8b21d5e5650 (patch)
treec3d63e654a8f789697f5cbcea909704050b3668b /sys/arch
parentb578edc53e86ae825baff7b8f7cac2380b257488 (diff)
Be more careful about what value we check for crypto capability bits
if the first cpuid returns too low a number. ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/machdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 2bd03934ac6..6b08d58ae29 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.297 2004/06/13 21:49:15 niklas Exp $ */
+/* $OpenBSD: machdep.c,v 1.298 2004/06/15 21:12:31 tom Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -1186,6 +1186,8 @@ cyrix3_cpu_setup(cpu_device, model, step)
if (val >= 0xC0000001) {
__asm __volatile("cpuid"
: "=d" (val) : "a" (0xC0000001) : "cc");
+ } else {
+ val = 0;
}
/* Enable RNG if present and disabled */