From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 22 14:37:43 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C52B9F06; Mon, 22 Oct 2012 14:37:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 99C8C8FC19; Mon, 22 Oct 2012 14:37:43 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EA643B987; Mon, 22 Oct 2012 10:37:42 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Subject: Re: Loader-kernel interaction Date: Mon, 22 Oct 2012 10:02:40 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <5081DCA1.80906@gentoo.org> In-Reply-To: <5081DCA1.80906@gentoo.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201210221002.40194.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Oct 2012 10:37:43 -0400 (EDT) Cc: Richard Yao , "hackers@FreeBSD.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 14:37:43 -0000 On Friday, October 19, 2012 7:05:05 pm Richard Yao wrote: > Dear Everyone, > > I know that the kernel is a BTX client, but I do not understand the > protocol used by loader to pass sysctl settings and loadable modules to > the kernel. Is there documentation on this? The loader passes it's variables as a set of environment variables. They are stored in a contiguous block of memory after the last kernel module. Look at sys/boot/i386/libi386/bootinfo{32,64}.c. Specifically look at the bi_load*() routines. -- John Baldwin