From owner-freebsd-hackers Tue Jul 11 16:32: 4 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id BD8DB37B8A6; Tue, 11 Jul 2000 16:31:51 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id RAA50076; Tue, 11 Jul 2000 17:31:45 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id RAA08374; Tue, 11 Jul 2000 17:31:39 -0600 (MDT) Message-Id: <200007112331.RAA08374@harmony.village.org> To: "Gary T. Corcoran" Subject: Re: Module parameters? Cc: Archie Cobbs , Mike Smith , FreeBSD Hackers In-reply-to: Your message of "Tue, 11 Jul 2000 17:03:55 EDT." <396B8BBB.4AA1867D@lucent.com> References: <396B8BBB.4AA1867D@lucent.com> <200007112019.NAA38790@bubba.whistle.com> Date: Tue, 11 Jul 2000 17:31:39 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <396B8BBB.4AA1867D@lucent.com> "Gary T. Corcoran" writes: : No, I know it's not that easy. We need to be able to do things : like have "TransmissionMode=4" on the kldload command line, and : have that parse the decimal value 4, and then go into the module : and set the value of the TransmissionMode variable to actually be : 4 immediately after loading the module into memory, before any of : its subroutines are called. This is what the Linux module loader : allows, and it's extremely useful... Understood. What I'm suggesting is that you get those values from the kernel like so: int transmission_mode; transmission_mode = 4; /* 4 is the default */ if (resource_int_value(name, unit, "TransmissionMode", &transmission_mode) != 0) resource-int_value(name, -1, "TransmissionMode", &transmission_mode); You can then put hint.dslmodem.-1.TransmissionMode=4 in your hints file for the kernel. Right now the draw back of this is that hints cannot be added after boot. We're working on fixing that. So if you use this model, you'll get the dynamic setting of this information essensially for free. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message