1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/sys/i386/isa
Julian Elischer 376c314995 the second set of changes in a move towards getting devices to be
totally dynamic. (the first was about 7 weeeks ago)

this is only the devices in i386/isa
I'll do more tomorrow.
they're completely masked by #ifdef JREMOD at this stage...
the eventual aim is that every driver will do a SYSINIT
at startup BEFORE the probes, which will effectively
link it into the devsw tables etc.

If I'd thought about it more I'd have put that in in this set (damn)
The ioconf lines generated by config will also end up in the
device's own scope as well, so ioconf.c will eventually be gutted
the SYSINIT call to the driver will include a phase where the
driver links it's ioconf line into a chain of such. when this phase is done
then the user can modify them with the boot: -c
config menu if he wants, just like now..
config will put the config lines out in the .h file
(e.g. in aha.h will be the addresses for the aha driver to look.)
as I said this is a very small first step..
the aim of THIS set of edits is to not have to edit conf.c at all when
adding a new device.. the tabe will be a simple skeleton..

when this is done, it will allow other changes to be made,
all teh time still having a fully working kernel tree,
but the logical outcome is the complete REMOVAL of the devsw tables.

By the end of this, linked in drivers will be exactly the same as
run-time loaded drivers, except they JUST HAPPEN to already be linked
and present at startup..
the SYSINIT calls will be the equivalent of the "init" call
made to a newly loaded driver in every respect.

For this edit,
each of the files has the following code inserted into it:

obviously, tailored to suit..
----------------------somewhere at the top:
#ifdef JREMOD
#include <sys/conf.h>
#define CDEV_MAJOR 13
#define BDEV_MAJOR 4
static void 	sd_devsw_install();
#endif /*JREMOD */
---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT
#ifdef JREMOD
        sd_devsw_install();
#endif /*JREMOD*/
-----------------------at the bottom:
#ifdef JREMOD
struct bdevsw sd_bdevsw =
	{ sdopen,	sdclose,	sdstrategy,	sdioctl,	/*4*/
	  sddump,	sdsize,		0 };

struct cdevsw sd_cdevsw =
	{ sdopen,	sdclose,	rawread,	rawwrite,	/*13*/
	  sdioctl,	nostop,		nullreset,	nodevtotty,/* sd */
	  seltrue,	nommap,		sdstrategy };

static sd_devsw_installed = 0;

