now carries the name of the attachment (e.g. "tlp_pci" or "audio"),
and cfattach structures are registered at boot time on a per-driver
basis. The cfdriver and cfattach pointers are cached in the device
structure when attached.
a vector of indices into the cfdata table to specify potential parents,
record the interface attributes that devices have and add a new "parent
spec" structure which lists the iattr, as well as optionally listing
specific parent device instances.
See:
http://mail-index.netbsd.org/tech-kern/2002/09/25/0014.html
...for a detailed description.
While here, const poison some things, as suggested by Matt Thomas.
This merge changes the device switch tables from static array to
dynamically generated by config(8).
- All device switches is defined as a constant structure in device drivers.
- The new grammer ``device-major'' is introduced to ``files''.
device-major <prefix> char <num> [block <num>] [<rules>]
- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.
- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.
- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.
- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.
- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
- Add `no' keyword, which can be used in the following ways:
no file-system SOMEFS
no makeoptions FOO
no options OPT1[,OPT2[,...]]
no pseudo-device somepseudo
This turns off a previous file-system/makeoptions/options/pseudo-device
entry for the same item.
Grammar support for 'no device DEV at ATTACH' added, but not
implemented yet.
Code changes:
- Convert many simple lists to TAILQs
- Convert prefix to SLIST
- Remove argument names from prototypes.
- Don't bother with custom alloc code for hashtables; just use emalloc()
like everything else.
- Implement ht_remove(), to remove an entry from a hash table.
Add removed entries to a freelist for later reuse.
- Don't selectbase() devices and pseudo-devices at definition time; instead
do it at one pass after the config file has been parsed in fixdevis().
- Rename nvhead to nvfreelist; a more apt name...
- Minor code cleanups.
swap*.c files if they haven't changed from the last time config was
run, so that less stuff will need to be rebuilt (ie, assym.h, upon
which many other things depend) each time config is rerun.
a change to the config grammar, to specify a device's class (i.e. DV_xxx)
like:
device sd class disk: ...
Also emit an ioconf.h, which contains extern declarations of the
cfdriver structures.
While I'm here, add support for specifying multiple options per defopt
line, as well as specifying the file name in which the options will
appear.
defopt foo bar baz
generates "opt_foo.h", "opt_bar.h", and "opt_baz.h"
defopt opt_mumble.h foo bar baz
generates "opt_mumble.h" which contains all three options.
Also, clean up and fix some bugs in the code that generates header files.
. link to the list of locator names from each entry in cfdata[] (for
future use by programs to print out the device tree nicely and/or
for boot-time configuration tools)
on tech-kern. (See man page.) Implementation by Greg Hudson.
Also, remove special case for i386 in vector handling, although this code isn't
actually used any more.
- split softc size and match/attach out from cfdriver into
a new struct cfattach.
- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.