summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa/npx.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-09-09 23:13:03 +0000
committerwollman <wollman@FreeBSD.org>1994-09-09 23:13:03 +0000
commit7ae0ceacbd790042fc8fd8c57ceb9f029a9f7063 (patch)
tree7a7915e914c73b1a56a67d5a7cd912dbccca3e80 /sys/amd64/isa/npx.c
parent7ae6d81d7195b7a1bbde6cf488bb8a27b18f46bb (diff)
downloadFreeBSD-src-7ae0ceacbd790042fc8fd8c57ceb9f029a9f7063.zip
FreeBSD-src-7ae0ceacbd790042fc8fd8c57ceb9f029a9f7063.tar.gz
Define new MIB variable, hw.floatingpoint, which is true if FP hardware
is present, and false if an emulator is being used.
Diffstat (limited to 'sys/amd64/isa/npx.c')
-rw-r--r--sys/amd64/isa/npx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/amd64/isa/npx.c b/sys/amd64/isa/npx.c
index f7f9b27..fcc31ba 100644
--- a/sys/amd64/isa/npx.c
+++ b/sys/amd64/isa/npx.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.9 1994/06/11 05:17:15 davidg Exp $
+ * $Id: npx.c,v 1.10 1994/08/13 03:50:11 wollman Exp $
*/
#include "npx.h"
@@ -119,6 +119,7 @@ struct proc *npxproc;
static bool_t npx_ex16;
static bool_t npx_exists;
+int hw_float;
static struct gate_descriptor npx_idt_probeintr;
static int npx_intrno;
static volatile u_int npx_intrs_while_probing;
@@ -266,7 +267,7 @@ npxprobe1(dvp)
control = 0x5a5a;
fnstcw(&control);
if ((control & 0x1f3f) == 0x033f) {
- npx_exists = 1;
+ hw_float = npx_exists = 1;
/*
* We have an npx, now divide by 0 to see if exception
* 16 works.
@@ -323,7 +324,7 @@ npxattach(dvp)
if (!npx_ex16 && !npx_irq13) {
if (npx_exists) {
printf("npx%d: Error reporting broken, using 387 emulator\n",dvp->id_unit);
- npx_exists = 0;
+ hw_float = npx_exists = 0;
} else {
printf("npx%d: 387 Emulator\n",dvp->id_unit);
}
OpenPOWER on IntegriCloud