From owner-freebsd-current Sat Jan 4 01:15:39 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id BAA07796 for current-outgoing; Sat, 4 Jan 1997 01:15:39 -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 BAA07785 for ; Sat, 4 Jan 1997 01:15:33 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id UAA29915; Sat, 4 Jan 1997 20:11:29 +1100 Date: Sat, 4 Jan 1997 20:11:29 +1100 From: Bruce Evans Message-Id: <199701040911.UAA29915@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 >> How about something like: >> >> modload XXX_mod.o XXX_config.o >I looked at doing this today, but I realised the number of symbols >that would not longer be static. Even if you sorted out the config - >driver association, you can't guarantee that symbols will be unique. This is no worse than non-LKM isa drivers having xxx_driver and isa_devtab_yyy non-static (not good). >[Changing my mind as I write 8-)] I should be able to write an lkm >using the current interface that has a minimum of one device with >configuration (port & IRQ) unspecified. Then come along later >and do ioctls on that device to configure it. And use a specific >ioctl call on any device on the driver to tell it to allocate >space for more devices. That should work? Yes. You could also try making configuring 0 devices to begin with and loading a tiny temporary XXX_config module to configure everything. This fails mainly because the symbols for XXX_mod aren't attached to the kernel. Bruce