static void 	sd_devsw_install()
{
	dev_t descript;
	if( ! sd_devsw_installed ) {
		descript = makedev(CDEV_MAJOR,0);
		cdevsw_add(&descript,&sd_cdevsw,NULL);
#if defined(BDEV_MAJOR)
		descript = makedev(BDEV_MAJOR,0);
		bdevsw_add(&descript,&sd_bdevsw,NULL);
#endif /*BDEV_MAJOR*/
		sd_devsw_installed = 1;
	}
}
#endif /* JREMOD */
1995-11-28 09:43:45 +00:00
..
ic This driver supports the Arnet SYNC/570i ISA cards that is based on the 1995-11-21 02:32:04 +00:00
matcd the second set of changes in a move towards getting devices to be 1995-11-28 09:43:45 +00:00
pcvt Completed function declarations and/or added prototypes. 1995-11-24 15:15:30 +00:00
sound the second set of changes in a move towards getting devices to be 1995-11-28 09:43:45 +00:00
aha1542.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
aha1742.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
aha2742.c
aic6360.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
aic7770.c ahcprobe now takes a flags argument. For EISA/VL adapters set it to 1995-09-05 23:39:31 +00:00
asc.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
ascreg.h added ID strings so we know what version we have... 1995-09-08 18:30:34 +00:00
atapi.c Changed the first (name) arg of MOD_DEV(), MOD_EXEC() and MOD_MISC() 1995-11-14 07:35:57 +00:00
atapi.h Completed function declarations and/or added prototypes. 1995-11-21 12:55:26 +00:00
b004.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
b004.h
bt742a.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
clock.c Remove unused functions and variables, make things static, and other cleanups. 1995-10-28 15:39:31 +00:00
creative.h
cronyx.c Remove bogus includes that became fatal after the previous (intended to 1995-10-10 05:41:39 +00:00
ctx.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
ctxreg.h
cx.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
cxreg.h
cy.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
cyreg.h
diskslice_machdep.c Remove unused functions and variables, make things static, and other cleanups. 1995-10-28 15:39:31 +00:00
elink.c
elink.h
fd.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
fdc.h
fdreg.h
ft.c Mega commit for sysctl. 1995-11-20 12:42:39 +00:00
ftreg.h
gpib.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
gpib.h
gpibreg.h
gsc.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
gscreg.h
icu.h
icu.s
if_ar.c This driver supports the Arnet SYNC/570i ISA cards that is based on the 1995-11-21 02:32:04 +00:00
if_arregs.h This driver supports the Arnet SYNC/570i ISA cards that is based on the 1995-11-21 02:32:04 +00:00
if_cx.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
if_ed.c Fixed staticization - use `static' in function headers, not just in 1995-11-18 08:29:04 +00:00
if_edreg.h if_ze.c was derived from if_ed.c about 42 (!) versions ago. It is now 1995-09-26 08:57:47 +00:00
if_eg.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
if_egreg.h
if_el.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
if_elreg.h
if_ep.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
if_epreg.h
if_fe.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
if_fereg.h
if_ie507.h
if_ie.c Fixed the type of a timeout function. 1995-11-18 08:35:49 +00:00
if_iereg.h
if_is.c
if_isreg.h
if_ix.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
if_ixreg.h
if_le.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
if_lnc.c Cleanup, make things static. 1995-10-31 18:41:49 +00:00
if_lnc.h Cleanup, make things static. 1995-10-31 18:41:49 +00:00
if_ze.c Fixed the types of the apm hook functions. 1995-11-18 08:39:28 +00:00
if_zereg.h
if_zp.c Fixed the types of the apm hook functions. 1995-11-18 08:58:14 +00:00
if_zpreg.h
isa_device.h Mega commit for sysctl. 1995-11-20 12:42:39 +00:00
isa.c Quick fix for stat_imask and intr_mask[8] not having the RTC interrupt 1995-11-20 13:24:18 +00:00
isa.h Updated comments. The comments about the unused addresses get broken 1995-11-18 09:29:39 +00:00
iso8859.font
joy.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
kbd.h
kbdtables.h
labpc.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
lpt.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
lptreg.h
matcd.c
matcd.h
mcd.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
mcdreg.h
mse.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
ncr5380.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
npx.c Sorry, the last commit screwed up for me, this is the right one (I hope!) 1995-10-28 13:07:28 +00:00
npx.c.orig
options.h
pas.c
pcaudio.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
pcibus.c Make CONF1_ENABLE_MSK1 even less restriktive: Ignore slot ID ... 1995-10-17 23:30:11 +00:00
pcic.c
pcic.h
pcicx.c Get pccard stuff into LINT. 1995-10-31 18:28:55 +00:00
psm.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
random.c move variables inside the #ifdef. 1995-11-20 12:12:02 +00:00
rc.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
rcreg.h Allow any speed from 0..76800 1995-08-02 10:17:35 +00:00
readMBR.c
README.le
rtc.h BIOS manufacturers don't seem to have a unique idea about 2.88 MB 1995-10-09 15:00:39 +00:00
scd.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
scdreg.h
seagate.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
si_code.c Drat! I forgot to add this part of the Specialix Driver.. 1995-08-10 08:10:57 +00:00
si.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
sio.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
sioreg.h
sireg.h Mainly cosmetic cleanups... It now uses more consistant message reporting 1995-11-28 02:07:36 +00:00
spigot.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
spkr.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
syscons.c Separate colors & attributes as Terry points 1995-11-28 00:17:32 +00:00
syscons.h Separate colors & attributes as Terry points 1995-11-28 00:17:32 +00:00
timerreg.h
tw.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
ultra14f.c Make a lot of private stuff static 1995-11-14 09:53:17 +00:00
vector.s Remove the #ifdev DEVRANDOM's, as promised. 1995-11-04 16:00:56 +00:00
wcd.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
wd7000.c Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
wd.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
wdreg.h Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up the 1995-11-04 17:08:13 +00:00
wt.c the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
wtreg.h

$Id: README.le,v 1.1 1994/10/01 20:15:43 wollman Exp $

----------------

This driver is in no way supported by Digital Equipment.  See the
disclaimers in the sources for more.

This driver supports all the DEC EtherWORKS III NICs (DE203, DE204,
and DE205) and the later DEC EtherWORKS II NICs (DE200, DE201, DE202,
DE422).  DEPCA-style boards prior to the DE200 have not been tested
and may not work.  

This driver is not EISA aware.  If you are using a DE422 or have
configured the EtherWORKS III in EISA mode, make sure you specify
the I/O port properly as this driver will *not* probe for it.
(The I/O port should be 0xNc00 where N is the EISA slot number).

This driver does not yet use the full 128KB allowed by the DE422.
Someday, it might. For EtherWORKS III NICs, the driver will override
the EEPROM setting of MemoryMode and *always* use the 2K for best
results.

The driver includes full support for both BPF and IP Multicast.

[All paths are relative to the top of sys source area, usually
/usr/src/sys.]

The following files need to be moved into their respective
directories:

	if_le.c	   -->	i386/isa
	am7990.h   -->	i386/isa/ic
	lemac.h	   -->	i386/isa/ic

You will need to apply the patch provided in pat.files.i386 to
i386/conf/files.i386 file.

After that is done you will need to edit your config file (in
i386/conf) and a line similar to:

device le0 at isa? port 0x300 net irq 5 iomem 0xd0000 vector le_intr

[The above line assumes the board is still at the factory defaults.]
Change the port, irq, and iomem value if needed to your configuration.

Now you are ready to rebuild your kernel, reboot, and see if the
driver can configure your board.  When the system boots, you will
hopefully something close to:

    EtherWORKS II:

	le0 at 0x300-0x30f irq 5 maddr 0xd0000 msize 65536 on isa
	le0: DE202 ethernet address 08:00:2b:2d:c8:45
	bpf: le0 attached

    EtherWORKS III:

	le0 at 0x320-0x33f irq 5 maddr 0xd0000 msize 2048 on isa
	le0: DE205-AB ethernet address 08:00:2b:bb:23:e0
	le0 attached

in the startup log.  If so, the board configured properly and
should be ready to use.

--
Mail:	thomas@lkg.dec.com
URL:	http://ftp.digital.com/~thomas/