From owner-freebsd-current Mon Dec 14 22:51:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA21530 for freebsd-current-outgoing; Mon, 14 Dec 1998 22:51:33 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id WAA21525 for ; Mon, 14 Dec 1998 22:51:31 -0800 (PST) (envelope-from imp@village.org) Received: from harmony [10.0.0.6] by rover.village.org with esmtp (Exim 1.71 #1) id 0zpoKF-0004Hd-00; Mon, 14 Dec 1998 23:51:19 -0700 Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.1/8.8.3) with ESMTP id XAA02978; Mon, 14 Dec 1998 23:49:38 -0700 (MST) Message-Id: <199812150649.XAA02978@harmony.village.org> To: Mike Smith Subject: Re: PAO Integration? Cc: current@FreeBSD.ORG In-reply-to: Your message of "Sun, 13 Dec 1998 15:21:25 PST." <199812132321.PAA00350@dingo.cdrom.com> References: <199812132321.PAA00350@dingo.cdrom.com> Date: Mon, 14 Dec 1998 23:49:37 -0700 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <199812132321.PAA00350@dingo.cdrom.com> Mike Smith writes: : Drivers should export a set of options that are a union of the set of : options the driver supports plus a subset of the options for a device : provided by the bus. This can be determined by examining the driver : and bus data at probe/attach time; something that's easy with KLD/ : newbus/loader, but would require a bolt-on for newconfig. A sysctl-like mechanism would likely be a good idea. Let me explain what I have in mind. First, let us say that there are configuration files. Let us say these files use the sysctl syntax. Let us further suppose that we extend the sysctl notation to include wild cards. We'd have something similar to the xdefaults (xrdb actually) syntax. This sparse database would be kept around. When modules are initialized (either as being part of the base system, statically linked in, or when dynamically loaded by some means), the sysctl's variables are set (if they match this sparse database). Now, this would allow drivers and other modules to be dynamically configured in a user friendly manner. The "sparse database" would allow for the user to specify things (eg the band for a radio modem, the video signalling to use (ntsc vs pal), etc). Some examples: driver.aha*tune_bus: 1 driver.bt848*video_format: ntsc When the aha driver starts, it registers the sysctl variable driver.aha.unit0.tune_bus and then finds its value. Since it matchces the above sepecification, it will have a value of 1 when the driver checks its value. This would allow a very easy way to configure and customize the modules that are loaded and unloaded. Comments? Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message