diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 2001-04-09 07:14:24 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 2001-04-09 07:14:24 +0000 |
commit | 9b1fe5fc1ac937b51295538f4b165a1d9fc9ac95 (patch) | |
tree | c6461a4d96f7af1694080600ef5db641bf8ac344 /sys/arch/i386/isa/npx.c | |
parent | 6f2fdb9ba0804df4f105421d41cd208c8b2f1807 (diff) |
Add emulation of Linux features to procfs; mostly from NetBSD. ok deraadt@
Diffstat (limited to 'sys/arch/i386/isa/npx.c')
-rw-r--r-- | sys/arch/i386/isa/npx.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/i386/isa/npx.c b/sys/arch/i386/isa/npx.c index 2fc02ddc9c9..2a267fa63c2 100644 --- a/sys/arch/i386/isa/npx.c +++ b/sys/arch/i386/isa/npx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npx.c,v 1.17 2000/06/08 22:25:19 niklas Exp $ */ +/* $OpenBSD: npx.c,v 1.18 2001/04/09 07:14:16 tholo Exp $ */ /* $NetBSD: npx.c,v 1.57 1996/05/12 23:12:24 mycroft Exp $ */ #if 0 @@ -144,6 +144,10 @@ static int npx_nointr; static volatile u_int npx_intrs_while_probing; static volatile u_int npx_traps_while_probing; +extern int i386_fpu_present; +extern int i386_fpu_exception; +extern int i386_fpu_fdivbug; + /* * Special interrupt handlers. Someday intr0-intr15 will be used to count * interrupts. We'll still need a special exception 16 handler. The busy @@ -221,6 +225,7 @@ npxprobe1(ia) */ npx_type = NPX_EXCEPTION; ia->ia_irq = IRQUNK; /* zap the interrupt */ + i386_fpu_exception = 1; } else if (npx_intrs_while_probing != 0) { /* * Bad, we are stuck with IRQ13. @@ -354,9 +359,12 @@ npxattach(parent, self, aux) lcr0(rcr0() & ~(CR0_EM|CR0_TS)); fninit(); - if (npx586bug1(4195835, 3145727) != 0) + if (npx586bug1(4195835, 3145727) != 0) { + i386_fpu_fdivbug = 1; printf("WARNING: Pentium FDIV bug detected!\n"); + } lcr0(rcr0() | (CR0_TS)); + i386_fpu_present = 1; } /* |