summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2016-02-12 21:36:34 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2016-02-12 21:36:34 +0000
commit558d36d5bfb0521129a5208d52119b087305be43 (patch)
tree1c5b9e79e0c76239478998dabb6f4b7aa1594bcb /sys/arch/i386
parent02745c316e4f3ca759b5f3302af3be544707aee7 (diff)
Remove the "GenuineIntel" check from x86 mdrandom(). Checking the
CPU features is enough, and this enables the use of RDRAND and the TSC fallback on CPUs from other vendors, notably AMD. Tested in snapshots for a month.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/stand/libsa/random_i386.S13
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/arch/i386/stand/libsa/random_i386.S b/sys/arch/i386/stand/libsa/random_i386.S
index 56ad3864e13..fb1de133be3 100644
--- a/sys/arch/i386/stand/libsa/random_i386.S
+++ b/sys/arch/i386/stand/libsa/random_i386.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: random_i386.S,v 1.9 2016/01/12 23:00:13 deraadt Exp $ */
+/* $OpenBSD: random_i386.S,v 1.10 2016/02/12 21:36:33 naddy Exp $ */
/*
* Copyright (c) 2013 Joel Sing <jsing@openbsd.org>
@@ -42,17 +42,6 @@ ENTRY(mdrandom)
andl $PSL_ID, %eax
jz done
- // CPUID leaf = 0, subleaf = 0
- movl $0, %eax
- movl $0, %ecx
- cpuid
- cmpl $0x756e6547, %ebx // "Genu"
- jne done
- cmpl $0x49656e69, %edx // "ineI"
- jne done
- cmpl $0x6c65746e, %ecx // "ntel"
- jne done
-
// CPUID leaf = 1, subleaf = 0
movl $1, %eax
movl $0, %ecx