Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 1997 19:36:02 +1100 (EST)
From:      John Birrell <jb@cimlogic.com.au>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        current@FreeBSD.org
Subject:   Re: MOD_DECL in lkm.h
Message-ID:  <199701040836.TAA29928@freebsd1.cimlogic.com.au>
In-Reply-To: <199701040643.RAA26494@godzilla.zeta.org.au> from Bruce Evans at "Jan 4, 97 05:43:54 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans wrote:
> >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 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.

I was thinking that the "modload -c config_file XXX_mod.o" version
could load the XXX module to get the driver entry initially with
no devices, then modload (having processed the config file) could
open the driver and use an ioctl-like (driver, not device) interface
to configure it. You'd need to be able to reference drivers by
name or ID (like lkms).

[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?

> 
> Bruce
> 


-- 
John Birrell                                CIMlogic Pty Ltd
jb@cimlogic.com.au; jb@netbsd.org           119 Cecil Street
Ph  +61  3 9690 6900                        South Melbourne Vic 3205
Fax +61  3 9690 6650                        Australia
Mob +61 18  353  137



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