From owner-freebsd-current Fri Jan 3 22:45:23 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id WAA01039 for current-outgoing; Fri, 3 Jan 1997 22:45:23 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id WAA01034 for ; Fri, 3 Jan 1997 22:45:12 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id RAA26494; Sat, 4 Jan 1997 17:43:54 +1100 Date: Sat, 4 Jan 1997 17:43:54 +1100 From: Bruce Evans Message-Id: <199701040643.RAA26494@godzilla.zeta.org.au> To: bde@zeta.org.au, jb@cimlogic.com.au Subject: Re: MOD_DECL in lkm.h Cc: current@FreeBSD.org Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >> Most modules have >> no need for a stat function. > >That's a shame because it is a useful interface for looking at debug info. >Ah well, looks like my module won't have a stat function either. I think most lkm's should have a directly linkable version, so they shouldn't be any special features in the lkm version. You can use a sysctl for debugging (at least when the sysctl() implementation is finished :). >BTW, with lkms, how is device config info (like in kernel config files) >supposed to be passed in rather than hard coding the configuration? I don't think anyone knows. Current drivers have it hard coded :-(. >or IRQs 2 - 7. I'd like to be able to do: > >modload -c config_file -p postinstall XXX_mod.o > >where the config_file might contain something similar to that given to >the kernel config. Then I'd like the number of units to come from the >config_file rather than from the NXXX in the XXX.h header file. How about something like: modload XXX_mod.o XXX_config.o where XXX_config.o is a small object file (something like one line out of ioconf.c compiled to an object)? The config info could be loaded separately but it's not clear how it would be associated with the driver then. I would prefer all drivers (whether lkm's or not) to be dynamically reconfigurable. Bruce