Module Name:    src
Committed By:   maxv
Date:           Sat May 18 13:44:57 UTC 2019

Modified Files:
        src/sys/arch/x86/x86: identcpu.c

Log Message:
Enable EagerFPU by default. Sent on port-amd64@.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/x86/x86/identcpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/identcpu.c
diff -u src/sys/arch/x86/x86/identcpu.c:1.89 src/sys/arch/x86/x86/identcpu.c:1.90
--- src/sys/arch/x86/x86/identcpu.c:1.89	Wed May 15 18:27:51 2019
+++ src/sys/arch/x86/x86/identcpu.c	Sat May 18 13:44:57 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: identcpu.c,v 1.89 2019/05/15 18:27:51 maxv Exp $	*/
+/*	$NetBSD: identcpu.c,v 1.90 2019/05/18 13:44:57 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.89 2019/05/15 18:27:51 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.90 2019/05/18 13:44:57 maxv Exp $");
 
 #include "opt_xen.h"
 
@@ -745,54 +745,11 @@ cpu_probe_old_fpu(struct cpu_info *ci)
 }
 
 static void
-cpu_probe_fpu_leak(struct cpu_info *ci)
-{
-	/*
-	 * INTEL-SA-00145. Affected CPUs are from Family 6.
-	 */
-	if (cpu_vendor != CPUVENDOR_INTEL) {
-		return;
-	}
-	if (CPUID_TO_FAMILY(ci->ci_signature) != 6) {
-		return;
-	}
-
-	switch (CPUID_TO_MODEL(ci->ci_signature)) {
-	/* Atom CPUs are not vulnerable. */
-	case 0x1c: /* Pineview */
-	case 0x26: /* Lincroft */
-	case 0x27: /* Penwell */
-	case 0x35: /* Cloverview */
-	case 0x36: /* Cedarview */
-	case 0x37: /* Baytrail / Valleyview (Silvermont) */
-	case 0x4d: /* Avaton / Rangely (Silvermont) */
-	case 0x4c: /* Cherrytrail / Brasswell */
-	case 0x4a: /* Merrifield */
-	case 0x5a: /* Moorefield */
-	case 0x5c: /* Goldmont */
-	case 0x5f: /* Denverton */
-	case 0x7a: /* Gemini Lake */
-		break;
-
-	/* Knights CPUs are not vulnerable. */
-	case 0x57: /* Knights Landing */
-	case 0x85: /* Knights Mill */
-		break;
-
-	/* The rest is vulnerable. */
-	default:
-		x86_fpu_eager = true;
-		break;
-	}
-}
-
-static void
 cpu_probe_fpu(struct cpu_info *ci)
 {
 	u_int descs[4];
 
-	cpu_probe_fpu_leak(ci);
-
+	x86_fpu_eager = true;
 	x86_fpu_save = FPU_SAVE_FSAVE;
 
 #ifdef i386

Reply via email to