FreeBSD src
Go to file
Julian Elischer 7146c13e43 the second set of changes in a move towards getting devices to be
totally dynamic.

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:42:06 +00:00
bin Fix my own brokeness for the colon operator, when one of the arguments 1995-11-18 18:05:03 +00:00
eBones After some more investigation I found that I can build a release from scratch 1995-11-21 06:35:37 +00:00
etc port 22 is the officially assigned "ssh" port... 1995-11-27 09:11:03 +00:00
games Prototype atof() so that the -speed option works. Closes bin/733. 1995-09-23 09:44:11 +00:00
gnu Fixed beforeinstall rule. .CURDIR was spelled .SRCDIR. 1995-11-26 09:51:42 +00:00
include Removed reference to missing mp.h in comment. We have GNU MP now. 1995-11-12 19:29:08 +00:00
lib Add a short man page for cfree(3), in order to hint people about its life in libcompat. 1995-11-24 08:36:51 +00:00
libexec Stop rlogind from bogusly ignoring an explicit .rhosts file for root. 1995-11-20 23:25:35 +00:00
lkm Changed the first (name) arg of MOD_DEV(), MOD_EXEC() and MOD_MISC() 1995-11-14 07:35:57 +00:00
release Ack. How embarassing. The PCNFSD and GATED config items were essentially 1995-11-17 23:49:45 +00:00
sbin Make the default tape device match dump(8). 1995-11-26 16:57:37 +00:00
secure Remove LD_NOSTD_PATH unsetenv, it isn't exist anymore 1995-10-24 06:52:36 +00:00
share Typo. 1995-11-27 01:46:51 +00:00
sys the second set of changes in a move towards getting devices to be 1995-11-28 09:42:06 +00:00
tools Fix two nits. 1995-11-06 16:51:45 +00:00
usr.bin Make tip recognize EOF in more cases. 1995-11-26 21:08:36 +00:00
usr.sbin Disconnect fsdb in preperation for move to /sbin 1995-11-24 23:00:02 +00:00
COPYRIGHT This is the official 4.4 Lite copyright. 1994-09-11 07:53:28 +00:00
CVS-INFO Update the CVS template. 1995-07-23 17:37:22 +00:00
HW.TROUBLE Added the first three entries. Changed the intro a bit. 1994-08-28 20:48:37 +00:00
Makefile Bring forward libkadm change from 2.1 1995-11-26 07:31:13 +00:00
README Small tweak - I said that ESC-ESC aborted the install. It actually only 1994-11-10 04:28:15 +00:00
TODO Removed the ps through a pipe project since we decided this was 1995-04-23 21:34:23 +00:00

   -----------------------------------------
       FreeBSD 2.0  ---  ALPHA Release                 ,        ,
   -----------------------------------------          /(        )`
                                                      \ \___   / |
Welcome to the ALPHA release of FreeBSD 2.0 - the     /- _  `-/  '
first public snapshot of our new 4.4BSD Lite based   (/\/ \ \   /\
operating system environment.  This install proce-   / /   | `    \
dure is also at the ALPHA stage, and contains only   O O   ) /    |
the minimum functionality required by an             `-^--'`<     '
*EXPERIENCED* person to install the system.         (_.)  _  )   /
It is our hope, of course, that the feedback         `.___/`    /
provided from this snapshot will                       `-----' /
greatly assist us in making the release   <----.     __ / __   \
of 2.0 much more user friendly.  Your     <----|====O)))==) \) /====
comments and criticisms are very          <----'    `--' `.__,' \
valuable to us, so please don't hesitate               |        |
in contacting us!  Full details on where and            \       /	/\
how to provide feedback are given below.           ______( (_  / \______/
                                                 ,'  ,-----'   |
This install procedure is ALPHA code, and        `--{__________)
may very possibly *DESTROY* the contents of your
ENTIRE DISK!  Please do not proceed with this installation
unless you've adequately backed up your data first!

If any errors occur during this installation, you can see them
by toggling over to the alternate screen - type ALT-F2 to switch
over, ALT-F1 to switch back to the install screen.  The debugging
output on the second screen may be very valuable to us in understanding
your bug report, so please be sure to take note of it when reporting
any failures in the installation!  Thanks!

Menus and scrolling output windows may be traversed with the arrow
and Page Up/Page Down keys.  To suspend the installation at any point,
hit ESC twice.  Hitting TAB will move the focus to different controls.
If you've ever dealt with a DOS installation, you'll know how to deal
with this.

For a more complete description of what's new in this release, please
see the release notes.

For more documentation on this system, it is recommended that you purchase
the 4.4BSD Document Set from O'Reilly Associates and the USENIX Association.
ISBN 1-56592-082-1  We have no connection with O'Reilly, we're just
satisfied customers!

Have fun, and please let us know of any problems you encounter with
this release!

Comments should be sent to:

	hackers@FreeBSD.org

Bug reports should be sent using the `send-pr' utility, if you
were able to get the system installed, otherwise to:

	bugs@FreeBSD.org

And general questions to:

	questions@FreeBSD.org


Please have patience if your questions are not answered right away -
this is an especially busy time for us, and our volunteer resources
are often strained to the limit (if not somewhat past!).

Thanks!

				The FreeBSD Project