summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/npx.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-10-23 21:28:03 +0000
committerwollman <wollman@FreeBSD.org>1994-10-23 21:28:03 +0000
commit7b8e09399aded7c12a148b104ccf05419e73ba88 (patch)
treec2370b235711beb410091996b92230bc38cd2a7e /sys/i386/isa/npx.c
parent5727d2fc7e7202ade434ecfa3f1e91a6f714d47e (diff)
downloadFreeBSD-src-7b8e09399aded7c12a148b104ccf05419e73ba88.zip
FreeBSD-src-7b8e09399aded7c12a148b104ccf05419e73ba88.tar.gz
Finished device configuration database work for all ISA devices (except `ze')
and all SCSI devices (except that it's not done quite the way I want). New information added includes: - A text description of the device - A ``state''---unknown, unconfigured, idle, or busy - A generic parent device (with support in the m.i. code) - An interrupt mask type field (which will hopefully go away) so that . ``doconfig'' can be written This requires a new version of the `lsdev' program as well (next commit).
Diffstat (limited to 'sys/i386/isa/npx.c')
-rw-r--r--sys/i386/isa/npx.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c
index 98e2276..991bfd9 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
- * $Id: npx.c,v 1.13 1994/09/22 14:44:16 davidg Exp $
+ * $Id: npx.c,v 1.14 1994/10/08 22:27:58 phk Exp $
*/
#include "npx.h"
@@ -43,11 +43,14 @@
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/proc.h>
+#include <sys/devconf.h>
+#include <sys/ioctl.h>
+
#include <machine/cpu.h>
#include <machine/pcb.h>
#include <machine/trap.h>
-#include <sys/ioctl.h>
#include <machine/specialreg.h>
+
#include <i386/isa/icu.h>
#include <i386/isa/isa_device.h>
#include <i386/isa/isa.h>
@@ -302,6 +305,26 @@ npxprobe1(dvp)
return (-1);
}
+static struct kern_devconf kdc_npx[NNPX] = { {
+ 0, 0, 0, /* filled in by dev_attach */
+ "npx", 0, { MDDT_ISA, 0 },
+ isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
+ &kdc_isa0, /* parent */
+ 0, /* parentdata */
+ DC_UNKNOWN, /* not supported */
+ "Floating-point unit"
+} };
+
+static inline void
+npx_registerdev(struct isa_device *id)
+{
+ if(id->id_unit)
+ kdc_npx[id->id_unit] = kdc_npx[0];
+ kdc_npx[id->id_unit].kdc_unit = id->id_unit;
+ kdc_npx[id->id_unit].kdc_isa = id;
+ dev_attach(&kdc_npx[id->id_unit]);
+}
+
/*
* Attach routine - announce which it is, and wire into system
*/
@@ -318,6 +341,7 @@ npxattach(dvp)
}
}
npxinit(__INITIAL_NPXCW__);
+ npx_registerdev(dvp);
return (1); /* XXX unused */
}
OpenPOWER on IntegriCloud