From owner-freebsd-drivers@FreeBSD.ORG Fri Dec 9 12:51:35 2011 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E45701065672 for ; Fri, 9 Dec 2011 12:51:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BD4618FC15 for ; Fri, 9 Dec 2011 12:51:35 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 6F3ED46B3C; Fri, 9 Dec 2011 07:51:35 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CA7EAB96F; Fri, 9 Dec 2011 07:51:34 -0500 (EST) From: John Baldwin To: freebsd-drivers@freebsd.org Date: Fri, 9 Dec 2011 07:51:27 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112090751.27804.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 09 Dec 2011 07:51:34 -0500 (EST) Cc: some body Subject: Re: boot0.S empty #ifdef X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2011 12:51:36 -0000 On Monday, December 05, 2011 2:30:30 pm some body wrote: > I am starting to learn how the kernel works and have started by going > through the boot loader and I've noticed that between lines 21-32 in > boot0.S there are some empty #ifdef statements. I was wondering a) where > are these paramaters defined and if they are defined, what difference does > it make since it looks like it doesn't change anything since they're empty? > > > #ifdef SIO > #endif > > #ifdef CHECK_DRIVE > #endif > > #ifdef ONLY_F_KEYS > #endif It seems the point of these is to document what they do (note that you left out the comments): /* build options: */ #ifdef SIO /* use serial console on COM1. */ #endif #ifdef PXE /* enable PXE/INT18 booting with F6 */ #define SAVE_MORE_MEMORY #endif #ifdef CHECK_DRIVE /* make sure we boot from a HD. */ #endif #ifdef ONLY_F_KEYS /* Only F1..F6, no digits on console */ #endif #ifdef VOLUME_SERIAL /* support Volume serial number */ #define B0_BASE 0x1ae /* move the internal data area */ #define SAVE_MEMORY #else #define B0_BASE 0x1b2 #endif #ifdef TEST /* enable some test code */ #define SAVE_MEMORY #define SAVE_MORE_MEMORY #endif -- John Baldwin