Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Apr 1995 20:42:25 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        hackers@FreeBSD.org, julian@TFS.COM
Subject:   Re: [DEVFS] related matters
Message-ID:  <199504231042.UAA27202@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504231042.UAA27202>