diff options
author | 2004-06-15 21:12:31 +0000 | |
---|---|---|
committer | 2004-06-15 21:12:31 +0000 | |
commit | b9e278471c9edd01145a4776e27ca741f8d02758 (patch) | |
tree | 8bc7f089cbcf676d9a745d3a3ee2bcdd7b4eafc4 | |
parent | export actual xcrypt feature set bitmask (diff) | |
download | wireguard-openbsd-b9e278471c9edd01145a4776e27ca741f8d02758.tar.xz wireguard-openbsd-b9e278471c9edd01145a4776e27ca741f8d02758.zip |
Be more careful about what value we check for crypto capability bits
if the first cpuid returns too low a number.
ok deraadt@
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 4 |
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 */ |