xref: /netbsd-src/share/man/man4/options.4 (revision 1b9578b8c2c1f848eeb16dabbfd7d1f0d9fdefbd)
1.\"	$NetBSD: options.4,v 1.408 2011/06/17 18:13:49 wiz Exp $
2.\"
3.\" Copyright (c) 1996
4.\" 	Perry E. Metzger.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgment:
16.\"	This product includes software developed for the NetBSD Project
17.\"	by Perry E. Metzger.
18.\" 4. The name of the author may not be used to endorse or promote products
19.\"    derived from this software without specific prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31.\"
32.\"
33.Dd June 17, 2011
34.Dt OPTIONS 4
35.Os
36.Sh NAME
37.Nm options
38.Nd Miscellaneous kernel configuration options
39.Sh SYNOPSIS
40.Cd cinclude ...
41.Cd config ...
42.Cd [no] file-system ...
43.Cd ident ...
44.Cd include ...
45.Cd [no] makeoptions ...
46.Cd maxusers ...
47.Cd [no] options ...
48.Cd [no] pseudo-device ...
49.Sh DESCRIPTION
50This manual page describes a number of miscellaneous kernel
51configuration options that may be specified in a kernel config
52file.
53See
54.Xr config 1
55and
56.Xr config 5
57for information on how to configure and build kernels.
58.Pp
59The
60.Ar no
61form removes a previously specified option.
62.Ss Keywords
63The following keywords are recognized in a kernel configuration file:
64.Bl -ohang
65.It Sy cinclude Qq Ar filename
66Conditionally includes another kernel configuration file whose name is
67.Ar filename ,
68which may be double-quoted and may be an explicit path or relative to
69the kernel source directory.
70Failure to open the named file is ignored.
71.It Sy config Ar exec_name No root on Ar rootdev Oo type Ar fstype Oc \
72Oo dumps on Ar dumpdev Oc
73Defines a configuration whose kernel executable is named
74.Ar exec_name ,
75normally
76.Dq netbsd ,
77with its root file system of type
78.Ar fstype
79on the device
80.Ar rootdev ,
81and optionally specifying the location of kernel core dumps on the device
82.Ar dumpdev .
83.Ar dev
84or
85.Ar dumpdev
86and
87.Ar fstype
88may be specified as
89.Dq \&? ,
90which is a wild card.
91The root
92.Ar fstype
93and
94.Ar dumpdev
95are optional and assumed to be wild carded if they are not specified.
96.It Ar device_instance No at Ar attachment \
97Oo Ar locators value Oo ... Oc Oc Oo flags Ar value Oc
98Define an instance of the device driver
99.Ar device_instance
100that attaches to the bus or device named
101.Ar attachment .
102An
103.Ar attachment
104may require additional information on where the device can be found, such
105as an address, channel, function, offset, and/or slot, referred to as
106.Ar locators ,
107whose
108.Ar value
109often may be a wild card,
110.Dq \&? .
111Some device drivers have one or more
112.Ar flags
113that can be adjusted to affect the way they operate.
114.It Sy file-system Ar fs_name Op , Ar fs_name Op ...
115Include support for the file-system
116.Ar fs_name .
117.It Sy ident Qq Ar string
118Sets the kernel identification string to
119.Ar string .
120.It Sy include Qq Ar filename
121Functions the same as
122.Ar cinclude ,
123except failure to open
124.Ar filename
125produces a fatal error.
126.It Sy options Ar option_name Op , Ar option_name=value Op ...
127Specifies (or sets) the option, or comma-separated list of options,
128.Ar option_name .
129Some options expect to be assigned a value, which may be an integer,
130a double-quoted word, a bare word, or an empty string
131.Pq Qq .
132Note that those are eventually handled by the C compiler, so the rules
133of that language apply.
134.Pp
135.Em Note :
136Options that are not defined by device definition files are passed to
137the compile process as
138.Fl D
139flags to the C compiler.
140.It Sy makeoptions Ar name=value
141Defines a
142.Xr make 1
143macro
144.Ar name
145with the value
146.Ar value
147in the kernel Makefile.
148.It Sy maxusers Ar integer
149Set the maxusers variable in the kernel.
150.It Sy no Ar keyword Ar name Op Ar arguments Op ...
151For the
152.Xr config 1
153.Ar keywords
154file-system, makeoptions, options, and pseudo-device,
155.Ar no
156removes the file-system, makeoption, options, or pseudo-device,
157.Ar name .
158This is useful when a kernel configuration file includes another which
159has undesired options.
160.Pp
161For example, a local configuration file that wanted the kitchen sink, but
162not COMPAT_09 or bridging, might be:
163.Bd -literal -offset indent
164include "arch/i386/conf/GENERIC"
165no options COMPAT_09
166no pseudo-device bridge
167.Ed
168.It Sy pseudo-device Ar name Op Ar N
169Includes support for the pseudo-device
170.Ar name .
171Some pseudo-devices can have multiple or
172.Ar N
173instances.
174.El
175.Ss Compatibility Options
176.Bl -ohang
177.It Cd options COMPAT_09
178Enable binary compatibility with
179.Nx 0.9 .
180This enables support for
18116-bit user, group, and process IDs (following revisions support
18232-bit identifiers).
183It also allows the use of the deprecated
184.Xr getdomainname 3 ,
185.Xr setdomainname 3 ,
186and
187.Xr uname 3
188syscalls.
189This option also allows using numeric file system identifiers rather
190than strings.
191Post
192.Nx 0.9
193versions use string identifiers.
194.It Cd options COMPAT_10
195Enable binary compatibility with
196.Nx 1.0 .
197This option allows the use of the file system name of
198.Dq ufs
199as an alias for
200.Dq ffs .
201The name
202.Dq ffs
203should be used post 1.0 in
204.Pa /etc/fstab
205and other files.
206It also adds old syscalls for the
207.At V
208shared memory interface.
209This was changed post 1.0 to work on 64-bit architectures.
210This option also enables
211.Dq sgtty
212compatibility, without which programs using the old interface produce
213an
214.Dq inappropriate ioctl
215error, and
216.Pa /dev/io
217only works when this option is set in the kernel,
218see
219.Xr io 4
220on ports that support it.
221.It Cd options COMPAT_11
222Enable binary compatibility with
223.Nx 1.1 .
224This allows binaries running on the i386 port to gain direct access to
225the io ports by opening
226.Pa /dev/io
227read/write.
228This functionality was replaced by
229.Xr i386_iopl 2
230post 1.1.
231On the
232.Tn Atari
233port, the location of the disk label was moved after 1.1.
234When the
235.Em COMPAT_11
236option is set, the kernel will read (pre) 1.1 style disk labels as a
237last resort.
238When a disk label is re-written, the old style label will be replaced
239with a post 1.1 style label.
240This also enables the
241.Em EXEC_ELF_NOTELESS
242option.
243.It Cd options COMPAT_12
244Enable binary compatibility with
245.Nx 1.2 .
246This allows the use of old syscalls for
247.Fn reboot
248and
249.Fn swapon .
250The syscall numbers were changed post 1.2 to add functionality to the
251.Xr reboot 2
252syscall, and the new
253.Xr swapctl 2
254interface was introduced.
255This also enables the
256.Em EXEC_ELF_NOTELESS
257option.
258.It Cd options COMPAT_13
259Enable binary compatibility with
260.Nx 1.3 .
261This allows the use of old syscalls for
262.Fn sigaltstack ,
263and also enables the old
264.Xr swapctl 2
265command
266.Dv SWAP_STATS
267(now called
268.Dv SWAP_OSTATS ) ,
269which does not include the
270.Fa se_path
271member of
272.Va struct swapent .
273.It Cd options COMPAT_14
274Enable binary compatibility with
275.Nx 1.4 .
276This allows some old
277.Xr ioctl 2
278on
279.Xr wscons 4
280to be performed, and allows the
281.Dv NFSSVC_BIOD
282mode of the
283.Xr nfssvc 2
284system call to be used for compatibility with the deprecated nfsiod program.
285.It Cd options COMPAT_15
286Enable binary compatibility with
287.Nx 1.5 .
288Since there were no API changes from
289.Nx 1.5
290and
291.Nx 1.6 ,
292this option does nothing.
293.It Cd options COMPAT_16
294Enable binary compatibility with
295.Nx 1.6 .
296This allows the use of old signal trampoline code which has been deprecated
297with the addition of
298.Xr siginfo 2 .
299.It Cd options COMPAT_20
300Enable binary compatibility with
301.Nx 2.0 .
302This allows the use of old syscalls for
303.Fn statfs ,
304.Fn fstatfs ,
305.Fn getfsstat
306and
307.Fn fhstatfs ,
308which have been deprecated with the addition of the
309.Xr statvfs 2 ,
310.Xr fstatvfs 2 ,
311.Xr getvfsstat 2
312and
313.Xr fhstatvfs 2
314system calls.
315.It Cd options COMPAT_30
316Enable binary compatibility with
317.Nx 3.0 .
318See
319.Xr compat_30 8
320for details about the changes made after the
321.Nx 3.0
322release.
323.It Cd options COMPAT_43
324Enables compatibility with
325.Bx 4.3 .
326This adds an old syscall for
327.Xr lseek 2 .
328It also adds the ioctls for
329.Dv TIOCGETP
330and
331.Dv TIOCSETP .
332The return values for
333.Xr getpid 2 ,
334.Xr getgid 2 ,
335and
336.Xr getuid 2
337syscalls are modified as well, to return the parent's PID and
338UID as well as the current process's.
339It also enables the deprecated
340.Dv NTTYDISC
341terminal line discipline.
342It also provides backwards compatibility with
343.Dq old
344SIOC[GS]IF{ADDR,DSTADDR,BRDADDR,NETMASK} interface ioctls, including
345binary compatibility with code written before the introduction of the
346sa_len field in sockaddrs.
347It also enables
348support for some older pre
349.Bx 4.4
350socket calls.
351.It Cd options COMPAT_BSDPTY
352This option is currently on by default and enables the pty multiplexer
353.Xr ptm 4
354and
355.Xr ptmx 4
356to find and use ptys named
357.Pa /dev/ptyXX
358(master) and
359.Pa /dev/ttyXX
360(slave).
361Eventually this option will become optional as ptyfs based pseudo-ttys become
362the default, see
363.Xr mount_ptyfs 8 .
364.It Cd options COMPAT_SVR4
365On those architectures that support it, this enables binary
366compatibility with
367.At V.4
368applications built for the same architecture.
369This currently includes the i386, m68k, and sparc ports.
370.It Cd options COMPAT_LINUX
371On those architectures that support it, this enables binary
372compatibility with Linux ELF and
373.Xr a.out 5
374applications built for the same architecture.
375This currently includes the alpha, arm, i386, m68k, mips, powerpc and
376x86_64 ports.
377.It Cd options COMPAT_LINUX32
378On those 64 bit architectures that support it, this enables binary
379compatibility with 32 bit Linux binaries.
380For now this is limited to running i386 ELF Linux binaries on amd64.
381.It Cd options COMPAT_SUNOS
382On those architectures that support it, this enables binary
383compatibility with
384.Tn SunOS 4.1
385applications built for the same architecture.
386This currently includes the sparc, sparc64 and most or all m68k ports.
387Note that the sparc64 requires the
388.Em COMPAT_NETBSD32
389option for 64-bit kernels, in addition to this option.
390.It Cd options COMPAT_ULTRIX
391On those architectures that support it, this enables binary
392compatibility with
393.Tn ULTRIX
394applications built for the same architecture.
395This currently is limited to the pmax.
396The functionality of this option is unknown.
397.It Cd options COMPAT_FREEBSD
398On those architectures that support it, this enables binary
399compatibility with
400.Fx
401applications built for the same architecture.
402At the moment this is limited to the i386 port.
403.It Cd options COMPAT_IBCS2
404On those architectures that support it, this enables binary
405compatibility with iBCS2 or SVR3 applications built for the same architecture.
406This is currently limited to the i386 and vax ports.
407.It Cd options COMPAT_OSF1
408On those architectures that support it, this enables binary
409compatibility with
410.Tn Digital
411.Ux
412.Po
413formerly
414.Tn OSF/1
415.Pc
416applications built for the same architecture.
417This is currently limited to the alpha port.
418.It Cd options COMPAT_NOMID
419Enable compatibility with
420.Xr a.out 5
421executables that lack a machine ID.
422This includes
423.Nx 0.8 Ns 's
424ZMAGIC format, and 386BSD and BSDI's
425QMAGIC, NMAGIC, and OMAGIC
426.Xr a.out 5
427formats.
428.It Cd options COMPAT_NETBSD32
429On those architectures that support it, this enables binary
430compatibility with 32-bit applications built for the same architecture.
431This is currently limited to the amd64 and sparc64 ports, and only
432applicable for 64-bit kernels.
433.It Cd options COMPAT_SVR4_32
434On those architectures that support it, this enables binary
435compatibility with 32-bit SVR4 applications built for the same architecture.
436This is currently limited to the sparc64 port, and only applicable for
43764-bit kernels.
438.It Cd options COMPAT_AOUT_M68K
439On m68k architectures which have switched to ELF,
440this enables binary compatibility with
441.Nx Ns Tn /m68k
442.Xr a.out 5
443executables on
444.Nx Ns Tn /m68k
445ELF kernels.
446This handles alignment incompatibility of m68k ABI between
447a.out and ELF which causes the structure padding differences.
448Currently only some system calls which use
449.Va struct stat
450are adjusted and some binaries which use
451.Xr sysctl 3
452to retrieve network details would not work properly.
453.It Cd options EXEC_ELF_NOTELESS
454Run unidentified ELF binaries as
455.Nx
456binaries.
457This might be needed for very old
458.Nx
459ELF binaries on some archs.
460These old binaries didn't contain an appropriate
461.Li .note.netbsd.ident
462section, and thus can't be identified by the kernel as
463.Nx
464binaries otherwise.
465Beware - if this option is on, the kernel would run
466.Em any
467unknown ELF binaries as if they were
468.Nx
469binaries.
470.It Cd options P1003_1B_SEMAPHORE
471Includes kernel support for the standard C library
472.Pq libc
473functions that implement semaphores as specified in
474.St -p1003.1-96 .
475.El
476.Ss Debugging Options
477.Bl -ohang
478.It Cd options DDB
479Compiles in a kernel debugger for diagnosing kernel problems.
480See
481.Xr ddb 4
482for details.
483.Em NOTE :
484not available on all architectures.
485.It Cd options DDB_FROMCONSOLE=integer
486If set to non-zero, DDB may be entered by sending a break on a serial
487console or by a special key sequence on a graphics console.
488A value of "0" ignores console breaks or key sequences.
489If not explicitly specified, the default value is "1".
490Note that this sets the value of the
491.Em ddb.fromconsole
492.Xr sysctl 3
493variable which may be changed at run time -- see
494.Xr sysctl 8
495for details.
496.It Cd options DDB_HISTORY_SIZE=integer
497If this is non-zero, enable history editing in the kernel debugger
498and set the size of the history to this value.
499.It Cd options DDB_ONPANIC
500The default if not specified is
501.Dq 1
502- just enter into DDB.
503If set to
504.Dq 2
505the kernel will
506attempt to print out a stack trace before entering into DDB.
507If set to
508.Dq 0
509the kernel will attempt to print out a stack trace
510and reboot the system.
511If set to
512.Dq -1
513then neither a stack trace is printed or DDB entered -
514it is as if DDB were not compiled into the kernel.
515Note that this sets the value of the
516.Em ddb.onpanic
517.Xr sysctl 3
518variable which may be changed at run time -- see
519.Xr sysctl 8
520for details.
521.It Cd options DDB_COMMANDONENTER=string
522This option specify commands which will be executed on each entry to DDB.
523This sets the default value of the
524.Em ddb.commandonenter
525.Xr sysctl 3
526variable which may be changed at run time.
527.It Cd options DDB_BREAK_CHAR=integer
528This option overrides using break to enter the kernel debugger
529on the serial console.
530The value given is the ASCII value to be used instead.
531This is currently only supported by the com driver.
532.It Cd options DDB_VERBOSE_HELP
533This option adds more verbose descriptions to the
534.Em help
535command.
536.It Cd options KGDB
537Compiles in a remote kernel debugger stub for diagnosing kernel problems
538using the
539.Dq remote target
540feature of gdb.
541See
542.Xr gdb 1
543for details.
544.Em NOTE :
545not available on all architectures.
546.It Cd options KGDB_DEV
547Device number
548.Po
549as a
550.Dv dev_t
551.Pc
552of kgdb device.
553.It Cd options KGDB_DEVADDR
554Memory address of kgdb device.
555.It Cd options KGDB_DEVMODE
556Permissions of kgdb device.
557.It Cd options KGDB_DEVNAME
558Device name of kgdb device.
559.It Cd options KGDB_DEVRATE
560Baud rate of kgdb device.
561.It Cd makeoptions DEBUG="-g"
562The
563.Fl g
564flag causes
565.Pa netbsd.gdb
566to be built in addition to
567.Pa netbsd .
568.Pa netbsd.gdb
569is useful for debugging kernel crash dumps with gdb.
570See
571.Xr gdb 1
572for details.
573This also turns on
574.Em options DEBUG
575(which see).
576.It Cd options DEBUG
577Turns on miscellaneous kernel debugging.
578Since options are turned into preprocessor defines (see above),
579.Em options DEBUG
580is equivalent to doing a
581.Em #define DEBUG
582throughout the kernel.
583Much of the kernel has
584.Em #ifdef DEBUG
585conditionalized debugging code.
586Note that many parts of the kernel (typically device drivers) include their own
587.Em #ifdef XXX_DEBUG
588conditionals instead.
589This option also turns on certain other options,
590which may decrease system performance.
591.It Cd options DIAGNOSTIC
592Adds code to the kernel that does internal consistency checks.
593This code will cause the kernel to panic if corruption of internal data
594structures is detected.
595These checks can decrease performance up to 15%.
596.It Cd options LOCKDEBUG
597Adds code to the kernel to detect incorrect use of locking primitives
598(mutex, rwlock, simplelock).
599This code will cause the kernel to check for dead lock conditions.
600It will also check for memory being freed to not contain initialised
601lock primitives.
602Functions for use in
603.Xr ddb 4
604to check lock chains etc. are also enabled.
605These checks are very expensive and can decrease performance on
606multi-processor machines by a factor of three.
607.It Cd options KSTACK_CHECK_MAGIC
608Check kernel stack usage and panic if stack overflow is detected.
609This check is performance sensitive because it scans stack on each context
610switch.
611.It Cd options KTRACE
612Add hooks for the system call tracing facility, which allows users to
613watch the system call invocation behavior of processes.
614See
615.Xr ktrace 1
616for details.
617.It Cd options MSGBUFSIZE=integer
618This option sets the size of the kernel message buffer.
619This buffer holds the kernel output of
620.Fn printf
621when not (yet) read by
622.Xr syslogd 8 .
623This is particularly useful when the system has crashed and you wish to lookup
624the kernel output from just before the crash.
625Also, since the autoconfig output becomes more and more verbose,
626it sometimes happens that the message buffer overflows before
627.Xr syslogd 8
628was able to read it.
629Note that not all systems are capable of obtaining a variable sized message
630buffer.
631There are also some systems on which memory contents are not preserved
632across reboots.
633.It Cd options MALLOCLOG
634Enables an event log for
635.Xr malloc 9 .
636Useful for tracking down
637.Dq Data modified on freelist
638and
639.Dq multiple free
640problems.
641.It Cd options MALLOCLOGSIZE=integer
642Defines the number of entries in the malloc log.
643Default is 100000 entries.
644.It Cd options UVMHIST
645Enables the UVM history logs, which create in-memory traces of
646various UVM activities.
647These logs can be displayed be calling
648.Fn uvmhist_dump
649or
650.Fn uvm_hist
651with appropriate arguments from DDB.
652See the kernel source file sys/uvm/uvm_stat.c for details.
653.It Cd options UVMHIST_PRINT
654Prints the UVM history logs on the system console as entries are added.
655Note that the output is
656.Em extremely
657voluminous, so this option is really only useful for debugging
658the very earliest parts of kernel initialization.
659.El
660.Ss File Systems
661.Bl -ohang
662.It Cd file-system FFS
663Includes code implementing the Berkeley Fast File System
664.Po Em FFS Pc .
665Most machines need this if they are not running diskless.
666.It Cd file-system EXT2FS
667Includes code implementing the Second Extended File System
668.Po Em ext2 Pc ,
669revision 0 and revision 1 with the
670.Em filetype ,
671.Em sparse_super
672and
673.Em large_file
674options.
675This is the most commonly used file system on the Linux operating system,
676and is provided here for compatibility.
677Some of the specific features of
678.Em ext2
679like the "behavior on errors" are not implemented.
680See
681.Xr mount_ext2fs 8
682for details.
683.It Cd file-system LFS
684.Bq Em EXPERIMENTAL
685Include the Log-structured File System
686.Po Em LFS Pc .
687See
688.Xr mount_lfs 8
689and
690.Xr newfs_lfs 8
691for details.
692.It Cd file-system MFS
693Include the Memory File System
694.Po Em MFS Pc .
695This file system stores files in swappable memory, and produces
696notable performance improvements when it is used as the file store
697for
698.Pa /tmp
699and similar file systems.
700See
701.Xr mount_mfs 8
702for details.
703.It Cd file-system NFS
704Include the client side of the Network File System
705.Pq Tn NFS
706remote file sharing protocol.
707Although the bulk of the code implementing
708.Tn NFS
709is kernel based, several user level daemons are needed for it to work.
710See
711.Xr mount_nfs 8
712for details.
713.It Cd file-system CD9660
714Includes code for the
715.Tn ISO
7169660 + Rock Ridge file system, which is the standard file system on many
717.Tn CD-ROM
718discs.
719Useful primarily if you have a
720.Tn CD-ROM
721drive.
722See
723.Xr mount_cd9660 8
724for details.
725.It Cd file-system MSDOSFS
726Includes the
727.Tn MS-DOS
728FAT file system, which is reportedly still used
729by unfortunate people who have not heard about
730.Nx .
731Also implements the
732.Tn Windows 95
733extensions to the same, which permit the use of longer, mixed case
734file names.
735See
736.Xr mount_msdos 8
737and
738.Xr fsck_msdos 8
739for details.
740.It Cd file-system NTFS
741.Bq Em EXPERIMENTAL
742Includes code for the
743.Tn Microsoft Windows NT
744file system.
745See
746.Xr mount_ntfs 8
747for details.
748.It Cd file-system FDESC
749Includes code for a file system, conventionally mounted on
750.Pa /dev/fd ,
751which permits access to the per-process file descriptor space via
752special files in the file system.
753See
754.Xr mount_fdesc 8
755for details.
756Note that this facility is redundant, and thus unneeded on most
757.Nx
758systems, since the
759.Xr fd 4
760pseudo-device driver already provides identical functionality.
761On most
762.Nx
763systems, instances of
764.Xr fd 4
765are mknoded under
766.Pa /dev/fd/
767and on
768.Pa /dev/stdin ,
769.Pa /dev/stdout ,
770and
771.Pa /dev/stderr .
772.It Cd file-system KERNFS
773Includes code which permits the mounting of a special file system
774(normally mounted on
775.Pa /kern )
776in which files representing various kernel variables and parameters
777may be found.
778See
779.Xr mount_kernfs 8
780for details.
781.It Cd file-system NULLFS
782Includes code for a loopback file system.
783This permits portions of the file hierarchy to be re-mounted in other places.
784The code really exists to provide an example of a stackable file system layer.
785See
786.Xr mount_null 8
787for details.
788.It Cd file-system OVERLAY
789Includes code for a file system filter.
790This permits the overlay file system to intercept all access to an underlying
791file system.
792This file system is intended to serve as an example of a stacking file
793system which has a need to interpose itself between an underlying file
794system and all other access.
795See
796.Xr mount_overlay 8
797for details.
798.It Cd file-system PROCFS
799Includes code for a special file system (conventionally mounted on
800.Pa /proc )
801in which the process space becomes visible in the file system.
802Among
803other things, the memory spaces of processes running on the system are
804visible as files, and signals may be sent to processes by writing to
805.Pa ctl
806files in the procfs namespace.
807See
808.Xr mount_procfs 8
809for details.
810.It Cd file-system UDF
811.Bq Em EXPERIMENTAL
812Includes code for the UDF file system commonly found on CD and DVD
813media but also more and more on USB sticks.
814Useful primarily if you have a CD or a DVD drive, be it a read-only
815or a rewritable device.
816Currently only supports read-access.
817See
818.Xr mount_udf 8
819for details.
820.It Cd file-system UMAPFS
821Includes a loopback file system in which user and group IDs may be
822remapped -- this can be useful when mounting alien file systems with
823different UIDs and GIDs than the local system.
824See
825.Xr mount_umap 8
826for details.
827.It Cd file-system UNION
828.Bq Em EXPERIMENTAL
829Includes code for the union file system, which permits directories to
830be mounted on top of each other in such a way that both file systems
831remain visible -- this permits tricks like allowing writing (and the
832deleting of files) on a read-only file system like a
833.Tn CD-ROM
834by mounting a local writable file system on top of the read-only file system.
835See
836.Xr mount_union 8
837for details.
838.It Cd file-system CODA
839.Bq Em EXPERIMENTAL
840Includes code for the Coda file system.
841Coda is a distributed file system like NFS and AFS.
842It is freely available, like NFS, but it functions much like AFS in being a
843.Dq stateful
844file system.
845Both Coda and AFS cache files on your local machine to improve performance.
846Then Coda goes a step further than AFS by letting you access the cached
847files when there is no available network, viz. disconnected laptops and
848network outages.
849In Coda, both the client and server are outside the kernel which makes
850them easier to experiment with.
851Coda is available for several UNIX and non-UNIX platforms.
852See http://www.coda.cs.cmu.edu for more details.
853.Em NOTE :
854You also need to enable the pseudo-device, vcoda, for the Coda
855file system to work.
856.It Cd file-system SMBFS
857.Bq Em EXPERIMENTAL
858Includes code for the SMB/CIFS file system.
859See
860.Xr mount_smbfs 8
861for details.
862.Em NOTE :
863You also need to enable the pseudo-device, nsmb, for the SMB
864file system to work.
865.It Cd file-system PTYFS
866.Bq Em EXPERIMENTAL
867Includes code for a special file system (normally mounted on
868.Pa /dev/pts )
869in which pseudo-terminal slave devices become visible in the file system.
870See
871.Xr mount_ptyfs 8
872for details.
873.It Cd file-system TMPFS
874Includes code for the efficient memory file system, normally used over
875.Pa /tmp .
876See
877.Xr mount_tmpfs 8
878for details.
879.It Cd file-system PUFFS
880Includes kernel support for the pass-to-userspace framework file system.
881It can be used to implement file system functionality in userspace.
882See
883.Xr puffs 3
884for more details.
885This enables for example sshfs:
886.Xr mount_psshfs 8 .
887.El
888.Ss File System Options
889.Bl -ohang
890.It Cd options MAGICLINKS
891Enables the expansion of special strings
892.Po
893beginning with
894.Dq @
895.Pc
896when traversing symbolic links.
897See
898.Xr symlink 7
899for a list of supported strings.
900Note that this option only controls the enabling of this feature
901by the kernel at boot-up.
902This feature can still be manipulated with the
903.Xr sysctl 8
904command regardless of the setting of this option.
905.It Cd options NFSSERVER
906Include the server side of the
907.Em NFS
908(Network File System) remote file sharing protocol.
909Although the bulk of the code implementing
910.Em NFS
911is kernel based, several user level daemons are needed for it to
912work.
913See
914.Xr mountd 8
915and
916.Xr nfsd 8
917for details.
918.It Cd options QUOTA
919Enables kernel support for file system quotas.
920See
921.Xr quotaon 8 ,
922.Xr edquota 8 ,
923and
924.Xr quota 1
925for details.
926Note that quotas only work on
927.Dq ffs
928file systems, although
929.Xr rpc.rquotad 8
930permits them to be accessed over
931.Em NFS .
932.It Cd options QUOTA2
933Enables kernel support for the new file system quotas format.
934See
935.Xr tunefs 8 ,
936.Xr newfs 8 ,
937.Xr mount_mfs 8 ,
938.Xr edquota 8 ,
939and
940.Xr quota 1
941for details.
942Note that quota2 is only supported by
943.Dq ffs
944and
945.Dq mfs
946file systems at this time.
947.It Cd options FFS_EI
948Enable ``Endian-Independent'' FFS support.
949This allows a system to mount an FFS file system created for another
950architecture, at a small performance cost for all FFS file systems.
951See also
952.Xr newfs 8 ,
953.Xr fsck_ffs 8 ,
954.Xr dumpfs 8
955for file system byte order status and manipulation.
956.It Cd options FFS_NO_SNAPSHOT
957Disable the
958.Dq file system snapshot
959support in FFS file systems.
960Maybe useful for install media kernels, small memory systems and
961embedded systems which don't require the snapshot support.
962.It Cd options UFS_EXTATTR
963Enable extended attribute support for UFS1 filesystems.
964.It Cd options WAPBL
965Enable
966.Dq Write Ahead Physical Block Logging file system journaling .
967This provides rapid file system consistency checking after a system outage.
968It also provides better general use performance over regular FFS.
969See also
970.Xr wapbl 4 .
971.It Cd options NVNODE=integer
972This option sets the size of the cache used by the name-to-inode translation
973routines, (a.k.a. the
974.Fn namei
975cache, though called by many other names in the kernel source).
976By default, this cache has
977.Dv NPROC
978(set as 20 + 16 * MAXUSERS) * (80 + NPROC / 8) entries.
979A reasonable way to derive a value of
980.Dv NVNODE ,
981should you notice a large number of namei cache misses with a tool such as
982.Xr systat 1 ,
983is to examine your system's current computed value with
984.Xr sysctl 8 ,
985(which calls this parameter "kern.maxvnodes") and to increase this value
986until either the namei cache hit rate improves or it is determined that
987your system does not benefit substantially from an increase in the size of
988the namei cache.
989.It Cd options NAMECACHE_ENTER_REVERSE
990Causes the namei cache to always enter a reverse mapping (vnode -\*[Gt] name)
991as well as a normal one.
992Normally, this is already done for directory vnodes, to speed up the getcwd
993operation.
994This option will cause longer hash chains in the reverse cache, and thus
995slow down getcwd somewhat.
996However, it does make vnode -\*[Gt] path translations possible in some cases.
997For now, only useful if strict /proc/#/maps emulation for Linux binaries is
998required.
999.It Cd options EXT2FS_SYSTEM_FLAGS
1000This option changes the behavior of the APPEND and IMMUTABLE flags
1001for a file on an
1002.Em ext2
1003file system.
1004Without this option, the superuser or owner of the file can
1005set and clear them.
1006With this option, only the superuser can set them, and
1007they can't be cleared if the securelevel is greater than 0.
1008See also
1009.Xr chflags 1
1010and
1011.Xr secmodel_securelevel 9 .
1012.It Cd options NFS_BOOT_BOOTP
1013Enable use of the BOOTP protocol (RFCs 951 and 1048) to get configuration
1014information if NFS is used to mount the root file system.
1015See
1016.Xr diskless 8
1017for details.
1018.It Cd options NFS_BOOT_DHCP
1019Same as
1020.Dq NFS_BOOT_BOOTP ,
1021but use the DHCP extensions to the
1022BOOTP protocol (RFC 1541).
1023.It Cd options NFS_BOOT_BOOTP_REQFILE
1024Specifies the string sent in the bp_file field of the BOOTP / DHCP
1025request packet.
1026.It Cd options NFS_BOOT_BOOTPARAM
1027Enable use of the BOOTPARAM protocol, consisting of RARP and
1028BOOTPARAM RPC, to get configuration information if NFS
1029is used to mount the root file system.
1030See
1031.Xr diskless 8
1032for details.
1033.It Cd options NFS_BOOT_RWSIZE=value
1034Set the initial NFS read and write sizes for diskless-boot requests.
1035The normal default is 8Kbytes.
1036This option provides a way to lower the value (e.g., to 1024 bytes)
1037as a workaround for buggy network interface cards or boot PROMs.
1038Once booted, the read and write request sizes can be increased by
1039remounting the file system.
1040See
1041.Xr mount_nfs 8
1042for details.
1043.It Cd options NFS_V2_ONLY
1044Reduce the size of the NFS client code by omitting code that's only required
1045for NFSv3 and NQNFS support, leaving only that code required to use NFSv2
1046servers.
1047.It Cd options UFS_DIRHASH
1048Increase lookup performance by maintaining in-core hash tables
1049for large directories.
1050.El
1051.Ss Buffer queue strategy options
1052The following options enable alternative buffer queue strategies.
1053.Bl -ohang
1054.It Cd options BUFQ_READPRIO
1055Enable experimental buffer queue strategy for disk I/O.
1056In the default strategy, outstanding disk requests are ordered by
1057sector number and sent to the disk, regardless of whether the
1058operation is a read or write; this option gives priority to issuing
1059read requests over write requests.
1060Although requests may therefore be issued out of sector-order, causing
1061more seeks and thus lower overall throughput, interactive system
1062responsiveness under heavy disk I/O load may be improved, as processes
1063blocking on disk reads are serviced sooner (file writes typically
1064don't cause applications to block).
1065The performance effect varies greatly depending on the hardware, drive
1066firmware, file system configuration, workload, and desired performance
1067trade-off.
1068Systems using drive write-cache (most modern IDE disks, by default)
1069are unlikely to benefit and may well suffer; such disks acknowledge
1070writes very quickly, and optimize them internally according to
1071physical layout.
1072Giving these disks as many requests to work with as possible (the
1073standard strategy) will typically produce the best results, especially
1074if the drive has a large cache; the drive will silently complete
1075writes from cache as it seeks for reads.
1076Disks that support a large number of concurrent tagged requests (SCSI
1077disks and many hardware RAID controllers) expose this internal
1078scheduling with tagged responses, and don't block for reads; such
1079disks may not see a noticeable difference with either strategy.
1080However, if IDE disks are run with write-cache disabled for safety,
1081writes are not acknowledged until actually completed, and only one
1082request can be outstanding; a large number of small writes in one
1083locality can keep the disk busy, starving reads elsewhere on the disk.
1084Such systems are likely to see the most benefit from this option.
1085Finally, the performance interaction of this option with ffs soft
1086dependencies can be subtle, as that mechanism can drastically alter
1087the workload for file system metadata writes.
1088.It Cd options BUFQ_PRIOCSCAN
1089Enable another buffer queue strategy for disk I/O, per-priority cyclical scan.
1090.It Cd options NEW_BUFQ_STRATEGY
1091Synonym of
1092.Em BUFQ_READPRIO .
1093.El
1094.Ss Miscellaneous Options
1095.Bl -ohang
1096.It Cd options MEMORY_DISK_DYNAMIC
1097This option makes the
1098.Xr md 4
1099.Tn RAM
1100disk size dynamically sized.
1101It is incompatible with
1102.Xr mdsetimage 8 .
1103.It Cd options MEMORY_DISK_HOOKS
1104This option allows for some machine dependent functions to be called when
1105the
1106.Xr md 4
1107.Tn RAM
1108disk driver is configured.
1109This can result in automatically loading a
1110.Tn RAM
1111disk from floppy on open (among other things).
1112.It Cd options MEMORY_DISK_IS_ROOT
1113Forces the
1114.Xr md 4
1115.Tn RAM
1116disk to be the root device.
1117This can only be overridden when
1118the kernel is booted in the 'ask-for-root' mode.
1119.It Cd options MEMORY_DISK_ROOT_SIZE=integer
1120Allocates the given number of 512 byte blocks as memory for the
1121.Xr md 4
1122.Tn RAM
1123disk, to be populated with
1124.Xr mdsetimage 8 .
1125.It Cd options MEMORY_DISK_SERVER=0
1126Do not include the interface to a userland memory disk server process.
1127Per default, this option is set to 1, including the support code.
1128Useful for install media kernels.
1129.It Cd options MEMORY_DISK_RBFLAGS=value
1130This option sets the
1131.Xr reboot 2
1132flags used when booting with a memory disk as root file system.
1133Possible values include
1134.Dv RB_AUTOBOOT
1135(boot in the usual fashion - default value), and
1136.Dv RB_SINGLE
1137(boot in single-user mode).
1138.It Cd options MODULAR
1139Enables the framework for kernel modules (see
1140.Xr module 7 ) .
1141.It Cd options VND_COMPRESSION
1142Enables the
1143.Xr vnd 4
1144driver to also handle compressed images.
1145See
1146.Xr vndcompress 1 ,
1147.Xr vnd 4
1148and
1149.Xr vnconfig 8
1150for more information.
1151.It Cd options SPLDEBUG
1152Help the kernel programmer find bugs related to the interrupt priority
1153level.
1154When
1155.Fn spllower
1156or
1157.Fn splraise
1158changes the current CPU's interrupt priority level to or from
1159.Dv IPL_HIGH ,
1160record a backtrace.
1161Read
1162.Xr return_address 9
1163for caveats about collecting backtraces.
1164This feature is experimental, and it is only available on i386.
1165See
1166.Pa sys/kern/subr_spldebug.c .
1167.It Cd options TFTPROOT
1168Download the root memory disk through TFTP at root mount time.
1169This enables the use of a root
1170.Tn RAM
1171disk without requiring it to be embedded in the kernel using
1172.Xr mdsetimage 8 .
1173The
1174.Tn RAM
1175disk name is obtained using DHCP's filename parameter.
1176This option requires
1177.Em MEMORY_DISK_HOOKS ,
1178.Em MEMORY_DISK_DYNAMIC ,
1179and
1180.Em MEMORY_DISK_IS_ROOT .
1181It is incompatible with
1182.Em MEMORY_DISK_ROOT_SIZE .
1183.It Cd options MALLOC_NOINLINE
1184Time critical fixed size memory allocation is performed with
1185.Fn MALLOC
1186and
1187.Fn FREE .
1188Normally these expand to inline code, but with
1189.Em MALLOC_NOINLINE
1190these call the normal
1191.Fn malloc
1192and
1193.Fn free
1194functions.
1195Useful for install media kernels, small memory systems and embedded systems.
1196.It Cd options HZ=integer
1197On ports that support it, set the system clock frequency (see
1198.Xr hz 9 )
1199to the supplied value.
1200Handle with care.
1201.It Cd options NTP
1202Turns on in-kernel precision timekeeping support used by software
1203implementing
1204.Em NTP
1205(Network Time Protocol, RFC 1305).
1206The
1207.Em NTP
1208option adds an in-kernel Phase-Locked Loop (PLL) for normal
1209.Em NTP
1210operation, and a Frequency-Locked Loop (FLL) for intermittently-connected
1211operation.
1212.Xr ntpd 8
1213will employ a user-level PLL when kernel support is unavailable,
1214but the in-kernel version has lower latency and more precision, and
1215so typically keeps much better time.
1216.Pp
1217The interface to the kernel
1218.Em NTP
1219support is provided by the
1220.Xr ntp_adjtime 2
1221and
1222.Xr ntp_gettime 2
1223system calls, which are intended for use by
1224.Xr ntpd 8
1225and are enabled by the option.
1226On systems with sub-microsecond resolution timers, or where (HZ / 100000)
1227is not an integer, the
1228.Em NTP
1229option also enables extended-precision arithmetic to keep track of
1230fractional clock ticks at NTP time-format precision.
1231.It Cd options PPS_SYNC
1232This option enables a kernel serial line discipline for receiving time
1233phase signals from an external reference clock such as a radio clock.
1234.Po
1235The
1236.Em NTP
1237option (which see) must be on if the
1238.Em PPS_SYNC
1239option is used
1240.Pc .
1241Some reference clocks generate a Pulse Per Second (PPS) signal in
1242phase with their time source.
1243The
1244.Em PPS
1245line discipline receives this signal on either the data leads
1246or the DCD control lead of a serial port.
1247.Pp
1248.Em NTP
1249uses the PPS signal to discipline the local clock oscillator to a high
1250degree of precision (typically less than 50 microseconds in time and
12510.1 ppm in accuracy).
1252.Em PPS
1253can also generate a serial output pulse when the system receives a PPS
1254interrupt.
1255This can be used to measure the system interrupt latency and thus calibrate
1256.Em NTP
1257to account for it.
1258Using
1259.Em PPS
1260usually requires a gadget box
1261to convert from
1262.Tn TTL
1263to
1264.Tn RS-232
1265signal levels.
1266The gadget box and PPS are described in more detail in the HTML documentation
1267for
1268.Xr ntpd 8
1269in
1270.Pa /usr/share/doc/html/ntp .
1271.Pp
1272.Nx
1273currently supports this option in
1274.Xr com 4
1275and
1276.Xr zsc 4 .
1277.It Cd options SETUIDSCRIPTS
1278Allows scripts with the setuid bit set to execute as the effective
1279user rather than the real user, just like binary executables.
1280.Pp
1281.Em NOTE :
1282Using this option will also enable
1283.Em options FDSCRIPTS
1284.It Cd options FDSCRIPTS
1285Allows execution of scripts with the execute bit set, but not the
1286read bit, by opening the file and passing the file descriptor to
1287the shell, rather than the filename.
1288.Pp
1289.Em NOTE :
1290Execute only (non-readable) scripts will have
1291.Va argv[0]
1292set to
1293.Pa /dev/fd/* .
1294What this option allows as far as security is
1295concerned, is the ability to safely ensure that the correct script
1296is run by the interpreter, as it is passed as an already open file.
1297.It Cd options PUCCN
1298Enables treating serial ports found on PCI boards
1299.Xr puc 4
1300as potential console devices.
1301The method for choosing such a console device is port dependent.
1302.It Cd options RTC_OFFSET=integer
1303The kernel (and typically the hardware battery backed-up clock on
1304those machines that have one) keeps time in
1305.Em UTC
1306(Universal Coordinated Time, once known as
1307.Em GMT ,
1308or Greenwich Mean Time)
1309and not in the time of the local time zone.
1310The
1311.Em RTC_OFFSET
1312option is used on some ports (such as the i386) to tell the kernel
1313that the hardware clock is offset from
1314.Em UTC
1315by the specified number of minutes.
1316This is typically used when a machine boots several operating
1317systems and one of them wants the hardware clock to run in the
1318local time zone and not in
1319.Em UTC ,
1320e.g.
1321.Em RTC_OFFSET=300
1322means
1323the hardware clock is set to US Eastern Time (300 minutes behind
1324.Em UTC ) ,
1325and not
1326.Em UTC .
1327(Note:
1328.Em RTC_OFFSET
1329is used to initialize a kernel variable named
1330.Va rtc_offset
1331which is the source actually used to determine the clock offset, and
1332which may be accessed via the kern.rtc_offset sysctl variable.
1333See
1334.Xr sysctl 8
1335and
1336.Xr sysctl 3
1337for details.
1338Since the kernel clock is initialized from the hardware clock very
1339early in the boot process, it is not possible to meaningfully change
1340.Va rtc_offset
1341in system initialization scripts.
1342Changing this value currently may only be done at kernel compile
1343time or by patching the kernel and rebooting).
1344.Pp
1345.Em NOTE :
1346Unfortunately, in many cases where the hardware clock
1347is kept in local time, it is adjusted for Daylight Savings
1348Time; this means that attempting to use
1349.Em RTC_OFFSET
1350to let
1351.Nx
1352coexist with such an operating system, like Windows,
1353would necessitate changing
1354.Em RTC_OFFSET
1355twice a year.
1356As such, this solution is imperfect.
1357.It Cd options KMEMSTATS
1358The kernel memory allocator,
1359.Xr malloc 9 ,
1360will keep statistics on its performance if this option is enabled.
1361Unfortunately, this option therefore essentially disables the
1362.Fn MALLOC
1363and
1364.Fn FREE
1365forms of the memory allocator, which are used to enhance the performance
1366of certain critical sections of code in the kernel.
1367This option therefore can lead to a significant decrease in the
1368performance of certain code in the kernel if enabled.
1369Examples of such code include the
1370.Fn namei
1371routine, the
1372.Xr ccd 4
1373driver,
1374and much of the networking code.
1375.It Cd options MAXUPRC=integer
1376Sets the soft
1377.Dv RLIMIT_NPROC
1378resource limit, which specifies the maximum number of simultaneous
1379processes a user is permitted to run, for process 0;
1380this value is inherited by its child processes.
1381It defaults to
1382.Em CHILD_MAX ,
1383which is currently defined to be 160.
1384Setting
1385.Em MAXUPRC
1386to a value less than
1387.Em CHILD_MAX
1388is not permitted, as this would result in a violation of the semantics of
1389.St -p1003.1-90 .
1390.It Cd options NOFILE=integer
1391Sets the soft
1392.Dv RLIMIT_NOFILE
1393resource limit, which specifies the maximum number of open
1394file descriptors for each process;
1395this value is inherited by its child processes.
1396It defaults to
1397.Em OPEN_MAX ,
1398which is currently defined to be 64.
1399.It Cd options MAXFILES=integer
1400Sets the default value of the
1401.Em kern.maxfiles
1402sysctl variable, which indicates the maximum number of files that may
1403be open in the system.
1404.It Cd options DEFCORENAME=string
1405Sets the default value of the
1406.Em kern.defcorename
1407sysctl variable, otherwise it is set to
1408.Nm %n.core .
1409See
1410.Xr sysctl 8
1411and
1412.Xr sysctl 3
1413for details.
1414.It Cd options RASOPS_CLIPPING
1415Enables clipping within the
1416.Nm rasops
1417raster-console output system.
1418.Em NOTE :
1419only available on architectures that use
1420.Nm rasops
1421for console output.
1422.It Cd options RASOPS_SMALL
1423Removes optimized character writing code from the
1424.Nm rasops
1425raster-console output system.
1426.Em NOTE :
1427only available on architectures that use
1428.Nm rasops
1429for console output.
1430.It Cd options INCLUDE_CONFIG_FILE
1431Embeds the kernel config file used to define the kernel in the kernel
1432binary itself.
1433The embedded data also includes any files directly included by the config
1434file itself, e.g.
1435.Pa GENERIC.local
1436or
1437.Pa std.$MACHINE .
1438The embedded config file can be extracted from the resulting kernel with
1439.Xr config 1
1440.Fl x ,
1441or by the following command:
1442.Bd -literal -offset indent
1443strings netbsd | sed -n 's/^_CFG_//p' | unvis
1444.Ed
1445.It Cd options INCLUDE_JUST_CONFIG
1446Similar to the above option, but includes just the actual config file,
1447not any included files.
1448.It Cd options PIPE_SOCKETPAIR
1449Use slower, but smaller socketpair(2)-based pipe implementation instead
1450of default faster, but bigger one.
1451Primarily useful for installation kernels.
1452.It Cd options USERCONF
1453Compiles in the in-kernel device configuration manager.
1454See
1455.Xr userconf 4
1456for details.
1457.It Cd options PERFCTRS
1458Compiles in kernel support for CPU performance-monitoring counters.
1459See
1460.Xr pmc 1
1461for details.
1462.Em NOTE :
1463not available on all architectures.
1464.It Cd options SYSCALL_STATS
1465Count the number of times each system call number is called.
1466The values can be read through the sysctl interface and displayed using
1467.Xr systat 1 .
1468.Em NOTE :
1469not yet available on all architectures.
1470.It Cd options SYSCALL_TIMES
1471Count the time spent (using
1472.Fn cpu_counter32 )
1473in each system call.
1474.Em NOTE :
1475Using this option will also enable
1476.Cd options SYSCALL_STATS .
1477.It Cd options SYSCALL_TIMES_HASCOUNTER
1478Force use of
1479.Fn cpu_counter32
1480even if
1481.Fn cpu_hascounter
1482reports false.
1483Useful for systems where the cycle counter doesn't run at a constant rate
1484(e.g. Soekris boxes).
1485.It Cd options XSERVER_DDB
1486A supplement to XSERVER that adds support for entering
1487.Xr ddb 4
1488while in
1489.Tn X11 .
1490.It Cd options FILEASSOC
1491Support for
1492.Xr fileassoc 9 .
1493.It Cd options FILEASSOC_NHOOKS=integer
1494Number of storage slots per file for
1495.Xr fileassoc 9 .
1496Default is 4.
1497.It Cd options I2C_SCAN
1498Scan each i2c bus to determine which addresses respond.
1499.Pp
1500.Em WARNING !
1501Using this option can access some devices in such a
1502manner as to leave them in an unstable or unuseable state, and
1503can prevent those devices from being properly matched and/or
1504attached.
1505It can also lock up the entire
1506.Xr iic 4
1507bus and even prevent a machine from completing the boot process.
1508Don't use this option unless you know what you're doing and can
1509accept all sorts of unforeseen consequences.
1510.El
1511.Ss Networking Options
1512.Bl -ohang
1513.It Cd options GATEWAY
1514Enables
1515.Em IPFORWARDING
1516(which see)
1517and (on most ports) increases the size of
1518.Em NMBCLUSTERS
1519(which see).
1520In general,
1521.Em GATEWAY
1522is used to indicate that a system should act as a router, and
1523.Em IPFORWARDING
1524is not invoked directly.
1525(Note that
1526.Em GATEWAY
1527has no impact on protocols other than
1528.Tn IP ,
1529such as
1530.Tn CLNP ) .
1531.Em GATEWAY
1532option also compiles IPv4 and IPv6 fast forwarding code into the kernel.
1533.It Cd options ICMPPRINTFS
1534The
1535.Em ICMPPRINTFS
1536option will enable debugging information to be printed about
1537the
1538.Xr icmp 4
1539protocol.
1540.It Cd options IPFORWARDING=value
1541If
1542.Em value
1543is 1 this enables IP routing behavior.
1544If
1545.Em value
1546is 0 (the default), it disables it.
1547The
1548.Em GATEWAY
1549option sets this to 1 automatically.
1550With this option enabled, the machine will forward IP datagrams destined
1551for other machines between its interfaces.
1552Note that even without this option, the kernel will
1553still forward some packets (such as source routed packets) -- removing
1554.Em GATEWAY
1555and
1556.Em IPFORWARDING
1557is insufficient to stop all routing through a bastion host on a
1558firewall -- source routing is controlled independently.
1559To turn off source routing, use
1560.Em options IPFORWSRCRT=0
1561(which see).
1562Note that IP forwarding may be turned on and off independently of the
1563setting of the
1564.Em IPFORWARDING
1565option through the use of the
1566.Em net.inet.ip.forwarding
1567sysctl variable.
1568If
1569.Em net.inet.ip.forwarding
1570is 1, IP forwarding is on.
1571See
1572.Xr sysctl 8
1573and
1574.Xr sysctl 3
1575for details.
1576.It Cd options IPFORWSRCRT=value
1577If
1578.Em value
1579is set to zero, source routing of IP datagrams is turned off.
1580If
1581.Em value
1582is set to one (the default) or the option is absent, source routed IP
1583datagrams are forwarded by the machine.
1584Note that source routing of IP packets may be turned on and off
1585independently of the setting of the
1586.Em IPFORWSRCRT
1587option through the use of the
1588.Em net.inet.ip.forwsrcrt
1589sysctl variable.
1590If
1591.Em net.inet.ip.forwsrcrt
1592is 1, forwarding of source routed IP datagrams is on.
1593See
1594.Xr sysctl 8
1595and
1596.Xr sysctl 3
1597for details.
1598.It Cd options IFA_STATS
1599Tells the kernel to maintain per-address statistics on bytes sent
1600and received over (currently) Internet and AppleTalk addresses.
1601.\"This can be a fairly expensive operation, so you probably want to
1602.\"keep this disabled.
1603The option is not recommended as it degrades system stability.
1604.It Cd options IFQ_MAXLEN=value
1605Increases the allowed size of the network interface packet queues.
1606The default queue size is 50 packets, and you do not normally need
1607to increase it.
1608.It Cd options IPSELSRC
1609Includes support for source-address selection policies.
1610See
1611.Xr in_getifa 9 .
1612.It Cd options MROUTING
1613Includes support for IP multicast routers.
1614You certainly want
1615.Em INET
1616with this.
1617Multicast routing is controlled by the
1618.Xr mrouted 8
1619daemon.
1620See also option
1621.Cd PIM .
1622.It Cd options PIM
1623Includes support for Protocol Independent Multicast (PIM) routing.
1624You need
1625.Em MROUTING
1626and
1627.Em INET
1628with this.
1629Software using this can be found e.g. in
1630.Pa pkgsrc/net/xorp .
1631.It Cd options INET
1632Includes support for the
1633.Tn TCP/IP
1634protocol stack.
1635You almost certainly want this.
1636See
1637.Xr inet 4
1638for details.
1639.It Cd options INET6
1640Includes support for the
1641.Tn IPv6
1642protocol stack.
1643See
1644.Xr inet6 4
1645for details.
1646Unlike
1647.Em INET ,
1648.Em INET6
1649enables multicast routing code as well.
1650This option requires
1651.Em INET
1652at this moment, but it should not.
1653.It Cd options ND6_DEBUG
1654The option sets the default value of net.inet6.icmp6.nd6_debug to 1,
1655for debugging IPv6 neighbor discovery protocol handling.
1656See
1657.Xr sysctl 3
1658for details.
1659.It Cd options IPSEC
1660Includes support for the
1661.Tn IPsec
1662protocol, using the KAME implementation.
1663See
1664.Xr ipsec 4
1665for details.
1666.It Cd options IPSEC_DEBUG
1667Enables debugging code in
1668.Tn IPsec
1669stack.
1670See
1671.Xr ipsec 4
1672for details.
1673.It Cd options IPSEC_ESP
1674Includes support for
1675.Tn IPsec
1676.Tn ESP
1677protocol, using the KAME implementation.
1678See
1679.Xr ipsec 4
1680for details.
1681.It Cd options FAST_IPSEC
1682Includes support for the
1683.Tn IPsec
1684protocol, using the implementation derived from
1685.Ox ,
1686relaying on
1687.Xr opencrypto 9
1688to carry out cryptographic operations.
1689See
1690.Xr fast_ipsec 4
1691for details.
1692.It Cd options IPSEC_NAT_T
1693Includes support for
1694.Tn IPsec
1695Network Address Translator traversal (NAT-T), as described in RFCs 3947
1696and 3948.
1697This feature might be patent-encumbered in some countries.
1698.It Cd options ALTQ
1699Enabled ALTQ (Alternate Queueing).
1700For simple rate-limiting, use
1701.Xr tbrconfig 8
1702to set up the interface transmission rate.
1703To use queueing disciplines, their appropriate kernel options should also
1704be defined (documented below).
1705Queueing disciplines are managed by
1706.Xr altqd 8 .
1707See
1708.Xr altq 9
1709for details.
1710.It Cd options ALTQ_HFSC
1711Include support for ALTQ-implemented HFSC (Hierarchical Fair Service Curve)
1712module.
1713HFSC supports both link-sharing and guaranteed real-time services.
1714HFSC employs a service curve based QoS model, and its unique feature
1715is an ability to decouple delay and bandwidth allocation.
1716Requires
1717.Em ALTQ_RED
1718to use the RED queueing discipline on HFSC classes, or
1719.Em ALTQ_RIO
1720to use the RIO queueing discipline on HFSC classes.
1721This option assumes
1722.Em ALTQ .
1723.It Cd options ALTQ_PRIQ
1724Include support for ALTQ-implemented PRIQ (Priority Queueing).
1725PRIQ implements a simple priority-based queueing discipline.
1726A higher priority class is always served first.
1727Requires
1728.Em ALTQ_RED
1729to use the RED queueing discipline on HFSC classes, or
1730.Em ALTQ_RIO
1731to use the RIO queueing discipline on HFSC classes.
1732This option assumes
1733.Em ALTQ .
1734.It Cd options ALTQ_WFQ
1735Include support for ALTQ-implemented WFQ (Weighted Fair Queueing).
1736WFQ implements a weighted-round robin scheduler for a set of queues.
1737A weight can be assigned to each queue to give a different proportion
1738of the link capacity.
1739A hash function is used to map a flow to one of a set of queues.
1740This option assumes
1741.Em ALTQ .
1742.It Cd options ALTQ_FIFOQ
1743Include support for ALTQ-implemented FIFO queueing.
1744FIFOQ is a simple drop-tail FIFO (First In, First Out) queueing discipline.
1745This option assumes
1746.Em ALTQ .
1747.It Cd options ALTQ_RIO
1748Include support for ALTQ-implemented RIO (RED with In/Out).
1749The original RIO has 2 sets of RED parameters; one for in-profile
1750packets and the other for out-of-profile packets.
1751At the ingress of the network, profile meters tag packets as IN or
1752OUT based on contracted profiles for customers.
1753Inside the network, IN packets receive preferential treatment by
1754the RIO dropper.
1755ALTQ/RIO has 3 drop precedence levels defined for the Assured Forwarding
1756PHB of DiffServ (RFC 2597).
1757This option assumes
1758.Em ALTQ .
1759.It Cd options ALTQ_BLUE
1760Include support for ALTQ-implemented Blue buffer management.
1761Blue is another active buffer management mechanism.
1762This option assumes
1763.Em ALTQ .
1764.It Cd options ALTQ_FLOWVALVE
1765Include support for ALTQ-implemented Flowvalve.
1766Flowvalve is a simple implementation of a RED penalty box that identifies
1767and punishes misbehaving flows.
1768This option requires
1769.Em ALTQ_RED
1770and assumes
1771.Em ALTQ .
1772.It Cd options ALTQ_CDNR
1773Include support for ALTQ-implemented CDNR (diffserv traffic conditioner)
1774packet marking/manipulation.
1775Traffic conditioners are components to meter, mark, or drop incoming
1776packets according to some rules.
1777As opposed to queueing disciplines, traffic conditioners handle incoming
1778packets at an input interface.
1779This option assumes
1780.Em ALTQ .
1781.It Cd options ALTQ_NOPCC
1782Disables use of processor cycle counter to measure time in ALTQ.
1783This option should be defined for a non-Pentium i386 CPU which does not
1784have TSC, SMP (per-CPU counters are not in sync), or power management
1785which affects processor cycle counter.
1786This option assumes
1787.Em ALTQ .
1788.It Cd options ALTQ_IPSEC
1789Include support for IPsec in IPv4 ALTQ.
1790This option assumes
1791.Em ALTQ .
1792.It Cd options ALTQ_JOBS
1793Include support for ALTQ-implemented JoBS (Joint Buffer Management
1794and Scheduling).
1795This option assumes
1796.Em ALTQ .
1797.It Cd options ALTQ_AFMAP
1798Include support for an undocumented ALTQ feature that is used to map an IP
1799flow to an ATM VC (Virtual Circuit).
1800This option assumes
1801.Em ALTQ .
1802.It Cd options ALTQ_LOCALQ
1803Include support for ALTQ-implemented local queues.
1804Its practical use is undefined.
1805Assumes
1806.Em ALTQ .
1807.It Cd options SUBNETSARELOCAL
1808Sets default value for net.inet.ip.subnetsarelocal variable, which
1809controls whether non-directly-connected subnets of connected networks
1810are considered "local" for purposes of choosing the MSS for a TCP
1811connection.
1812This is mostly present for historic reasons and completely irrelevant if
1813you enable Path MTU discovery.
1814.It Cd options HOSTZEROBROADCAST
1815Sets default value for net.inet.ip.hostzerobroadcast variable, which
1816controls whether the zeroth host address of each connected subnet is
1817also considered a broadcast address.
1818Default value is "1", for compatibility with old systems; if this is
1819set to zero on all hosts on a subnet, you should be able to fit an extra
1820host per subnet on the
1821".0" address.
1822.It Cd options MCLSHIFT=value
1823This option is the base-2 logarithm of the size of mbuf clusters.
1824The
1825.Bx
1826networking stack keeps network packets in a linked
1827list, or chain, of kernel buffer objects called mbufs.
1828The system provides larger mbuf clusters as an optimization for
1829large packets, instead of using long chains for large packets.
1830The mbuf cluster size,
1831or
1832.Em MCLBYTES ,
1833must be a power of two, and is computed as two raised to the power
1834.Em MCLSHIFT .
1835On systems with Ethernet network adapters,
1836.Em MCLSHIFT
1837is often set to 11, giving 2048-byte mbuf clusters, large enough to
1838hold a 1500-byte
1839.Tn Ethernet
1840frame in a single cluster.
1841Systems with network interfaces supporting larger frame sizes like
1842.Tn ATM ,
1843.Tn FDDI ,
1844or
1845.Tn HIPPI
1846may perform better with
1847.Em MCLSHIFT
1848set to 12 or 13, giving mbuf cluster sizes of 4096 and 8192 bytes,
1849respectively.
1850.It Cd options ISO,TPIP
1851Include support for the ubiquitous
1852.Tn OSI
1853protocol stack.
1854See
1855.Xr iso 4
1856for details.
1857This option assumes
1858.Em INET .
1859.It Cd options EON
1860Include support for tunneling
1861.Tn OSI
1862protocols over
1863.Tn IP .
1864Known to be broken, or at least very fragile, and undocumented.
1865.It Cd options NETATALK
1866Include support for the
1867.Tn AppleTalk
1868protocol stack.
1869The kernel provides provision for the
1870.Em Datagram Delivery Protocol
1871(DDP), providing SOCK_DGRAM support and
1872.Tn AppleTalk
1873routing.
1874This stack is used by the
1875.Em NETATALK
1876package, which adds support for
1877.Tn AppleTalk
1878server services via user libraries and applications.
1879.It Cd options BLUETOOTH
1880Include support for the
1881.Tn Bluetooth
1882protocol stack.
1883See
1884.Xr bluetooth 4
1885for details.
1886.It Cd options IPNOPRIVPORTS
1887Normally, only root can bind a socket descriptor to a so-called
1888.Dq privileged
1889.Tn TCP
1890port, that is, a port number in the range 0-1023.
1891This option eliminates those checks from the kernel.
1892This can be useful if there is a desire to allow daemons without
1893privileges to bind those ports, e.g., on firewalls.
1894The security tradeoffs in doing this are subtle.
1895This option should only be used by experts.
1896.It Cd options TCP_COMPAT_42
1897.Tn TCP
1898bug compatibility with
1899.Bx 4.2 .
1900In
1901.Bx 4.2 ,
1902.Tn TCP
1903sequence numbers were 32-bit signed values.
1904Modern implementations of TCP use unsigned values.
1905This option clamps the initial sequence number to start in
1906the range 2^31 rather than the full unsigned range of 2^32.
1907Also, under
1908.Bx 4.2 ,
1909keepalive packets must contain at least one byte or else
1910the remote end would not respond.
1911.It Cd options TCP_DEBUG
1912Record the last
1913.Em TCP_NDEBUG
1914TCP packets with SO_DEBUG set, and decode to the console if
1915.Em tcpconsdebug
1916is set.
1917.It Cd options TCP_NDEBUG
1918Number of packets to record for
1919.Em TCP_DEBUG .
1920Defaults to 100.
1921.It Cd options TCP_SENDSPACE=value
1922.It Cd options TCP_RECVSPACE=value
1923These options set the max TCP window size to other sizes than the default.
1924The TCP window sizes can be altered via
1925.Xr sysctl 8
1926as well.
1927.It Cd options TCP_INIT_WIN=value
1928This option sets the initial TCP window size for non-local connections,
1929which is used when the transmission starts.
1930The default size is 1, but if the machine should act more aggressively,
1931the initial size can be set to some other value.
1932The initial TCP window size can be set via
1933.Xr sysctl 8
1934as well.
1935.It Cd options PFIL_HOOKS
1936This option turns on the packet filter interface hooks.
1937See
1938.Xr pfil 9
1939for details.
1940This option assumes
1941.Em INET .
1942.It Cd options IPFILTER_LOG
1943This option, in conjunction with
1944.Em pseudo-device ipfilter ,
1945enables logging of IP packets using IP-Filter.
1946.It Cd options IPFILTER_LOOKUP
1947This option enables the
1948IP-Filter
1949.Xr ippool 8
1950functionality to be enabled.
1951.It Cd options IPFILTER_COMPAT
1952This option enables older IP-Filter binaries to work.
1953.It Cd options IPFILTER_DEFAULT_BLOCK
1954This option sets the default policy of IP-Filter.
1955If it is set, IP-Filter will block packets by default.
1956.It Cd options BRIDGE_IPF
1957This option causes
1958.Em bridge
1959devices to use the IP and/or IPv6 filtering hooks, forming
1960a link-layer filter that uses protocol-layer rules.
1961This option assumes the presence of
1962.Em pseudo-device ipfilter .
1963.It Cd options MBUFTRACE
1964This option can help track down mbuf leaks.
1965When enabled, mbufs are tagged with the devices and protocols using them,
1966which slightly decreases network performance.
1967This additional information can be viewed with
1968.Xr netstat 1 :
1969.Dl Ic netstat Fl mssv
1970Not all devices or protocols support this option.
1971.El
1972.Ss Sysctl Related Options
1973.Bl -ohang
1974.It Cd options SYSCTL_DISALLOW_CREATE
1975Disallows the creation or deletion of nodes from the sysctl tree, as
1976well as the assigning of descriptions to nodes that lack them, by any
1977process.
1978These operations are still available to kernel sub-systems, including
1979loadable kernel modules.
1980.It Cd options SYSCTL_DISALLOW_KWRITE
1981Prevents processes from adding nodes to the sysctl tree that make
1982existing kernel memory areas writable.
1983Sections of kernel memory can still be read and new nodes that own
1984their own data may still be writable.
1985.It Cd options SYSCTL_DEBUG_SETUP
1986Causes the SYSCTL_SETUP routines to print a brief message when they
1987are invoked.
1988This is merely meant as an aid in determining the order in which
1989sections of the tree are created.
1990.It Cd options SYSCTL_DEBUG_CREATE
1991Prints a message each time
1992.Fn sysctl_create ,
1993the function that adds nodes to the tree, is called.
1994.It Cd options SYSCTL_INCLUDE_DESCR
1995Causes the kernel to include short, human readable descriptions for
1996nodes in the sysctl tree.
1997The descriptions can be retrieved programmatically (see
1998.Xr sysctl 3 ) ,
1999or by the sysctl binary itself (see
2000.Xr sysctl 8 ) .
2001The descriptions are meant to give an indication of the purpose and/or
2002effects of a given node's value, not replace the documentation for the
2003given subsystem as a whole.
2004.El
2005.Ss System V IPC Options
2006.Bl -ohang
2007.It Cd options SYSVMSG
2008Includes support for
2009.At V
2010style message queues.
2011See
2012.Xr msgctl 2 ,
2013.Xr msgget 2 ,
2014.Xr msgrcv 2 ,
2015.Xr msgsnd 2 .
2016.It Cd options SYSVSEM
2017Includes support for
2018.At V
2019style semaphores.
2020See
2021.Xr semctl 2 ,
2022.Xr semget 2 ,
2023.Xr semop 2 .
2024.It Cd options SEMMNI=value
2025Sets the number of
2026.At V
2027style semaphore identifiers.
2028The GENERIC config file for your port will have the default.
2029.It Cd options SEMMNS=value
2030Sets the number of
2031.At V
2032style semaphores in the system.
2033The GENERIC config file for your port will have the default.
2034.It Cd options SEMUME=value
2035Sets the maximum number of undo entries per process for
2036.At V
2037style semaphores.
2038The GENERIC config file for your port will have the default.
2039.It Cd options SEMMNU=value
2040Sets the number of undo structures in the system for
2041.At V
2042style semaphores.
2043The GENERIC config file for your port will have the default.
2044.It Cd options SYSVSHM
2045Includes support for
2046.At V
2047style shared memory.
2048See
2049.Xr shmat 2 ,
2050.Xr shmctl 2 ,
2051.Xr shmdt 2 ,
2052.Xr shmget 2 .
2053.It Cd options SHMMAXPGS=value
2054Sets the maximum number of
2055.At V
2056style shared memory pages that are available through the
2057.Xr shmget 2
2058system call.
2059Default value is 1024 on most ports.
2060See
2061.Pa /usr/include/machine/vmparam.h
2062for the default.
2063.El
2064.Ss VM Related Options
2065.Bl -ohang
2066.It Cd options NMBCLUSTERS=value
2067The number of mbuf clusters the kernel supports.
2068Mbuf clusters are MCLBYTES in size (usually 2k).
2069This is used to compute the size of the kernel VM map
2070.Em mb_map ,
2071which maps mbuf clusters.
2072Default on most ports is 1024 (2048 with
2073.Dq options GATEWAY
2074).
2075See
2076.Pa /usr/include/machine/param.h
2077for exact default information.
2078Increase this value if you get
2079.Dq mclpool limit reached
2080messages.
2081.It Cd options NKMEMPAGES=value
2082.It Cd options NKMEMPAGES_MIN=value
2083.It Cd options NKMEMPAGES_MAX=value
2084Size of kernel VM map
2085.Em kmem_map ,
2086in PAGE_SIZE-sized chunks (the VM page size; this value may be read
2087from the
2088.Xr sysctl 8
2089variable
2090.Em hw.pagesize
2091).
2092This VM map is used to map the kernel malloc arena.
2093The kernel attempts to auto-size this map based on the amount of
2094physical memory in the system.
2095Platform-specific code may place bounds on this computed size,
2096which may be viewed with the
2097.Xr sysctl 8
2098variable
2099.Em vm.nkmempages .
2100See
2101.Pa /usr/include/machine/param.h
2102for the default upper and lower bounds.
2103The related options
2104.Sq NKMEMPAGES_MIN
2105and
2106.Sq NKMEMPAGES_MAX
2107allow the bounds to be overridden in the kernel configuration file.
2108These options are provided in the event the computed value is
2109insufficient resulting in an
2110.Dq out of space in kmem_map
2111panic.
2112.It Cd options SB_MAX=value
2113Sets the max size in bytes that a socket buffer is allowed to occupy.
2114The default is 256k, but sometimes it needs to be increased, for example
2115when using large TCP windows.
2116This option can be changed via
2117.Xr sysctl 8
2118as well.
2119.It Cd options SOMAXKVA=value
2120Sets the maximum size of kernel virtual memory that the socket buffers
2121are allowed to use.
2122The default is 16MB, but in situations where for example large TCP
2123windows are used this value must also be increased.
2124This option can be changed via
2125.Xr sysctl 8
2126as well.
2127.It Cd options BUFCACHE=value
2128Size of the buffer cache as a percentage of total available
2129.Tn RAM .
2130Ignored if BUFPAGES is also specified.
2131.It Cd options NBUF=value
2132Sets the number of buffer headers available, i.e., the number of
2133open files that may have a buffer cache entry.
2134Each buffer header
2135requires MAXBSIZE (machine dependent, but usually 65536) bytes.
2136The default value is machine dependent, but is usually equal to the
2137value of BUFPAGES.
2138If an architecture dependent VM_MAX_KERNEL_BUF constant is defined
2139then NBUF may be reduced at run time so that the storage allocated
2140for buffer headers doesn't exceed that limit.
2141.It Cd options BUFPAGES=value
2142These options set the number of pages available for the buffer cache.
2143Their default value is a machine dependent value, often calculated as
2144between 5% and 10% of total available
2145.Tn RAM .
2146.It Cd options MAXTSIZ=bytes
2147Sets the maximum size limit of a process' text segment.
2148See
2149.Pa /usr/include/machine/vmparam.h
2150for the port-specific default.
2151.It Cd options DFLDSIZ=bytes
2152Sets the default size limit of a process' data segment, the value that
2153will be returned as the soft limit for
2154.Dv RLIMIT_DATA
2155(as returned by
2156.Xr getrlimit 2 ) .
2157See
2158.Pa /usr/include/machine/vmparam.h
2159for the port-specific default.
2160.It Cd options MAXDSIZ=bytes
2161Sets the maximum size limit of a process' data segment, the value that
2162will be returned as the hard limit for
2163.Dv RLIMIT_DATA
2164(as returned by
2165.Xr getrlimit 2 ) .
2166See
2167.Pa /usr/include/machine/vmparam.h
2168for the port-specific default.
2169.It Cd options DFLSSIZ=bytes
2170Sets the default size limit of a process' stack segment, the value that
2171will be returned as the soft limit for
2172.Dv RLIMIT_STACK
2173(as returned by
2174.Xr getrlimit 2 ) .
2175See
2176.Pa /usr/include/machine/vmparam.h
2177for the port-specific default.
2178.It Cd options MAXSSIZ=bytes
2179Sets the maximum size limit of a process' stack segment, the value that
2180will be returned as the hard limit for
2181.Dv RLIMIT_STACK
2182(as returned by
2183.Xr getrlimit 2 ) .
2184See
2185.Pa /usr/include/machine/vmparam.h
2186for the port-specific default.
2187.It Cd options DUMP_ON_PANIC=integer
2188Defaults to one.
2189If set to zero, the kernel will not dump to the dump device when
2190it panics, though dumps can still be forced via
2191.Xr ddb 4
2192with the
2193.Dq sync
2194command.
2195Note that this sets the value of the
2196.Em kern.dump_on_panic
2197.Xr sysctl 3
2198variable which may be changed at run time -- see
2199.Xr sysctl 8
2200for details.
2201.It Cd options USE_TOPDOWN_VM
2202User space memory allocations (as made by
2203.Xr mmap 2 )
2204will be arranged in a
2205.Dq top down
2206fashion instead of the traditional
2207.Dq upwards from MAXDSIZ \&+ vm_daddr
2208method.
2209This includes the placement of
2210.Xr ld.so 1 .
2211Arranging memory in this manner allows either (or both of) the heap or
2212.Xr mmap 2
2213allocated space to grow larger than traditionally possible.
2214This option is not available on all ports, but is instead expected to be
2215offered on a port-by-port basis, after which some ports will commit to
2216using it by default.
2217See the files
2218.Pa /usr/include/uvm/uvm_param.h
2219for some implementation details, and
2220.Pa /usr/include/machine/vmparam.h
2221for port specific details including availability.
2222.It Cd options VMSWAP
2223Enable paging device/file support.
2224This option is on by default.
2225.It Cd options PDPOLICY_CLOCKPRO
2226Use CLOCK-Pro, an alternative page replace policy.
2227.El
2228.Ss Security Options
2229.Bl -ohang
2230.It Cd options INSECURE
2231Hardwires the kernel security level at \-1.
2232This means that the system
2233always runs in secure level \-1 mode, even when running multiuser.
2234See the manual page for
2235.Xr init 8
2236for details on the implications of this.
2237The kernel secure level may manipulated by the superuser by altering the
2238.Em kern.securelevel
2239.Xr sysctl 3
2240variable (the secure level may only be lowered by a call from process ID 1,
2241i.e.,
2242.Xr init 8 ) .
2243See also
2244.Xr secmodel_securelevel 9 ,
2245.Xr sysctl 8
2246and
2247.Xr sysctl 3 .
2248.It Cd options VERIFIED_EXEC_FP_MD5
2249Enables support for MD5 hashes in Veriexec.
2250.It Cd options VERIFIED_EXEC_FP_SHA1
2251Enables support for SHA1 hashes in Veriexec.
2252.It Cd options VERIFIED_EXEC_FP_RMD160
2253Enables support for RMD160 hashes in Veriexec.
2254.It Cd options VERIFIED_EXEC_FP_SHA256
2255Enables support for SHA256 hashes in Veriexec.
2256.It Cd options VERIFIED_EXEC_FP_SHA384
2257Enables support for SHA384 hashes in Veriexec.
2258.It Cd options VERIFIED_EXEC_FP_SHA512
2259Enables support for SHA512 hashes in Veriexec.
2260.It Cd options PAX_MPROTECT=value
2261Enables PaX MPROTECT,
2262.Xr mprotect 2
2263restrictions from the PaX project.
2264.Pp
2265The
2266.Ar value
2267is the default value for the
2268.Em global
2269knob, see
2270.Xr sysctl 3 .
2271If 0, PaX MPROTECT will be enabled only if explicitly set on programs
2272using
2273.Xr paxctl 8 .
2274If 1, PaX MPROTECT will be enabled for all programs.
2275Programs can be exempted using
2276.Xr paxctl 8 .
2277.Pp
2278See
2279.Xr security 7
2280for more details.
2281.It Cd options PAX_SEGVGUARD=value
2282Enables PaX Segvguard.
2283.Pp
2284The
2285.Ar value
2286is the default value for the
2287.Em global
2288knob, see
2289.Xr sysctl 3 .
2290If 0, PaX Segvguard will be enabled only if explicitly set on programs
2291using
2292.Xr paxctl 8 .
2293If 1, PaX Segvguard will be enabled to all programs, and exemption can
2294be done using
2295.Xr paxctl 8 .
2296.Pp
2297See
2298.Xr security 7
2299for more details.
2300.It Cd options PAX_ASLR=value
2301Enables PaX ASLR.
2302.Pp
2303The
2304.Ar value
2305is the default value for the
2306.Em global
2307knob, see
2308.Xr sysctl 3 .
2309If 0, PaX ASLR will be enabled only if explicitly set on programs
2310using
2311.Xr paxctl 8 .
2312If 1, PaX ASLR will be enabled to all programs, and exemption can
2313be done using
2314.Xr paxctl 8 .
2315.Pp
2316See
2317.Xr security 7
2318for more details.
2319.It Cd options USER_VA0_DISABLE_DEFAULT=value
2320Sets the initial value of the flag which controls whether user programs
2321can map virtual address 0.
2322The flag can be changed at runtime by
2323.Xr sysctl 3 .
2324.El
2325.Ss amiga-specific Options
2326.Bl -ohang
2327.It Cd options BB060STUPIDROM
2328When the bootloader (which passes
2329.Tn AmigaOS
2330.Tn ROM
2331information) claims we have a 68060
2332.Tn CPU
2333without
2334.Tn FPU ,
2335go look into the Processor Configuration Register (PCR) to find out.
2336You need this with
2337.Tn Amiga
2338.Tn ROM Ns s
2339up to (at least) V40.xxx (OS3.1),
2340when you boot via the bootblocks and don't have a DraCo.
2341.It Cd options IOBZCLOCK=frequency
2342The IOBlix boards come with two different serial master clocks: older ones
2343use 24 MHz, newer ones use 22.1184 MHz.
2344The driver normally assumes the latter.
2345If your board uses 24 MHz, you can recompile your kernel with
2346options IOBZCLOCK=24000000
2347or patch the kernel variable
2348.Tn iobzclock
2349to the same value.
2350.It Cd options LIMITMEM=value
2351If there, limit the part of the first memory bank used by
2352.Nx
2353to value megabytes.
2354Default is unlimited.
2355.It Cd options NKPTADD=addvalue
2356.It Cd options NKPTADDSHIFT=shiftvalue
2357The
2358.Tn CPU
2359specific
2360.Tn MMU
2361table for the kernel is pre-allocated at kernel startup time.
2362Part of it is scaled with
2363.Va maxproc ,
2364to have enough room to hold the user program
2365.Tn MMU
2366tables; the second part is a fixed amount for the kernel itself.
2367.Pp
2368The third part accounts for the size of the file buffer cache.
2369Its size is either
2370.Dv NKPTADD
2371pages (if defined) or memory size in bytes divided by two to
2372the power of
2373.Dv NKPTADDSHIFT .
2374The default is undefined
2375.Dv NKPTADD
2376and
2377.Dv NKPTADDSHIFT=24 ,
2378allowing for 16 buffers per megabyte of main memory (while
2379a GENERIC kernel allocates about half of that).
2380When you get "can't get KPT page" panics, you should increase
2381.Dv NKPTADD
2382(if defined), or decrease
2383.Dv NKPTADDSHIFT
2384by one.
2385.It Cd options P5PPC68KBOARD
2386Add special support for Phase5 mixed 68k+PPC boards.
2387Currently, this only affects rebooting from
2388.Nx
2389and is only needed on 68040+PPC, not on
239068060+PPC; without this, affected machines will hang after
2391.Nx
2392has shut
2393down and will only restart after a keyboard reset or a power cycle.
2394.El
2395.Ss arm32-specific Options
2396.Bl -ohang
2397.It Cd options FRENCH_KBD
2398Include translation for French keyboards when using
2399.Em pccons
2400on a Shark.
2401.It Cd options FINNISH_KBD
2402Include translation for Finnish keyboards when using
2403.Em pccons
2404on a Shark.
2405.It Cd options GERMAN_KBD
2406Include translation for German keyboards when using
2407.Em pccons
2408on a Shark.
2409.It Cd options NORWEGIAN_KBD
2410Include translation for French keyboards when using
2411.Em pccons
2412on a Shark.
2413.El
2414.Ss atari-specific Options
2415.Bl -ohang
2416.It Cd options DISKLABEL_AHDI
2417Include support for AHDI (native Atari) disklabels.
2418.It Cd options DISKLABEL_NBDA
2419Include support for
2420.Nx Ns Tn /atari
2421labels.
2422If you don't set this option, it will be set automatically.
2423.Nx Ns Tn /atari
2424will not work without it.
2425.It Cd options FALCON_SCSI
2426Include support for the 5380-SCSI configuration as found on the Falcon.
2427.It Cd options RELOC_KERNEL
2428If set, the kernel will relocate itself to TT-RAM, if possible.
2429This will give you a slightly faster system.
2430.Em Beware
2431that on some TT030 systems,
2432the system will frequently dump with MMU-faults with this option enabled.
2433.It Cd options SERCONSOLE
2434Allow the modem1-port to act as the system-console.
2435A carrier should be active on modem1 during system boot to active
2436the console functionality.
2437.It Cd options TT_SCSI
2438Include support for the 5380-SCSI configuration as found on the TT030
2439and Hades.
2440.El
2441.Ss i386-specific Options
2442.Bl -ohang
2443.It Cd options CPURESET_DELAY=value
2444Specifies the time (in millisecond) to wait before doing a hardware reset
2445in the last phase of a reboot.
2446This gives the user a chance to see error messages from the shutdown
2447operations (like NFS unmounts, buffer cache flush, etc ...).
2448Setting this to 0 will disable the delay.
2449Default is 2 seconds.
2450.It Cd options VM86
2451Include support for virtual 8086 mode, used by
2452.Tn DOS
2453emulators and X servers to run BIOS code, e.g., for some VESA routines.
2454.It Cd options USER_LDT
2455Include i386-specific system calls for modifying the local descriptor table,
2456used by Windows emulators.
2457.It Cd options PAE
2458Enable
2459.Tn PAE (Physical Address Extension)
2460mode.
2461.Tn PAE
2462permits up to 36 bits physical addressing (64GB of physical memory), and
2463turns physical addresses to 64 bits entities in the memory management
2464subsystem.
2465Userland virtual address space remains at 32 bits (4GB).
2466.Tn PAE
2467mode is required to enable the
2468.Tn NX/XD (No-eXecute/eXecute Disable)
2469bit for pages, which allows marking certain ones as not being executable.
2470Any attempt to execute code from such a page will raise an exception.
2471.It Cd options REALBASEMEM=integer
2472Overrides the base memory size passed in from the boot block.
2473(Value given in kilobytes.)
2474Use this option only if the boot block reports the size incorrectly.
2475(Note that some
2476.Tn BIOS Ns es
2477put the extended
2478.Tn BIOS
2479data area at the top of base memory, and therefore report a smaller
2480base memory size to prevent programs overwriting it.
2481This is correct behavior, and you should not use the
2482.Em REALBASEMEM
2483option to access this memory).
2484.It Cd options REALEXTMEM=integer
2485Overrides the extended memory size passed in from the boot block.
2486(Value given in kilobytes.
2487Extended memory does not include the first megabyte.)
2488Use this option only if the boot block reports the size incorrectly.
2489.It Cd options FRENCH_KBD,FINNISH_KBD,GERMAN_KBD,NORWEGIAN_KBD
2490Select a non-US keyboard layout for the
2491.Em pccons
2492console driver.
2493.It Cd options CYRIX_CACHE_WORKS
2494Relevant only to the Cyrix 486DLC CPU.
2495This option is used to turn on the cache in hold-flush mode.
2496It is not turned on by default because it is known to have problems in
2497certain motherboard implementations.
2498.It Cd options CYRIX_CACHE_REALLY_WORKS
2499Relevant only to the Cyrix 486DLC CPU.
2500This option is used to turn on the cache in write-back mode.
2501It is not turned on by default because it is known to have problems in
2502certain motherboard implementations.
2503In order for this option to take effect, option
2504.Em CYRIX_CACHE_WORKS
2505must also be specified.
2506.It Cd options PCIBIOS
2507Enable support for initializing the
2508.Tn PCI
2509bus using information from the
2510.Tn BIOS .
2511See
2512.Xr pcibios 4
2513for details.
2514.It Cd options KSTACK_CHECK_DR0
2515Detect kernel stack overflow using DR0 register.
2516This option uses DR0 register exclusively so you can't use DR0 register for
2517other purpose (e.g., hardware breakpoint) if you turn this on.
2518.It Cd options MTRR
2519Include support for accessing MTRR registers from user-space.
2520See
2521.Xr i386_get_mtrr 2 .
2522.It Cd options BEEP_ONHALT
2523Make the system speaker emit several beeps when it is completely safe to
2524power down the computer after a
2525.Xr halt 8
2526command.
2527Requires
2528.Xr sysbeep 4
2529support.
2530.It Cd options BEEP_ONHALT_COUNT=times
2531Number of times to beep the speaker when
2532.Cd options BEEP_ONHALT
2533is enabled.
2534Defaults to 3.
2535.It Cd options BEEP_ONHALT_PITCH=hz
2536The tone frequency used when
2537.Cd options BEEP_ONHALT
2538option, in hertz.
2539Defaults to 1500.
2540.It Cd options BEEP_ONHALT_PERIOD=msecs
2541The duration of each beep when
2542.Cd options BEEP_ONHALT
2543is enabled, in milliseconds.
2544Defaults to 250.
2545.It Cd options MULTIBOOT
2546Makes the kernel Multiboot-compliant, allowing it to be booted through
2547a Multiboot-compliant boot manager such as GRUB.
2548See
2549.Xr multiboot 8
2550for more information.
2551.It Cd options SPLASHSCREEN
2552Display a splash screen during boot.
2553.It Cd options SPLASHSCREEN_PROGRESS
2554Display a progress bar at the splash screen during boot.
2555This option requires
2556.Em SPLASHSCREEN .
2557.El
2558.Ss isa-specific Options
2559Options specific to
2560.Xr isa 4
2561busses.
2562.Bl -ohang
2563.It Cd options PCIC_ISA_ALLOC_IOBASE=address, PCIC_ISA_ALLOC_IOSIZE=size
2564Control the section of IO bus space used for PCMCIA bus space mapping.
2565Ideally the probed defaults are satisfactory, however in practice
2566that is not always the case.
2567See
2568.Xr pcmcia 4
2569for details.
2570.It Cd options PCIC_ISA_INTR_ALLOC_MASK=mask
2571Controls the allowable interrupts that may be used for
2572.Tn PCMCIA
2573devices.
2574This mask is a logical-or of power-of-2s of allowable interrupts:
2575.Bd -literal -offset 04n
2576.Em "IRQ Val      IRQ Val      IRQ Val       IRQ Val"
2577 0  0x0001    4  0x0010    8  0x0100    12  0x1000
2578 1  0x0002    5  0x0020    9  0x0200    13  0x2000
2579 2  0x0004    6  0x0040   10  0x0400    14  0x4000
2580 3  0x0008    7  0x0080   11  0x0800    15  0x8000
2581.Ed
2582.It Cd options PCKBC_CNATTACH_SELFTEST
2583Perform a self test of the keyboard controller before attaching it as a
2584console.
2585This might be necessary on machines where we boot on cold iron, and
2586pckbc refuses to talk until we request a self test.
2587Currently only the netwinder port uses it.
2588.It Cd options PCKBD_CNATTACH_MAY_FAIL
2589If this option is set the PS/2 keyboard will not be used as the console
2590if it cannot be found during boot.
2591This allows other keyboards, like USB, to be the console keyboard.
2592.It Cd options PCKBD_LAYOUT=layout
2593Sets the default keyboard layout, see
2594.Xr pckbd 4 .
2595.El
2596.Ss m68k-specific Options
2597.Bl -ohang
2598.It Cd options FPU_EMULATE
2599Include support for MC68881/MC68882 emulator.
2600.It Cd options FPSP
2601Include support for 68040 floating point.
2602.It Cd options M68020,M68030,M68040,M68060
2603Include support for a specific
2604.Tn CPU ,
2605at least one (the one you are using) should be specified.
2606.It Cd options M060SP
2607Include software support for 68060.
2608This provides emulation of unimplemented
2609integer instructions as well as emulation of unimplemented floating point
2610instructions and data types and software support for floating point traps.
2611.El
2612.Ss powerpc-specific Options (OEA Only)
2613.Bl -ohang
2614.It Cd options PMAP_MEMLIMIT=value
2615Limit the amount of memory seen by the kernel to
2616.Ar value
2617bytes.
2618.It Cd options PTEGCOUNT=value
2619Specify the size of the page table as
2620.Ar value
2621PTE groups.
2622Normally, one PTEG is allocated per physical page frame.
2623.El
2624.Ss sparc-specific Options
2625.Bl -ohang
2626.It Cd options AUDIO_DEBUG
2627Enable simple event debugging of the logging of the
2628.Xr audio 4
2629device.
2630.It Cd options BLINK
2631Enable blinking of LED.
2632Blink rate is full cycle every N seconds for
2633N \*[Lt] then current load average.
2634See
2635.Xr getloadavg 3 .
2636.\" .It Cd options COLORFONT_CACHE
2637.\" What does this do?
2638.It Cd options COUNT_SW_LEFTOVERS
2639Count how many times the sw SCSI device has left 3, 2, 1 and 0 in the
2640sw_3_leftover, sw_2_leftover, sw_1_leftover, and sw_0_leftover
2641variables accessible from
2642.Xr ddb 4 .
2643See
2644.Xr sw 4 .
2645.It Cd options DEBUG_ALIGN
2646Adds debugging messages calls when user-requested alignment fault
2647handling happens.
2648.It Cd options DEBUG_EMUL
2649Adds debugging messages calls for emulated floating point and
2650alignment fixing operations.
2651.It Cd options DEBUG_SVR4
2652Prints registers messages calls for emulated SVR4 getcontext and
2653setcontext operations.
2654See
2655.Em options COMPAT_SVR4 .
2656.It Cd options EXTREME_DEBUG
2657Adds debugging functions callable from
2658.Xr ddb 4 .
2659The debug_pagetables, test_region and print_fe_map
2660functions print information about page tables for the SUN4M
2661platforms only.
2662.It Cd options EXTREME_EXTREME_DEBUG
2663Adds extra info to
2664.Em options EXTREME_DEBUG .
2665.It Cd options FPU_CONTEXT
2666Make
2667.Em options COMPAT_SVR4
2668getcontext and setcontext include floating point registers.
2669.It Cd options MAGMA_DEBUG
2670Adds debugging messages to the
2671.Xr magma 4
2672device.
2673.It Cd options RASTERCONS_FULLSCREEN
2674Use the entire screen for the console.
2675.It Cd options RASTERCONS_SMALLFONT
2676Use the Fixed font on the console, instead of the normal font.
2677.It Cd options SUN4
2678Support sun4 class machines.
2679.It Cd options SUN4C
2680Support sun4c class machines.
2681.It Cd options SUN4M
2682Support sun4m class machines.
2683.It Cd options SUN4_MMU3L
2684.\" XXX ???
2685Enable support for sun4 3-level MMU machines.
2686.It Cd options V9
2687Enable SPARC V9 assembler in
2688.Xr ddb 4 .
2689.El
2690.Ss sparc64-specific Options
2691.Bl -ohang
2692.It Cd options AUDIO_DEBUG
2693Enable simple event debugging of the logging of the
2694.Xr audio 4
2695device.
2696.It Cd options BLINK
2697Enable blinking of LED.
2698Blink rate is full cycle every N seconds for
2699N \*[Lt] then current load average.
2700See
2701.Xr getloadavg 3 .
2702.El
2703.Ss x68k-specific Options
2704.Bl -ohang
2705.It Cd options EXTENDED_MEMORY
2706Include support for extended memory, e.g., TS-6BE16 and 060turbo on-board.
2707.It Cd options JUPITER
2708Include support for Jupiter-X MPU accelerator
2709.It Cd options ZSCONSOLE,ZSCN_SPEED=value
2710Use the built-in serial port as the system-console.
2711Speed is specified in bps, defaults to 9600.
2712.It Cd options ITE_KERNEL_ATTR=value
2713Set the kernel message attribute for ITE.
2714Value, an integer, is a logical or of the following values:
2715.Bl -tag -width 4n -compact -offset indent
2716.It 1
2717color inversed
2718.It 2
2719underlined
2720.It 4
2721bolded
2722.El
2723.El
2724.\" The following requests should be uncommented and used where appropriate.
2725.\" .Sh FILES
2726.\" .Sh EXAMPLES
2727.Sh SEE ALSO
2728.Xr config 1 ,
2729.Xr gdb 1 ,
2730.Xr ktrace 1 ,
2731.Xr pmc 1 ,
2732.Xr quota 1 ,
2733.Xr vndcompress 1 ,
2734.Xr gettimeofday 2 ,
2735.Xr i386_get_mtrr 2 ,
2736.Xr i386_iopl 2 ,
2737.Xr msgctl 2 ,
2738.Xr msgget 2 ,
2739.Xr msgrcv 2 ,
2740.Xr msgsnd 2 ,
2741.Xr ntp_adjtime 2 ,
2742.Xr ntp_gettime 2 ,
2743.Xr reboot 2 ,
2744.Xr semctl 2 ,
2745.Xr semget 2 ,
2746.Xr semop 2 ,
2747.Xr shmat 2 ,
2748.Xr shmctl 2 ,
2749.Xr shmdt 2 ,
2750.Xr shmget 2 ,
2751.Xr sysctl 3 ,
2752.Xr apm 4 ,
2753.Xr ddb 4 ,
2754.Xr inet 4 ,
2755.Xr iso 4 ,
2756.Xr md 4 ,
2757.Xr pcibios 4 ,
2758.Xr pcmcia 4 ,
2759.Xr ppp 4 ,
2760.Xr userconf 4 ,
2761.Xr vnd 4 ,
2762.Xr wscons 4 ,
2763.Xr config 5 ,
2764.Xr edquota 8 ,
2765.Xr init 8 ,
2766.Xr mdsetimage 8 ,
2767.Xr mount_cd9660 8 ,
2768.Xr mount_fdesc 8 ,
2769.Xr mount_kernfs 8 ,
2770.Xr mount_lfs 8 ,
2771.Xr mount_mfs 8 ,
2772.Xr mount_msdos 8 ,
2773.Xr mount_nfs 8 ,
2774.Xr mount_ntfs 8 ,
2775.Xr mount_null 8 ,
2776.Xr mount_portal 8 ,
2777.Xr mount_procfs 8 ,
2778.Xr mount_udf 8 ,
2779.Xr mount_umap 8 ,
2780.Xr mount_union 8 ,
2781.Xr mrouted 8 ,
2782.Xr newfs_lfs 8 ,
2783.Xr ntpd 8 ,
2784.Xr quotaon 8 ,
2785.Xr rpc.rquotad 8 ,
2786.Xr sysctl 8 ,
2787.Xr in_getifa 9
2788.Sh HISTORY
2789The
2790.Nm
2791man page first appeared in
2792.Nx 1.3 .
2793.Sh BUGS
2794The
2795.Em EON
2796option should be a pseudo-device, and is also very fragile.
2797