Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Dec 2011 07:51:27 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-drivers@freebsd.org
Cc:        some body <bsd.mharv@gmail.com>
Subject:   Re: boot0.S empty #ifdef
Message-ID:  <201112090751.27804.jhb@freebsd.org>
In-Reply-To: <CAJy8JvR0XNDYAY0530CyhFK4LQNVSiJqfuM=-oGWZmBaLe0rdw@mail.gmail.com>
References:  <CAJy8JvR0XNDYAY0530CyhFK4LQNVSiJqfuM=-oGWZmBaLe0rdw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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