Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch GC i386_fpu_present. no FPU x86 is not supported.
details: https://anonhg.NetBSD.org/src/rev/b5fb0bbb9cfc
branches: trunk
changeset: 356733:b5fb0bbb9cfc
user: maya <maya%NetBSD.org@localhost>
date: Mon Oct 09 17:49:27 2017 +0000
description:
GC i386_fpu_present. no FPU x86 is not supported.
Also delete newly unused send_sigill
diffstat:
sys/arch/i386/i386/machdep.c | 5 ++---
sys/arch/x86/include/cpu.h | 4 +---
sys/arch/x86/x86/fpu.c | 30 ++----------------------------
sys/arch/x86/x86/identcpu.c | 7 ++-----
sys/arch/x86/x86/procfs_machdep.c | 7 +++----
sys/arch/x86/x86/x86_machdep.c | 6 ++----
6 files changed, 12 insertions(+), 47 deletions(-)
diffs (211 lines):
diff -r 26b6fad73a64 -r b5fb0bbb9cfc sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Mon Oct 09 17:41:18 2017 +0000
+++ b/sys/arch/i386/i386/machdep.c Mon Oct 09 17:49:27 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.795 2017/09/30 11:43:57 maxv Exp $ */
+/* $NetBSD: machdep.c,v 1.796 2017/10/09 17:49:27 maya Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009, 2017
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.795 2017/09/30 11:43:57 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.796 2017/10/09 17:49:27 maya Exp $");
#include "opt_beep.h"
#include "opt_compat_freebsd.h"
@@ -212,7 +212,6 @@
int cpu_class;
int use_pae;
-int i386_fpu_present = 1;
int i386_fpu_fdivbug;
int i386_use_fxsave;
diff -r 26b6fad73a64 -r b5fb0bbb9cfc sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h Mon Oct 09 17:41:18 2017 +0000
+++ b/sys/arch/x86/include/cpu.h Mon Oct 09 17:49:27 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.79 2017/09/16 09:28:38 maxv Exp $ */
+/* $NetBSD: cpu.h,v 1.80 2017/10/09 17:49:27 maya Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -381,14 +381,12 @@
extern int use_pae;
#ifdef __i386__
-extern int i386_fpu_present;
int npx586bug1(int, int);
extern int i386_fpu_fdivbug;
extern int i386_use_fxsave;
extern int i386_has_sse;
extern int i386_has_sse2;
#else
-#define i386_fpu_present 1
#define i386_fpu_fdivbug 0
#define i386_use_fxsave 1
#define i386_has_sse 1
diff -r 26b6fad73a64 -r b5fb0bbb9cfc sys/arch/x86/x86/fpu.c
--- a/sys/arch/x86/x86/fpu.c Mon Oct 09 17:41:18 2017 +0000
+++ b/sys/arch/x86/x86/fpu.c Mon Oct 09 17:49:27 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.13 2017/09/17 09:41:35 maxv Exp $ */
+/* $NetBSD: fpu.c,v 1.14 2017/10/09 17:49:28 maya Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc. All
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.13 2017/09/17 09:41:35 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.14 2017/10/09 17:49:28 maya Exp $");
#include "opt_multiprocessor.h"
@@ -219,28 +219,12 @@
void
fpuinit(struct cpu_info *ci)
{
- if (!i386_fpu_present)
- return;
clts();
fninit();
stts();
}
-static void
-send_sigill(void *rip)
-{
- /* No fpu (486SX) - send SIGILL */
- ksiginfo_t ksi;
-
- x86_enable_intr();
- KSI_INIT_TRAP(&ksi);
- ksi.ksi_signo = SIGILL;
- ksi.ksi_addr = rip;
- (*curlwp->l_proc->p_emul->e_trapsignal)(curlwp, &ksi);
- return;
-}
-
/*
* This is a synchronous trap on either an x87 instruction (due to an
* unmasked error on the previous x87 instruction) or on an SSE/SSE2 etc
@@ -276,11 +260,6 @@
if (!USERMODE(frame->tf_cs))
panic("fpu trap from kernel, trapframe %p\n", frame);
- if (i386_fpu_present == 0) {
- send_sigill((void *)X86_TF_RIP(frame));
- return;
- }
-
/*
* At this point, fpcurlwp should be curlwp. If it wasn't, the TS bit
* should be set, and we should have gotten a DNA exception.
@@ -343,11 +322,6 @@
panic("fpudna from kernel, ip %p, trapframe %p\n",
(void *)X86_TF_RIP(frame), frame);
- if (i386_fpu_present == 0) {
- send_sigill((void *)X86_TF_RIP(frame));
- return;
- }
-
ci = curcpu();
/* Save soft spl level - interrupts are hard disabled */
diff -r 26b6fad73a64 -r b5fb0bbb9cfc sys/arch/x86/x86/identcpu.c
--- a/sys/arch/x86/x86/identcpu.c Mon Oct 09 17:41:18 2017 +0000
+++ b/sys/arch/x86/x86/identcpu.c Mon Oct 09 17:49:27 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: identcpu.c,v 1.59 2017/10/09 17:41:18 maya Exp $ */
+/* $NetBSD: identcpu.c,v 1.60 2017/10/09 17:49:28 maya 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.59 2017/10/09 17:41:18 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.60 2017/10/09 17:49:28 maya Exp $");
#include "opt_xen.h"
@@ -971,9 +971,6 @@
#endif
#ifdef i386
- if (i386_fpu_present == 0)
- aprint_normal_dev(ci->ci_dev, "no fpu\n");
-
if (i386_fpu_fdivbug == 1)
aprint_normal_dev(ci->ci_dev,
"WARNING: Pentium FDIV bug detected!\n");
diff -r 26b6fad73a64 -r b5fb0bbb9cfc sys/arch/x86/x86/procfs_machdep.c
--- a/sys/arch/x86/x86/procfs_machdep.c Mon Oct 09 17:41:18 2017 +0000
+++ b/sys/arch/x86/x86/procfs_machdep.c Mon Oct 09 17:49:27 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_machdep.c,v 1.18 2017/10/05 03:24:40 msaitoh Exp $ */
+/* $NetBSD: procfs_machdep.c,v 1.19 2017/10/09 17:49:28 maya Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.18 2017/10/05 03:24:40 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.19 2017/10/09 17:49:28 maya Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -420,7 +420,7 @@
#ifdef __i386__
"fdiv_bug\t: %s\n"
#endif
- "fpu\t\t: %s\n"
+ "fpu\t\t: yes\n"
"fpu_exception\t: yes\n"
"cpuid level\t: %d\n"
"wp\t\t: %s\n"
@@ -429,7 +429,6 @@
#ifdef __i386__
i386_fpu_fdivbug ? "yes" : "no", /* an old pentium */
#endif
- i386_fpu_present ? "yes" : "no", /* not a 486SX */
ci->ci_max_cpuid,
(rcr0() & CR0_WP) ? "yes" : "no",
featurebuf,
diff -r 26b6fad73a64 -r b5fb0bbb9cfc sys/arch/x86/x86/x86_machdep.c
--- a/sys/arch/x86/x86/x86_machdep.c Mon Oct 09 17:41:18 2017 +0000
+++ b/sys/arch/x86/x86/x86_machdep.c Mon Oct 09 17:49:27 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_machdep.c,v 1.97 2017/10/08 09:06:50 maxv Exp $ */
+/* $NetBSD: x86_machdep.c,v 1.98 2017/10/09 17:49:28 maya Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.97 2017/10/08 09:06:50 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.98 2017/10/09 17:49:28 maya Exp $");
#include "opt_modular.h"
#include "opt_physmem.h"
@@ -1233,8 +1233,6 @@
#endif
/* None of these can ever change once the system has booted */
- const_sysctl(clog, "fpu_present", CTLTYPE_INT, i386_fpu_present,
- CPU_FPU_PRESENT);
const_sysctl(clog, "osfxsr", CTLTYPE_INT, i386_use_fxsave,
CPU_OSFXSR);
const_sysctl(clog, "sse", CTLTYPE_INT, i386_has_sse,
Home |
Main Index |
Thread Index |
Old Index