Subject: Re: Device driver autoconfig question
To: Hauke Fath <saw@sun0.urz.uni-heidelberg.de>
From: None <briggs@puma.macbsd.com>
List: port-mac68k
Date: 10/02/1996 23:28:23
> Well, I wish the NetBSD device driver framework was only _half_ as easy
> to see through as the IWM code.
I know what you mean.
I'm terribly guilty for not documenting much of anything.
> My iwm match function _is_ called - that's not the problem.
> What puzzles me is that other ports' floppy drivers are actually given a
> string (referenced by aux) to compare their name with.
On those systems, the match function may be called multiple
times. Actually, 'aux' on the mac68k platform is a pointer to a
'struct confargs' (defined in autoconf.h). This contains two
elements, 'bustype' and 'slot'. For obio, the bustype is 0,
which looks like "" when you treat it like a string. 'slot'
is ignored for obio.
> You cant' just set a breakpoint with
> gdb and step through, can you? ;-)
I've never tried... ;-)
Basically, autoconf.c:configure() calls config_rootfound(). This goes into
mainbus.c, which cascades into obio.c and nubus.c, each of which probes
the "devices" on those "busses."
> Does any NetBSD person actually update the information there? Never seen
> any changes...
Very occasionally. There is a distinct lack of kernel-level
documentation of any detail. I think this is a combination of
several things:
* It's in constant flux. Of varying degrees, and some things
have not changed in years.
* There's always something more interesting to work on than
documenting what's running.
* "anyone who needs to know can look at the code to figure it
out."
That said, at least a couple of folks on current-users (I think that's
where they're hanging out) have been working on section 9 (kernel) man
pages. Perhaps you can contribute something there when you get it
figured out... ;-)
-allen
--
Allen Briggs - end killing - briggs@macbsd.com