Subject: Re: testing presence of a device (was sun-lamp CVS commits)
To: Chris G Demetriou <Chris_G_Demetriou@BALVENIE.PDL.CS.CMU.EDU>
From: Matthias Drochner <firstname.lastname@example.org>
Date: 10/09/1995 15:12:17
Excerpts from netbsd: 7-Oct-95 Re: testing presence of a d.. Chris G
>To my mind, one should be able to access a mostly-identical set of
>things via sysctl and kernfs. I (still) see kernfs as a "neat example
>of something strange you can do in a file system," and not something
>to be used day-to-day.
Excerpts from netbsd: 7-Oct-95 sun-lamp CVS commits The S. of A.
> Makefile Makefile.inc
>Build libkern as one .o file, so that all symbols defined therein are
>always available to loadable modules.
It would ne nice to have a similar interface inside the kernel
to help configuration of loadable drivers.
eg: I develop a driver for a new PCI board. The load-time
initialization code could do something like:
1. Obtain all PCI bus device pointers. (I don't know which
of them my device is connected to.)
2. Make my driver structures children of them (cfdata dynamically
3. re-scan bus or attach new devices only
(OSF/1 works like this, as I understand it.)
(One can traverse alldevs->next..., but this would cause code
duplicaton if done in every loadable driver.)
second suggestion: perhaps a way should be found to make
the symbols of dynamically loaded code available to
subsequent dynamic links. They can be stored externally
(keep information (pre-linked binaries or tables) in /var/...)
Then the libkern function could be loaded if needed, and
I could modularize my PCI drivers in a natural way
(my card is a bus interface).