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