diff options
author | peter <peter@FreeBSD.org> | 2000-06-13 22:28:50 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-06-13 22:28:50 +0000 |
commit | 647ef85d48424b2f17b827cdc91e595b17c66455 (patch) | |
tree | 356af9076580e616e17aaffdac3db15319e62b95 /usr.sbin/config/config.h | |
parent | c859e3ccfbf4963472ba1374f7ea67b524d43395 (diff) | |
download | FreeBSD-src-647ef85d48424b2f17b827cdc91e595b17c66455.zip FreeBSD-src-647ef85d48424b2f17b827cdc91e595b17c66455.tar.gz |
Borrow phk's axe and apply the next stage of config(8)'s evolution.
Use Warner Losh's "hint" driver to decode ascii strings to fill the
resource table at boot time.
config(8) no longer generates an ioconf.c table - ie: the configuration
no longer has to be compiled into the kernel. You can reconfigure your
isa devices with the likes of this at loader(8) time:
set hint.ed.0.port=0x320
userconfig will be rewritten to use this style interface one day and will
move to /boot/userconfig.4th or something like that.
It is still possible to statically compile in a set of hints into a kernel
if you do not wish to use loader(8). See the "hints" directive in GENERIC
as an example.
All device wiring has been moved out of config(8). There is a set of
helper scripts (see i386/conf/gethints.pl, and the same for alpha and pc98)
that extract the 'at isa? port foo irq bar' from the old files and produces
a hints file. If you install this file as /boot/device.hints (and update
/boot/defaults/loader.conf - You can do a build/install in sys/boot) then
loader will load it automatically for you. You can also compile in the
hints directly with: hints "device.hints" as well.
There are a few things that I'm not too happy with yet. Under this scheme,
things like LINT would no longer be useful as "documentation" of settings.
I have renamed this file to 'NOTES' and stored the example hints strings
in it. However... this is not something that config(8) understands, so
there is a script that extracts the build-specific data from the
documentation file (NOTES) to produce a LINT that can be config'ed and
built. A stack of man4 pages will need updating. :-/
Also, since there is no longer a difference between 'device' and
'pseudo-device' I collapsed the two together, and the resulting 'device'
takes a 'number of units' for devices that still have it statically
allocated. eg: 'device fe 4' will compile the fe driver with NFE set
to 4. You can then set hints for 4 units (0 - 3). Also note that
'device fe0' will be interpreted as "zero units of 'fe'" which would be
bad, so there is a config warning for this. This is only needed for
old drivers that still have static limits on numbers of units.
All the statically limited drivers that I could find were marked.
Please exercise EXTREME CAUTION when transitioning!
Moral support by: phk, msmith, dfr, asmodai, imp, and others
Diffstat (limited to 'usr.sbin/config/config.h')
-rw-r--r-- | usr.sbin/config/config.h | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h index 41a00b1..1779dc5 100644 --- a/usr.sbin/config/config.h +++ b/usr.sbin/config/config.h @@ -76,25 +76,10 @@ struct file_list { struct device { int d_type; /* DEVICE, bus adaptor */ - char *d_conn; /* what it is connected to */ - int d_connunit; /* unit of connection */ char *d_name; /* name of device (e.g. rk11) */ - int d_unit; /* unit number */ - int d_drive; /* drive number */ - int d_target; /* target number */ - int d_lun; /* unit number */ - int d_bus; /* controller bus number */ - int d_count; /* pseudo-device count */ + int d_count; /* device count */ #define QUES -1 /* -1 means '?' */ #define UNKNOWN -2 /* -2 means not set yet */ - int d_flags; /* flags for device init */ - int d_disabled; /* nonzero to skip probe/attach */ - char *d_port; /* io port base manifest constant */ - int d_portn; /* io port base (if number not manifest) */ - int d_maddr; /* io memory base */ - int d_msize; /* io memory size */ - int d_drq; /* DMA request */ - int d_irq; /* interrupt request */ struct device *d_next; /* Next one in list */ }; @@ -144,20 +129,20 @@ struct opt_list { } *otab; extern char *ident; +extern char *hints; extern int do_trace; -char *get_word __P((FILE *)); -char *get_quoted_word __P((FILE *)); -char *path __P((char *)); -char *raisestr __P((char *)); -void moveifchanged __P((const char *, const char *)); -void init_dev __P((struct device *)); -void newbus_ioconf __P((void)); -int yyparse __P((void)); -int yylex __P((void)); -void options __P((void)); -void makefile __P((void)); -void headers __P((void)); +char *get_word(FILE *); +char *get_quoted_word(FILE *); +char *path(char *); +char *raisestr(char *); +void moveifchanged(const char *, const char *); +void newbus_ioconf(void); +int yyparse(void); +int yylex(void); +void options(void); +void makefile(void); +void headers(void); extern struct device *dtab; |