08538dce1b
loadable drivers and user controlled attach/detach of devices. An outline was given in http://mail-index.NetBSD.org/tech-kern/2004/08/11/0000.html To cite the relevant parts: -Add a "child detached" and a "rescan" method (both optional) to the device driver. (This is added to the "cfattach" for now because this is under the driver writer's control. Logically it belongs more to the "cfdriver", but this is automatically generated now.) The "child detached" is called by the autoconf framework during config_detach(), after the child's ca_detach() function was called but before the device data structure is freed. The "rescan" is called explicitely, either after a driver LKM was loaded, or on user request (see the "control device" below). -Add a field to the device instance where the "locators" (in terms of the autoconf framework), which describe the actual location of the device relatively to the parent bus, can be stored. This can be used by the "child detached" function for easier bookkeeping (no need to lookup by device instance pointer). (An idea for the future is to use this for generation of optimized kernel config files - like DEC's "doconfig".) -Pass the locators tuple describing a device's location to various autoconf functions to support the previous. And since locators do only make sense in relation to an "interface attribute", pass this as well. -Add helper functions to add/remove supplemental "cfdata" arrays. Needed for driver LKMs. There is some code duplication which will hopefully resolved when all "submatch"-style functions are changed to accept the locator argument. Some more cleanup can take place when config(8) issues more information about locators, in particular the length and default values. To be done later. |
||
---|---|---|
bin | ||
contrib/sys | ||
crypto | ||
dist | ||
distrib | ||
doc | ||
etc | ||
games | ||
gnu | ||
include | ||
lib | ||
libexec | ||
regress | ||
rescue | ||
sbin | ||
share | ||
sys | ||
tools | ||
usr.bin | ||
usr.sbin | ||
x11 | ||
build.sh | ||
BUILDING | ||
Makefile | ||
Makefile.inc | ||
UPDATING |