diff options
| author | Bruce Evans <bde@FreeBSD.org> | 2001-10-21 05:18:30 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 2001-10-21 05:18:30 +0000 |
| commit | 40d8c8da9521816bf6decf7536a30a5ca6d92cbb (patch) | |
| tree | 5259abeeefa5c8fbef7ab758a990bd66fa8597cf /sys | |
| parent | d7ae92aeb3dfe18779ba6a2395a71750a7c1b528 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/amd64/amd64/fpu.c | 9 | ||||
| -rw-r--r-- | sys/amd64/isa/npx.c | 9 | ||||
| -rw-r--r-- | sys/i386/isa/npx.c | 9 |
3 files changed, 27 insertions, 0 deletions
diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index b742f50f4195..620356d4d243 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -38,6 +38,7 @@ #include "opt_cpu.h" #include "opt_debug_npx.h" #include "opt_math_emulate.h" +#include "opt_npx.h" #include <sys/param.h> #include <sys/systm.h> @@ -363,6 +364,14 @@ npx_probe(dev) */ control &= ~(1 << 2); /* enable divide by 0 trap */ fldcw(&control); +#ifdef FPU_ERROR_BROKEN + /* + * FPU error signal doesn't work on some CPU + * accelerator board. + */ + npx_ex16 = 1; + return (0); +#endif npx_traps_while_probing = npx_intrs_while_probing = 0; fp_divide_by_0(); if (npx_traps_while_probing != 0) { diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c index b742f50f4195..620356d4d243 100644 --- a/sys/amd64/isa/npx.c +++ b/sys/amd64/isa/npx.c @@ -38,6 +38,7 @@ #include "opt_cpu.h" #include "opt_debug_npx.h" #include "opt_math_emulate.h" +#include "opt_npx.h" #include <sys/param.h> #include <sys/systm.h> @@ -363,6 +364,14 @@ npx_probe(dev) */ control &= ~(1 << 2); /* enable divide by 0 trap */ fldcw(&control); +#ifdef FPU_ERROR_BROKEN + /* + * FPU error signal doesn't work on some CPU + * accelerator board. + */ + npx_ex16 = 1; + return (0); +#endif npx_traps_while_probing = npx_intrs_while_probing = 0; fp_divide_by_0(); if (npx_traps_while_probing != 0) { diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index b742f50f4195..620356d4d243 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -38,6 +38,7 @@ #include "opt_cpu.h" #include "opt_debug_npx.h" #include "opt_math_emulate.h" +#include "opt_npx.h" #include <sys/param.h> #include <sys/systm.h> @@ -363,6 +364,14 @@ npx_probe(dev) */ control &= ~(1 << 2); /* enable divide by 0 trap */ fldcw(&control); +#ifdef FPU_ERROR_BROKEN + /* + * FPU error signal doesn't work on some CPU + * accelerator board. + */ + npx_ex16 = 1; + return (0); +#endif npx_traps_while_probing = npx_intrs_while_probing = 0; fp_divide_by_0(); if (npx_traps_while_probing != 0) { |
