From owner-freebsd-hackers Sun Apr 23 03:47:11 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id DAA21420 for hackers-outgoing; Sun, 23 Apr 1995 03:47:11 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id DAA21411 for ; Sun, 23 Apr 1995 03:46:55 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id UAA27202; Sun, 23 Apr 1995 20:42:25 +1000 Date: Sun, 23 Apr 1995 20:42:25 +1000 From: Bruce Evans Message-Id: <199504231042.UAA27202@godzilla.zeta.org.au> To: hackers@FreeBSD.org, julian@TFS.COM Subject: Re: [DEVFS] related matters Sender: hackers-owner@FreeBSD.org Precedence: bulk >There are a few matters pertaining to devfs that reflect out to >other parts of the system. These include: >1/time: > it appears that 'time' is not set up at teh time of device probing. If the CMOS clock is on local time, then the correct time is not available until after adjkerntz has run. > possible work-arounds include: > a/ passing through the whole tree later and 'touching' > each device (yuk). Yuk. > b/ changing the place in the initialisation where > the real time is read in from the CMOS.. adjkerntz (or something that understands all the timezone rules) can't be run until a file system has been mounted, and you need timestamps long before that. I think the localtime offset should be stored in superblocks and used to fix the clock in mountroot(), but even that is too late for devfs - you would have to touch all the devices opened before mountroot(). >2/VFS initialisation: > At device probe time, the VFS hasn't been initialised yet.. I don't understand the details here, but if you need a lot of fixup hooks then the hooks can handle the times too. >3/DEVICES that are never attached. > Some devices are never probed or attached in the same way that > (say) a serial port is.. An example of this is /dev/mem. > I would like to either > a/ add a special table of such devices > at the beginning of autoconf or somewhere, so that > they can have entries placed in the devfs for them.. > or > b/ add some small init/attach functions to these devices > and place their names in some 'compusory devices' > list so that they can be attached like any other device. Use (b). You will need a device for all the minors and config doesn't know all the minors even for serial ports. E.g., there may be up to 16 ports on Cyclades cards and it doesn't seem reasonable to require a config line for each port. Perhaps you should depend on devconf's registerdev() functions getting called. Should they be called for each subdevice on a `controller' device even when not all the subdevices are handled by config? Bruce