xref: /netbsd-src/share/man/man4/options.4 (revision cac8e449158efc7261bebc8657cbb0125a2cfdde)
1.\"	$NetBSD: options.4,v 1.361 2008/03/22 12:29:01 jmmv 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 March 22, 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 NVNODE=integer
1003This option sets the size of the cache used by the name-to-inode translation
1004routines, (a.k.a. the
1005.Fn namei
1006cache, though called by many other names in the kernel source).
1007By default, this cache has
1008.Dv NPROC
1009(set as 20 + 16 * MAXUSERS) * (80 + NPROC / 8) entries.
1010A reasonable way to derive a value of
1011.Dv NVNODE ,
1012should you notice a large number of namei cache misses with a tool such as
1013.Xr systat 1 ,
1014is to examine your system's current computed value with
1015.Xr sysctl 8 ,
1016(which calls this parameter "kern.maxvnodes") and to increase this value
1017until either the namei cache hit rate improves or it is determined that
1018your system does not benefit substantially from an increase in the size of
1019the namei cache.
1020.It Cd options NAMECACHE_ENTER_REVERSE
1021Causes the namei cache to always enter a reverse mapping (vnode -\*[Gt] name)
1022as well as a normal one.
1023Normally, this is already done for directory vnodes, to speed up the getcwd
1024operation.
1025This option will cause longer hash chains in the reverse cache, and thus
1026slow down getcwd somewhat.
1027However, it does make vnode -\*[Gt] path translations possible in some cases.
1028For now, only useful if strict /proc/#/maps emulation for Linux binaries is
1029required.
1030.It Cd options EXT2FS_SYSTEM_FLAGS
1031This option changes the behavior of the APPEND and IMMUTABLE flags
1032for a file on an
1033.Em EXT2FS
1034file system.
1035Without this option, the superuser or owner of the file can
1036set and clear them.
1037With this option, only the superuser can set them, and
1038they can't be cleared if the securelevel is greater than 0.
1039See also
1040.Xr chflags 1 .
1041.It Cd options NFS_BOOT_BOOTP
1042Enable use of the BOOTP protocol (RFCs 951 and 1048) to get configuration
1043information if NFS is used to mount the root file system.
1044See
1045.Xr diskless 8
1046for details.
1047.It Cd options NFS_BOOT_DHCP
1048Same as
1049.Dq NFS_BOOT_BOOTP ,
1050but use the DHCP extensions to the
1051BOOTP protocol (RFC 1541).
1052.It Cd options NFS_BOOT_BOOTP_REQFILE
1053Specifies the string sent in the bp_file field of the BOOTP / DHCP
1054request packet.
1055.It Cd options NFS_BOOT_BOOTPARAM
1056Enable use of the BOOTPARAM protocol, consisting of RARP and
1057BOOTPARAM RPC, to get configuration information if NFS
1058is used to mount the root file system.
1059See
1060.Xr diskless 8
1061for details.
1062.It Cd options NFS_BOOT_RWSIZE=value
1063Set the initial NFS read and write sizes for diskless-boot requests.
1064The normal default is 8Kbytes.
1065This option provides a way to lower the value (e.g., to 1024 bytes)
1066as a workaround for buggy network interface cards or boot PROMs.
1067Once booted, the read and write request sizes can be increased by
1068remounting the file system.
1069See
1070.Xr mount_nfs 8
1071for details.
1072.It Cd options NFS_V2_ONLY
1073Reduce the size of the NFS client code by omitting code that's only required
1074for NFSv3 and NQNFS support, leaving only that code required to use NFSv2
1075servers.
1076.It Cd options SOFTDEP
1077Enable kernel support for soft-dependencies in FFS file systems.
1078Softdep improves write performance by aggregating and properly
1079ordering disk metadata writes, achieving near-asynchronous write
1080performance while maintaining the file system consistency of
1081synchronous writes.
1082Soft-dependencies are enabled on a per-mount basis.
1083See
1084.Xr mount 8
1085for details.
1086.It Cd options UFS_DIRHASH
1087Increase lookup performance by maintaining in-core hash tables
1088for large directories.
1089.El
1090.Ss Buffer queue strategy options
1091The following options enable alternative buffer queue strategies.
1092.Bl -ohang
1093.It Cd options BUFQ_READPRIO
1094Enable experimental buffer queue strategy for disk I/O.
1095In the default strategy, outstanding disk requests are ordered by
1096sector number and sent to the disk, regardless of whether the
1097operation is a read or write; this option gives priority to issuing
1098read requests over write requests.
1099Although requests may therefore be issued out of sector-order, causing
1100more seeks and thus lower overall throughput, interactive system
1101responsiveness under heavy disk I/O load may be improved, as processes
1102blocking on disk reads are serviced sooner (file writes typically
1103don't cause applications to block).
1104The performance effect varies greatly depending on the hardware, drive
1105firmware, file system configuration, workload, and desired performance
1106trade-off.
1107Systems using drive write-cache (most modern IDE disks, by default)
1108are unlikely to benefit and may well suffer; such disks acknowledge
1109writes very quickly, and optimize them internally according to
1110physical layout.
1111Giving these disks as many requests to work with as possible (the
1112standard strategy) will typically produce the best results, especially
1113if the drive has a large cache; the drive will silently complete
1114writes from cache as it seeks for reads.
1115Disks that support a large number of concurrent tagged requests (SCSI
1116disks and many hardware RAID controllers) expose this internal
1117scheduling with tagged responses, and don't block for reads; such
1118disks may not see a noticeable difference with either strategy.
1119However, if IDE disks are run with write-cache disabled for safety,
1120writes are not acknowledged until actually completed, and only one
1121request can be outstanding; a large number of small writes in one
1122locality can keep the disk busy, starving reads elsewhere on the disk.
1123Such systems are likely to see the most benefit from this option.
1124Finally, the performance interaction of this option with ffs soft
1125dependencies can be subtle, as that mechanism can drastically alter
1126the workload for file system metadata writes.
1127.It Cd options BUFQ_PRIOCSCAN
1128Enable another buffer queue strategy for disk I/O, per-priority cyclical scan.
1129.It Cd options NEW_BUFQ_STRATEGY
1130Synonym of
1131.Em BUFQ_READPRIO .
1132.El
1133.Ss Miscellaneous Options
1134.Bl -ohang
1135.It Cd options LKM
1136Enable loadable kernel modules.
1137See
1138.Xr lkm 4
1139for details.
1140.Em NOTE :
1141not available on all architectures.
1142.It Cd options MEMORY_DISK_DYNAMIC
1143This option makes the
1144.Xr md 4
1145.Tn RAM
1146disk size dynamically sized.
1147It is incompatible with
1148.Xr mdsetimage 8 .
1149.It Cd options MEMORY_DISK_HOOKS
1150This option allows for some machine dependent functions to be called when
1151the
1152.Xr md 4
1153.Tn RAM
1154disk driver is configured.
1155This can result in automatically loading a
1156.Tn RAM
1157disk from floppy on open (among other things).
1158.It Cd options MEMORY_DISK_IS_ROOT
1159Forces the
1160.Xr md 4
1161.Tn RAM
1162disk to be the root device.
1163This can only be overridden when
1164the kernel is booted in the 'ask-for-root' mode.
1165.It Cd options MEMORY_DISK_ROOT_SIZE=integer
1166Allocates the given number of 512 byte blocks as memory for the
1167.Xr md 4
1168.Tn RAM
1169disk, to be populated with
1170.Xr mdsetimage 8 .
1171.It Cd options MEMORY_DISK_SERVER=0
1172Do not include the interface to a userland memory disk server process.
1173Per default, this option is set to 1, including the support code.
1174Useful for install media kernels.
1175.It Cd options MODULAR
1176Enables the new framework for kernel modules, which will eventually
1177replace LKMs.
1178This adds an in-kernel linker and loader, and requires userland support
1179to be useful.
1180See the
1181.Sy MKMODULAR
1182variable in
1183.Xr mk.conf 5
1184for more details.
1185.It Cd options VND_COMPRESSION
1186Enables the
1187.Xr vnd 4
1188driver to also handle compressed images.
1189See
1190.Xr vndcompress 1 ,
1191.Xr vnd 4
1192and
1193.Xr vnconfig 8
1194for more information.
1195.It Cd options TFTPROOT
1196Download the root memory disk through TFTP at root mount time.
1197This enables the use of a root
1198.Tn RAM
1199disk without requiring it to be embedded in the kernel using
1200.Xr mdsetimage 8 .
1201The
1202.Tn RAM
1203disk name is obtained using DHCP's filename parameter.
1204This option requires
1205.Em MEMORY_DISK_HOOKS ,
1206.Em MEMORY_DISK_DYNAMIC ,
1207and
1208.Em MEMORY_DISK_IS_ROOT .
1209It is incompatible with
1210.Em MEMORY_DISK_ROOT_SIZE .
1211.It Cd options MALLOC_NOINLINE
1212Time critical fixed size memory allocation is performed with
1213.Fn MALLOC
1214and
1215.Fn FREE .
1216Normally these expand to inline code, but with
1217.Em MALLOC_NOINLINE
1218these call the normal
1219.Fn malloc
1220and
1221.Fn free
1222functions.
1223Useful for install media kernels, small memory systems and embedded systems.
1224.It Cd options HZ=integer
1225On ports that support it, set the system clock frequency (see
1226.Xr hz 9 )
1227to the supplied value.
1228Handle with care.
1229.It Cd options NTP
1230Turns on in-kernel precision timekeeping support used by software
1231implementing
1232.Em NTP
1233(Network Time Protocol, RFC 1305).
1234The
1235.Em NTP
1236option adds an in-kernel Phase-Locked Loop (PLL) for normal
1237.Em NTP
1238operation, and a Frequency-Locked Loop (FLL) for intermittently-connected
1239operation.
1240.Xr ntpd 8
1241will employ a user-level PLL when kernel support is unavailable,
1242but the in-kernel version has lower latency and more precision, and
1243so typically keeps much better time.
1244The interface to the kernel
1245.Em NTP
1246support is provided by the
1247.Xr ntp_adjtime 2
1248and
1249.Xr ntp_gettime 2
1250system calls, which are intended for use by
1251.Xr ntpd 8
1252and are enabled by the option.
1253On systems with sub-microsecond resolution timers, or where (HZ / 100000)
1254is not an integer, the
1255.Em NTP
1256option also enables extended-precision arithmetic to keep track of
1257fractional clock ticks at NTP time-format precision.
1258.It Cd options PPS_SYNC
1259This option enables a kernel serial line discipline for receiving time
1260phase signals from an external reference clock such as a radio clock.
1261(The
1262.Em NTP
1263option (which see) must be on if the
1264.Em PPS_SYNC
1265option is used.)
1266Some reference clocks generate a Pulse Per Second (PPS) signal in
1267phase with their time source.
1268The
1269.Em PPS
1270line discipline receives this signal on either the data leads
1271or the DCD control lead of a serial port.
1272.Em NTP
1273uses the PPS signal to discipline the local clock oscillator to a high
1274degree of precision (typically less than 50 microseconds in time and
12750.1 ppm in accuracy).
1276.Em PPS
1277can also generate a serial output pulse when the system receives a PPS
1278interrupt.
1279This can be used to measure the system interrupt latency and thus calibrate
1280.Em NTP
1281to account for it.
1282Using
1283.Em PPS
1284usually requires a
1285gadget box
1286to convert from TTL to RS-232 signal levels.
1287The gadget box and PPS are described in more detail in the HTML documentation
1288for
1289.Xr ntpd 8
1290in
1291.Pa /usr/share/doc/html/ntp .
1292.It Cd options NO_TSC_TIME
1293Don't use TSC microtime, even if available (i386 only).
1294Improves time behavior under VMware.
1295.It Cd options SETUIDSCRIPTS
1296Allows scripts with the setuid bit set to execute as the effective
1297user rather than the real user, just like binary executables.
1298.Pp
1299.Em NOTE :
1300Using this option will also enable
1301.Em options FDSCRIPTS
1302.It Cd options FDSCRIPTS
1303Allows execution of scripts with the execute bit set, but not the
1304read bit, by opening the file and passing the file descriptor to
1305the shell, rather than the filename.
1306.Pp
1307.Em NOTE :
1308Execute only (non-readable) scripts will have
1309.Va argv[0]
1310set to
1311.Pa /dev/fd/* .
1312What this option allows as far as security is
1313concerned, is the ability to safely ensure that the correct script
1314is run by the interpreter, as it is passed as an already open file.
1315.It Cd options PUCCN
1316Enables treating serial ports found on PCI boards
1317.Xr puc 4
1318as potential console devices.
1319The method for choosing such a console device is port dependent.
1320.It Cd options RTC_OFFSET=integer
1321The kernel (and typically the hardware battery backed-up clock on
1322those machines that have one) keeps time in
1323.Em UTC
1324(Universal Coordinated Time, once known as
1325.Em GMT ,
1326or Greenwich Mean Time)
1327and not in the time of the local time zone.
1328The
1329.Em RTC_OFFSET
1330option is used on some ports (such as the i386) to tell the kernel
1331that the hardware clock is offset from
1332.Em UTC
1333by the specified number of minutes.
1334This is typically used when a machine boots several operating
1335systems and one of them wants the hardware clock to run in the
1336local time zone and not in
1337.Em UTC ,
1338e.g.
1339.Em RTC_OFFSET=300
1340means
1341the hardware clock is set to US Eastern Time (300 minutes behind
1342.Em UTC ) ,
1343and not
1344.Em UTC .
1345(Note:
1346.Em RTC_OFFSET
1347is used to initialize a kernel variable named
1348.Va rtc_offset
1349which is the source actually used to determine the clock offset, and
1350which may be accessed via the kern.rtc_offset sysctl variable.
1351See
1352.Xr sysctl 8
1353and
1354.Xr sysctl 3
1355for details.
1356Since the kernel clock is initialized from the hardware clock very
1357early in the boot process, it is not possible to meaningfully change
1358.Va rtc_offset
1359in system initialization scripts.
1360Changing this value currently may only be done at kernel compile
1361time or by patching the kernel and rebooting).
1362.Pp
1363.Em NOTE :
1364Unfortunately, in many cases where the hardware clock
1365is kept in local time, it is adjusted for Daylight Savings
1366Time; this means that attempting to use
1367.Em RTC_OFFSET
1368to let
1369.Nx
1370coexist with such an operating system, like Windows,
1371would necessitate changing
1372.Em RTC_OFFSET
1373twice a year.
1374As such, this solution is imperfect.
1375.It Cd options KMEMSTATS
1376The kernel memory allocator,
1377.Xr malloc 9 ,
1378will keep statistics on its performance if this option is enabled.
1379Unfortunately, this option therefore essentially disables the
1380.Fn MALLOC
1381and
1382.Fn FREE
1383forms of the memory allocator, which are used to enhance the performance
1384of certain critical sections of code in the kernel.
1385This option therefore can lead to a significant decrease in the
1386performance of certain code in the kernel if enabled.
1387Examples of such code include the
1388.Fn namei
1389routine, the
1390.Xr ccd 4
1391driver,
1392and much of the networking code.
1393.It Cd options MAXUPRC=integer
1394Sets the soft
1395.Dv RLIMIT_NPROC
1396resource limit, which specifies the maximum number of simultaneous
1397processes a user is permitted to run, for process 0;
1398this value is inherited by its child processes.
1399It defaults to
1400.Em CHILD_MAX ,
1401which is currently defined to be 160.
1402Setting
1403.Em MAXUPRC
1404to a value less than
1405.Em CHILD_MAX
1406is not permitted, as this would result in a violation of the semantics of
1407.St -p1003.1-90 .
1408.It Cd options NOFILE=integer
1409Sets the soft
1410.Dv RLIMIT_NOFILE
1411resource limit, which specifies the maximum number of open
1412file descriptors for each process;
1413this value is inherited by its child processes.
1414It defaults to
1415.Em OPEN_MAX ,
1416which is currently defined to be 64.
1417.It Cd options MAXFILES=integer
1418Sets the default value of the
1419.Em kern.maxfiles
1420sysctl variable, which indicates the maximum number of files that may
1421be open in the system.
1422.It Cd options DEFCORENAME=string
1423Sets the default value of the
1424.Em kern.defcorename
1425sysctl variable, otherwise it is set to
1426.Nm %n.core .
1427See
1428.Xr sysctl 8
1429and
1430.Xr sysctl 3
1431for details.
1432.It Cd options RASOPS_CLIPPING
1433Enables clipping within the
1434.Nm rasops
1435raster-console output system.
1436.Em NOTE :
1437only available on architectures that use
1438.Nm rasops
1439for console output.
1440.It Cd options RASOPS_SMALL
1441Removes optimized character writing code from the
1442.Nm rasops
1443raster-console output system.
1444.Em NOTE :
1445only available on architectures that use
1446.Nm rasops
1447for console output.
1448.It Cd options INCLUDE_CONFIG_FILE
1449Embeds the kernel config file used to define the kernel in the kernel
1450binary itself.
1451The embedded data also includes any files directly included by the config
1452file itself, e.g.
1453.Pa GENERIC.local
1454or
1455.Pa std.$MACHINE .
1456The embedded config file can be extracted from the resulting kernel with
1457.Xr config 1
1458.Fl x ,
1459or by the following command:
1460.Bd -literal -offset indent
1461strings netbsd | sed -n 's/^_CFG_//p' | unvis
1462.Ed
1463.It Cd options INCLUDE_JUST_CONFIG
1464Similar to the above option, but includes just the actual config file,
1465not any included files.
1466.It Cd options PIPE_SOCKETPAIR
1467Use slower, but smaller socketpair(2)-based pipe implementation instead
1468of default faster, but bigger one.
1469Primarily useful for installation kernels.
1470.It Cd options USERCONF
1471Compiles in the in-kernel device configuration manager.
1472See
1473.Xr userconf 4
1474for details.
1475.It Cd options PERFCTRS
1476Compiles in kernel support for CPU performance-monitoring counters.
1477See
1478.Xr pmc 1
1479for details.
1480.Em NOTE :
1481not available on all architectures.
1482.It Cd options SYSCALL_STATS
1483Count the number of times each system call number is called.
1484The values can be read through the sysctl interface and displayed using
1485.Xr systat 1 .
1486.Em NOTE :
1487not yet available on all architectures.
1488.It Cd options SYSCALL_TIMES
1489Count the time spent (using
1490.Fn cpu_counter32 )
1491in each system call.
1492.Em NOTE :
1493Using this option will also enable
1494.Cd options SYSCALL_STATS .
1495.It Cd options SYSCALL_TIMES_HASCOUNTER
1496Force use of
1497.Fn cpu_counter32
1498even if
1499.Fn cpu_hascounter
1500reports false.
1501Useful for systems where the cycle counter doesn't run at a constant rate
1502(e.g. Soekris boxes).
1503.It Cd options XSERVER
1504Compiles in kernel support for
1505.Tn X11
1506on architectures that still use (or can use) the legacy
1507.Em pccons
1508console drivers rather than
1509.Xr wscons 4 .
1510These include bebox, i386, shark.
1511.It Cd options XSERVER_DDB
1512A supplement to XSERVER that adds support for entering
1513.Xr ddb 4
1514while in
1515.Tn X11 .
1516.It Cd options FILEASSOC
1517Support for
1518.Xr fileassoc 9 .
1519.It Cd options FILEASSOC_NHOOKS=integer
1520Number of storage slots per file for
1521.Xr fileassoc 9 .
1522Default is 4.
1523.El
1524.Ss Networking Options
1525.Bl -ohang
1526.It Cd options GATEWAY
1527Enables
1528.Em IPFORWARDING
1529(which see)
1530and (on most ports) increases the size of
1531.Em NMBCLUSTERS
1532(which see).
1533In general,
1534.Em GATEWAY
1535is used to indicate that a system should act as a router, and
1536.Em IPFORWARDING
1537is not invoked directly.
1538(Note that
1539.Em GATEWAY
1540has no impact on protocols other than
1541.Tn IP ,
1542such as
1543.Tn CLNP
1544or
1545.Tn XNS ) .
1546.Em GATEWAY
1547option also compiles IPv4 and IPv6 fast forwarding code into the kernel.
1548.It Cd options ICMPPRINTFS
1549The
1550.Em ICMPPRINTFS
1551option will enable debugging information to be printed about
1552the
1553.Xr icmp 4
1554protocol.
1555.It Cd options IPFORWARDING=value
1556If
1557.Em value
1558is 1 this enables IP routing behavior.
1559If
1560.Em value
1561is 0 (the default), it disables it.
1562The
1563.Em GATEWAY
1564option sets this to 1 automatically.
1565With this option enabled, the machine will forward IP datagrams destined
1566for other machines between its interfaces.
1567Note that even without this option, the kernel will
1568still forward some packets (such as source routed packets) -- removing
1569.Em GATEWAY
1570and
1571.Em IPFORWARDING
1572is insufficient to stop all routing through a bastion host on a
1573firewall -- source routing is controlled independently.
1574To turn off source routing, use
1575.Em options IPFORWSRCRT=0
1576(which see).
1577Note that IP forwarding may be turned on and off independently of the
1578setting of the
1579.Em IPFORWARDING
1580option through the use of the
1581.Em net.inet.ip.forwarding
1582sysctl variable.
1583If
1584.Em net.inet.ip.forwarding
1585is 1, IP forwarding is on.
1586See
1587.Xr sysctl 8
1588and
1589.Xr sysctl 3
1590for details.
1591.It Cd options IPFORWSRCRT=value
1592If
1593.Em value
1594is set to zero, source routing of IP datagrams is turned off.
1595If
1596.Em value
1597is set to one (the default) or the option is absent, source routed IP
1598datagrams are forwarded by the machine.
1599Note that source routing of IP packets may be turned on and off
1600independently of the setting of the
1601.Em IPFORWSRCRT
1602option through the use of the
1603.Em net.inet.ip.forwsrcrt
1604sysctl variable.
1605If
1606.Em net.inet.ip.forwsrcrt
1607is 1, forwarding of source routed IP datagrams is on.
1608See
1609.Xr sysctl 8
1610and
1611.Xr sysctl 3
1612for details.
1613.It Cd options IFA_STATS
1614Tells the kernel to maintain per-address statistics on bytes sent
1615and received over (currently) Internet and AppleTalk addresses.
1616.\"This can be a fairly expensive operation, so you probably want to
1617.\"keep this disabled.
1618The option is not recommended as it degrades system stability.
1619.It Cd options IFQ_MAXLEN=value
1620Increases the allowed size of the network interface packet queues.
1621The default queue size is 50 packets, and you do not normally need
1622to increase it.
1623.It Cd options IPSELSRC
1624Includes support for source-address selection policies.
1625See
1626.Xr in_getifa 9 .
1627.It Cd options MROUTING
1628Includes support for IP multicast routers.
1629You certainly want
1630.Em INET
1631with this.
1632Multicast routing is controlled by the
1633.Xr mrouted 8
1634daemon.
1635See also option
1636.Cd PIM .
1637.It Cd options PIM
1638Includes support for Protocol Independent Multicast (PIM) routing.
1639You need
1640.Em MROUTING
1641and
1642.Em INET
1643with this.
1644Software using this can be found e.g. in
1645.Pa pkgsrc/net/xorp .
1646.It Cd options INET
1647Includes support for the
1648.Tn TCP/IP
1649protocol stack.
1650You almost certainly want this.
1651See
1652.Xr inet 4
1653for details.
1654.It Cd options INET6
1655Includes support for the
1656.Tn IPv6
1657protocol stack.
1658See
1659.Xr inet6 4
1660for details.
1661Unlike
1662.Em INET ,
1663.Em INET6
1664enables multicast routing code as well.
1665This option requires
1666.Em INET
1667at this moment, but it should not.
1668.It Cd options ND6_DEBUG
1669The option sets the default value of net.inet6.icmp6.nd6_debug to 1,
1670for debugging IPv6 neighbor discovery protocol handling.
1671See
1672.Xr sysctl 3
1673for details.
1674.It Cd options IPSEC
1675Includes support for the
1676.Tn IPsec
1677protocol.
1678See
1679.Xr ipsec 4
1680for details.
1681.It Cd options IPSEC_DEBUG
1682Enables debugging code in
1683.Tn IPsec
1684stack.
1685See
1686.Xr ipsec 4
1687for details.
1688.It Cd options IPSEC_ESP
1689Includes support for
1690.Tn IPsec
1691.Tn ESP
1692protocol.
1693See
1694.Xr ipsec 4
1695for details.
1696.It Cd options IPSEC_NAT_T
1697Includes support for
1698.Tn IPsec
1699Network Address Translator traversal (NAT-T), as described in RFCs 3947
1700and 3948.
1701This feature might be patent-encumbered in some countries.
1702.It Cd options ALTQ
1703Enabled ALTQ (Alternate Queueing).
1704For simple rate-limiting, use
1705.Xr tbrconfig 8
1706to set up the interface transmission rate.
1707To use queueing disciplines, their appropriate kernel options should also
1708be defined (documented below).
1709Queueing disciplines are managed by
1710.Xr altqd 8 .
1711See
1712.Xr altq 9
1713for details.
1714.It Cd options ALTQ_HFSC
1715Include support for ALTQ-implemented HFSC (Hierarchical Fair Service Curve)
1716module.
1717HFSC supports both link-sharing and guaranteed real-time services.
1718HFSC employs a service curve based QoS model, and its unique feature
1719is an ability to decouple delay and bandwidth allocation.
1720Requires
1721.Em ALTQ_RED
1722to use the RED queueing discipline on HFSC classes, or
1723.Em ALTQ_RIO
1724to use the RIO queueing discipline on HFSC classes.
1725This option assumes
1726.Em ALTQ .
1727.It Cd options ALTQ_PRIQ
1728Include support for ALTQ-implemented PRIQ (Priority Queueing).
1729PRIQ implements a simple priority-based queueing discipline.
1730A higher priority class is always served first.
1731Requires
1732.Em ALTQ_RED
1733to use the RED queueing discipline on HFSC classes, or
1734.Em ALTQ_RIO
1735to use the RIO queueing discipline on HFSC classes.
1736This option assumes
1737.Em ALTQ .
1738.It Cd options ALTQ_WFQ
1739Include support for ALTQ-implemented WFQ (Weighted Fair Queueing).
1740WFQ implements a weighted-round robin scheduler for a set of queues.
1741A weight can be assigned to each queue to give a different proportion
1742of the link capacity.
1743A hash function is used to map a flow to one of a set of queues.
1744This option assumes
1745.Em ALTQ .
1746.It Cd options ALTQ_FIFOQ
1747Include support for ALTQ-implemented FIFO queueing.
1748FIFOQ is a simple drop-tail FIFO (First In, First Out) queueing discipline.
1749This option assumes
1750.Em ALTQ .
1751.It Cd options ALTQ_RIO
1752Include support for ALTQ-implemented RIO (RED with In/Out).
1753The original RIO has 2 sets of RED parameters; one for in-profile
1754packets and the other for out-of-profile packets.
1755At the ingress of the network, profile meters tag packets as IN or
1756OUT based on contracted profiles for customers.
1757Inside the network, IN packets receive preferential treatment by
1758the RIO dropper.
1759ALTQ/RIO has 3 drop precedence levels defined for the Assured Forwarding
1760PHB of DiffServ (RFC 2597).
1761This option assumes
1762.Em ALTQ .
1763.It Cd options ALTQ_BLUE
1764Include support for ALTQ-implemented Blue buffer management.
1765Blue is another active buffer management mechanism.
1766This option assumes
1767.Em ALTQ .
1768.It Cd options ALTQ_FLOWVALVE
1769Include support for ALTQ-implemented Flowvalve.
1770Flowvalve is a simple implementation of a RED penalty box that identifies
1771and punishes misbehaving flows.
1772This option requires
1773.Em ALTQ_RED
1774and assumes
1775.Em ALTQ .
1776.It Cd options ALTQ_CDNR
1777Include support for ALTQ-implemented CDNR (diffserv traffic conditioner)
1778packet marking/manipulation.
1779Traffic conditioners are components to meter, mark, or drop incoming
1780packets according to some rules.
1781As opposed to queueing disciplines, traffic conditioners handle incoming
1782packets at an input interface.
1783This option assumes
1784.Em ALTQ .
1785.It Cd options ALTQ_NOPCC
1786Disables use of processor cycle counter to measure time in ALTQ.
1787This option should be defined for a non-Pentium i386 CPU which does not
1788have TSC, SMP (per-CPU counters are not in sync), or power management
1789which affects processor cycle counter.
1790This option assumes
1791.Em ALTQ .
1792.It Cd options ALTQ_IPSEC
1793Include support for IPsec in IPv4 ALTQ.
1794This option assumes
1795.Em ALTQ .
1796.It Cd options ALTQ_JOBS
1797Include support for ALTQ-implemented JoBS (Joint Buffer Management
1798and Scheduling).
1799This option assumes
1800.Em ALTQ .
1801.It Cd options ALTQ_AFMAP
1802Include support for an undocumented ALTQ feature that is used to map an IP
1803flow to an ATM VC (Virtual Circuit).
1804This option assumes
1805.Em ALTQ .
1806.It Cd options ALTQ_LOCALQ
1807Include support for ALTQ-implemented local queues.
1808Its practical use is undefined.
1809Assumes
1810.Em ALTQ .
1811.It Cd options SUBNETSARELOCAL
1812Sets default value for net.inet.ip.subnetsarelocal variable, which
1813controls whether non-directly-connected subnets of connected networks
1814are considered "local" for purposes of choosing the MSS for a TCP
1815connection.
1816This is mostly present for historic reasons and completely irrelevant if
1817you enable Path MTU discovery.
1818.It Cd options HOSTZEROBROADCAST
1819Sets default value for net.inet.ip.hostzerobroadcast variable, which
1820controls whether the zeroth host address of each connected subnet is
1821also considered a broadcast address.
1822Default value is "1", for compatibility with old systems; if this is
1823set to zero on all hosts on a subnet, you should be able to fit an extra
1824host per subnet on the
1825".0" address.
1826.It Cd options MCLSHIFT=value
1827This option is the base-2 logarithm of the size of mbuf clusters.
1828The
1829.Bx
1830networking stack keeps network packets in a linked
1831list, or chain, of kernel buffer objects called mbufs.
1832The system provides larger mbuf clusters as an optimization for
1833large packets, instead of using long chains for large packets.
1834The mbuf cluster size,
1835or
1836.Em MCLBYTES ,
1837must be a power of two, and is computed as two raised to the power
1838.Em MCLSHIFT .
1839On systems with Ethernet network adapters,
1840.Em MCLSHIFT
1841is often set to 11, giving 2048-byte mbuf clusters, large enough to
1842hold a 1500-byte
1843.Tn Ethernet
1844frame in a single cluster.
1845Systems with network interfaces supporting larger frame sizes like
1846.Tn ATM ,
1847.Tn FDDI ,
1848or
1849.Tn HIPPI
1850may perform better with
1851.Em MCLSHIFT
1852set to 12 or 13, giving mbuf cluster sizes of 4096 and 8192 bytes,
1853respectively.
1854.It Cd options NS
1855Include support for the
1856.Tn Xerox
1857.Tn XNS
1858protocol stack.
1859See
1860.Xr ns 4
1861for details.
1862.It Cd options ISO,TPIP
1863Include support for the ubiquitous
1864.Tn OSI
1865protocol stack.
1866See
1867.Xr iso 4
1868for details.
1869This option assumes
1870.Em INET .
1871.It Cd options EON
1872Include support for tunneling
1873.Tn OSI
1874protocols over
1875.Tn IP .
1876Known to be broken, or at least very fragile, and undocumented.
1877.It Cd options NETATALK
1878Include support for the
1879.Tn AppleTalk
1880protocol stack.
1881The kernel provides provision for the
1882.Em Datagram Delivery Protocol
1883(DDP), providing SOCK_DGRAM support and
1884.Tn AppleTalk
1885routing.
1886This stack is used by the
1887.Em NETATALK
1888package, which adds support for
1889.Tn AppleTalk
1890server services via user libraries and applications.
1891.It Cd options BLUETOOTH
1892Include support for the
1893.Tn Bluetooth
1894protocol stack.
1895See
1896.Xr bluetooth 4
1897for details.
1898.It Cd options IPNOPRIVPORTS
1899Normally, only root can bind a socket descriptor to a so-called
1900.Dq privileged
1901.Tn TCP
1902port, that is, a port number in the range 0-1023.
1903This option eliminates those checks from the kernel.
1904This can be useful if there is a desire to allow daemons without
1905privileges to bind those ports, e.g., on firewalls.
1906The security tradeoffs in doing this are subtle.
1907This option should only be used by experts.
1908.It Cd options TCP_COMPAT_42
1909.Tn TCP
1910bug compatibility with
1911.Bx 4.2 .
1912In
1913.Bx 4.2 ,
1914.Tn TCP
1915sequence numbers were 32-bit signed values.
1916Modern implementations of TCP use unsigned values.
1917This option clamps the initial sequence number to start in
1918the range 2^31 rather than the full unsigned range of 2^32.
1919Also, under
1920.Bx 4.2 ,
1921keepalive packets must contain at least one byte or else
1922the remote end would not respond.
1923.It Cd options TCP_DEBUG
1924Record the last
1925.Em TCP_NDEBUG
1926TCP packets with SO_DEBUG set, and decode to the console if
1927.Em tcpconsdebug
1928is set.
1929.It Cd options TCP_NDEBUG
1930Number of packets to record for
1931.Em TCP_DEBUG .
1932Defaults to 100.
1933.It Cd options TCP_SENDSPACE=value
1934.It Cd options TCP_RECVSPACE=value
1935These options set the max TCP window size to other sizes than the default.
1936The TCP window sizes can be altered via
1937.Xr sysctl 8
1938as well.
1939.It Cd options TCP_INIT_WIN=value
1940This option sets the initial TCP window size for non-local connections,
1941which is used when the transmission starts.
1942The default size is 1, but if the machine should act more aggressively,
1943the initial size can be set to some other value.
1944The initial TCP window size can be set via
1945.Xr sysctl 8
1946as well.
1947.It Cd options PFIL_HOOKS
1948This option turns on the packet filter interface hooks.
1949See
1950.Xr pfil 9
1951for details.
1952This option assumes
1953.Em INET .
1954.It Cd options IPFILTER_LOG
1955This option, in conjunction with
1956.Em pseudo-device ipfilter ,
1957enables logging of IP packets using ip-filter.
1958.It Cd options IPFILTER_DEFAULT_BLOCK
1959This option sets the default policy of ip-filter.
1960If it is set, ip-filter will block packets by default.
1961.It Cd options BRIDGE_IPF
1962This option causes
1963.Em bridge
1964devices to use the IP and/or IPv6 filtering hooks, forming
1965a link-layer filter that uses protocol-layer rules.
1966This option assumes the presence of
1967.Em pseudo-device ipfilter .
1968.It Cd options MBUFTRACE
1969This option can help track down mbuf leaks.
1970When enabled, mbufs are tagged with the devices and protocols using them,
1971which slightly decreases network performance.
1972This additional information can be viewed with
1973.Xr netstat 1 :
1974.Dl Ic netstat Fl mssv
1975Not all devices or protocols support this option.
1976.El
1977.Ss Sysctl Related Options
1978.Bl -ohang
1979.It Cd options SYSCTL_DISALLOW_CREATE
1980Disallows the creation or deletion of nodes from the sysctl tree, as
1981well as the assigning of descriptions to nodes that lack them, by any
1982process.
1983These operations are still available to kernel sub-systems, including
1984loadable kernel modules.
1985.It Cd options SYSCTL_DISALLOW_KWRITE
1986Prevents processes from adding nodes to the sysctl tree that make
1987existing kernel memory areas writable.
1988Sections of kernel memory can still be read and new nodes that own
1989their own data may still be writable.
1990.It Cd options SYSCTL_DEBUG_SETUP
1991Causes the SYSCTL_SETUP routines to print a brief message when they
1992are invoked.
1993This is merely meant as an aid in determining the order in which
1994sections of the tree are created.
1995.It Cd options SYSCTL_DEBUG_CREATE
1996Prints a message each time
1997.Fn sysctl_create ,
1998the function that adds nodes to the tree, is called.
1999.It Cd options SYSCTL_INCLUDE_DESCR
2000Causes the kernel to include short, human readable descriptions for
2001nodes in the sysctl tree.
2002The descriptions can be retrieved programmatically (see
2003.Xr sysctl 3 ) ,
2004or by the sysctl binary itself (see
2005.Xr sysctl 8 ) .
2006The descriptions are meant to give an indication of the purpose and/or
2007effects of a given node's value, not replace the documentation for the
2008given subsystem as a whole.
2009.El
2010.Ss System V IPC Options
2011.Bl -ohang
2012.It Cd options SYSVMSG
2013Includes support for
2014.At V
2015style message queues.
2016See
2017.Xr msgctl 2 ,
2018.Xr msgget 2 ,
2019.Xr msgrcv 2 ,
2020.Xr msgsnd 2 .
2021.It Cd options SYSVSEM
2022Includes support for
2023.At V
2024style semaphores.
2025See
2026.Xr semctl 2 ,
2027.Xr semget 2 ,
2028.Xr semop 2 .
2029.It Cd options SEMMNI=value
2030Sets the number of
2031.At V
2032style semaphore identifiers.
2033The GENERIC config file for your port will have the default.
2034.It Cd options SEMMNS=value
2035Sets the number of
2036.At V
2037style semaphores in the system.
2038The GENERIC config file for your port will have the default.
2039.It Cd options SEMUME=value
2040Sets the maximum number of undo entries per process for
2041.At V
2042style semaphores.
2043The GENERIC config file for your port will have the default.
2044.It Cd options SEMMNU=value
2045Sets the number of undo structures in the system for
2046.At V
2047style semaphores.
2048The GENERIC config file for your port will have the default.
2049.It Cd options SYSVSHM
2050Includes support for
2051.At V
2052style shared memory.
2053See
2054.Xr shmat 2 ,
2055.Xr shmctl 2 ,
2056.Xr shmdt 2 ,
2057.Xr shmget 2 .
2058.It Cd options SHMMAXPGS=value
2059Sets the maximum number of
2060.At V
2061style shared memory pages that are available through the
2062.Xr shmget 2
2063system call.
2064Default value is 1024 on most ports.
2065See
2066.Pa /usr/include/machine/vmparam.h
2067for the default.
2068.El
2069.Ss VM Related Options
2070.Bl -ohang
2071.It Cd options NMBCLUSTERS=value
2072The number of mbuf clusters the kernel supports.
2073Mbuf clusters are MCLBYTES in size (usually 2k).
2074This is used to compute the size of the kernel VM map
2075.Em mb_map ,
2076which maps mbuf clusters.
2077Default on most ports is 1024 (2048 with
2078.Dq options GATEWAY
2079).
2080See
2081.Pa /usr/include/machine/param.h
2082for exact default information.
2083Increase this value if you get
2084.Dq mclpool limit reached
2085messages.
2086.It Cd options NKMEMPAGES=value
2087.It Cd options NKMEMPAGES_MIN=value
2088.It Cd options NKMEMPAGES_MAX=value
2089Size of kernel VM map
2090.Em kmem_map ,
2091in PAGE_SIZE-sized chunks (the VM page size; this value may be read
2092from the
2093.Xr sysctl 8
2094variable
2095.Em hw.pagesize
2096).
2097This VM map is used to map the kernel malloc arena.
2098The kernel attempts to auto-size this map based on the amount of
2099physical memory in the system.
2100Platform-specific code may place bounds on this computed size,
2101which may be viewed with the
2102.Xr sysctl 8
2103variable
2104.Em vm.nkmempages .
2105See
2106.Pa /usr/include/machine/param.h
2107for the default upper and lower bounds.
2108The related options
2109.Sq NKMEMPAGES_MIN
2110and
2111.Sq NKMEMPAGES_MAX
2112allow the bounds to be overridden in the kernel configuration file.
2113These options are provided in the event the computed value is
2114insufficient resulting in an
2115.Dq out of space in kmem_map
2116panic.
2117.It Cd options SB_MAX=value
2118Sets the max size in bytes that a socket buffer is allowed to occupy.
2119The default is 256k, but sometimes it needs to be increased, for example
2120when using large TCP windows.
2121This option can be changed via
2122.Xr sysctl 8
2123as well.
2124.It Cd options SOMAXKVA=value
2125Sets the maximum size of kernel virtual memory that the socket buffers
2126are allowed to use.
2127The default is 16MB, but in situations where for example large TCP
2128windows are used this value must also be increased.
2129This option can be changed via
2130.Xr sysctl 8
2131as well.
2132.It Cd options BUFCACHE=value
2133Size of the buffer cache as a percentage of total available
2134.Tn RAM .
2135Ignored if BUFPAGES is also specified.
2136.It Cd options NBUF=value
2137Sets the number of buffer headers available, i.e., the number of
2138open files that may have a buffer cache entry.
2139Each buffer header
2140requires MAXBSIZE (machine dependent, but usually 65536) bytes.
2141The default value is machine dependent, but is usually equal to the
2142value of BUFPAGES.
2143If an architecture dependent VM_MAX_KERNEL_BUF constant is defined
2144then NBUF may be reduced at run time so that the storage allocated
2145for buffer headers doesn't exceed that limit.
2146.It Cd options BUFPAGES=value
2147These options set the number of pages available for the buffer cache.
2148Their default value is a machine dependent value, often calculated as
2149between 5% and 10% of total available
2150.Tn RAM .
2151.It Cd options MAXTSIZ=bytes
2152Sets the maximum size limit of a process' text segment.
2153See
2154.Pa /usr/include/machine/vmparam.h
2155for the port-specific default.
2156.It Cd options DFLDSIZ=bytes
2157Sets the default size limit of a process' data segment, the value that
2158will be returned as the soft limit for
2159.Dv RLIMIT_DATA
2160(as returned by
2161.Xr getrlimit 2 ) .
2162See
2163.Pa /usr/include/machine/vmparam.h
2164for the port-specific default.
2165.It Cd options MAXDSIZ=bytes
2166Sets the maximum size limit of a process' data segment, the value that
2167will be returned as the hard limit for
2168.Dv RLIMIT_DATA
2169(as returned by
2170.Xr getrlimit 2 ) .
2171See
2172.Pa /usr/include/machine/vmparam.h
2173for the port-specific default.
2174.It Cd options DFLSSIZ=bytes
2175Sets the default size limit of a process' stack segment, the value that
2176will be returned as the soft limit for
2177.Dv RLIMIT_STACK
2178(as returned by
2179.Xr getrlimit 2 ) .
2180See
2181.Pa /usr/include/machine/vmparam.h
2182for the port-specific default.
2183.It Cd options MAXSSIZ=bytes
2184Sets the maximum size limit of a process' stack segment, the value that
2185will be returned as the hard limit for
2186.Dv RLIMIT_STACK
2187(as returned by
2188.Xr getrlimit 2 ) .
2189See
2190.Pa /usr/include/machine/vmparam.h
2191for the port-specific default.
2192.It Cd options DUMP_ON_PANIC=integer
2193Defaults to one.
2194If set to zero, the kernel will not dump to the dump device when
2195it panics, though dumps can still be forced via
2196.Xr ddb 4
2197with the
2198.Dq sync
2199command.
2200Note that this sets the value of the
2201.Em kern.dump_on_panic
2202.Xr sysctl 3
2203variable which may be changed at run time -- see
2204.Xr sysctl 8
2205for details.
2206.It Cd options USE_TOPDOWN_VM
2207User space memory allocations (as made by
2208.Xr mmap 2 )
2209will be arranged in a
2210.Dq top down
2211fashion instead of the traditional
2212.Dq upwards from MAXDSIZ \+ vm_daddr
2213method.
2214This includes the placement of
2215.Xr ld.so 1 .
2216Arranging memory in this manner allows either (or both of) the heap or
2217.Xr mmap 2
2218allocated space to grow larger than traditionally possible.
2219This option is not available on all ports, but is instead expected to be
2220offered on a port-by-port basis, after which some ports will commit to
2221using it by default.
2222See the files
2223.Pa /usr/include/uvm/uvm_param.h
2224for some implementation details, and
2225.Pa /usr/include/machine/vmparam.h
2226for port specific details including availability.
2227.It Cd options VMSWAP
2228Enable paging device/file support.
2229This option is on by default.
2230.It Cd options PDPOLICY_CLOCKPRO
2231Use CLOCK-Pro, an alternative page replace policy.
2232.El
2233.Ss Security Options
2234.Bl -ohang
2235.It Cd options INSECURE
2236Hardwires the kernel security level at \-1.
2237This means that the system
2238always runs in secure level \-1 mode, even when running multiuser.
2239See the manual page for
2240.Xr init 8
2241for details on the implications of this.
2242The kernel secure level may manipulated by the superuser by altering the
2243.Em kern.securelevel
2244.Xr sysctl 3
2245variable (the secure level may only be lowered by a call from process ID 1,
2246i.e.,
2247.Xr init 8 ) .
2248See also
2249.Xr sysctl 8
2250and
2251.Xr sysctl 3 .
2252.It Cd options VERIFIED_EXEC_FP_MD5
2253Enables support for MD5 hashes in Veriexec.
2254.It Cd options VERIFIED_EXEC_FP_SHA1
2255Enables support for SHA1 hashes in Veriexec.
2256.It Cd options VERIFIED_EXEC_FP_RMD160
2257Enables support for RMD160 hashes in Veriexec.
2258.It Cd options VERIFIED_EXEC_FP_SHA256
2259Enables support for SHA256 hashes in Veriexec.
2260.It Cd options VERIFIED_EXEC_FP_SHA384
2261Enables support for SHA384 hashes in Veriexec.
2262.It Cd options VERIFIED_EXEC_FP_SHA512
2263Enables support for SHA512 hashes in Veriexec.
2264.It Cd options PAX_MPROTECT=value
2265Enables PaX MPROTECT,
2266.Xr mprotect 2
2267restrictions from the PaX project.
2268.Pp
2269The
2270.Ar value
2271is the default value for the
2272.Em global
2273knob, see
2274.Xr sysctl 3 .
2275If 0, PaX MPROTECT will be enabled only if explicitly set on programs
2276using
2277.Xr paxctl 8 .
2278If 1, PaX MPROTECT will be enabled for all programs.
2279Programs can be exempted using
2280.Xr paxctl 8 .
2281.Pp
2282See
2283.Xr security 8
2284for more details.
2285.It Cd options PAX_SEGVGUARD=value
2286Enables PaX Segvguard.
2287.Pp
2288The
2289.Ar value
2290is the default value for the
2291.Em global
2292knob, see
2293.Xr sysctl 3 .
2294If 0, PaX Segvguard will be enabled only if explicitly set on programs
2295using
2296.Xr paxctl 8 .
2297If 1, PaX Segvguard will be enabled to all programs, and exemption can
2298be done using
2299.Xr paxctl 8 .
2300.Pp
2301See
2302.Xr security 8
2303for more details.
2304.It Cd options PAX_ASLR=value
2305Enables PaX ASLR.
2306.Pp
2307The
2308.Ar value
2309is the default value for the
2310.Em global
2311knob, see
2312.Xr sysctl 3 .
2313If 0, PaX ASLR will be enabled only if explicitly set on programs
2314using
2315.Xr paxctl 8 .
2316If 1, PaX ASLR will be enabled to all programs, and exemption can
2317be done using
2318.Xr paxctl 8 .
2319.Pp
2320See
2321.Xr security 8
2322for more details.
2323.El
2324.Ss amiga-specific Options
2325.Bl -ohang
2326.It Cd options BB060STUPIDROM
2327When the bootloader (which passes
2328.Tn AmigaOS
2329.Tn ROM
2330information) claims we have a 68060
2331.Tn CPU
2332without
2333.Tn FPU ,
2334go look into the Processor Configuration Register (PCR) to find out.
2335You need this with
2336.Tn Amiga
2337.Tn ROM Ns s
2338up to (at least) V40.xxx (OS3.1),
2339when you boot via the bootblocks and don't have a DraCo.
2340.It Cd options IOBZCLOCK=frequency
2341The IOBlix boards come with two different serial master clocks: older ones
2342use 24 MHz, newer ones use 22.1184 MHz.
2343The driver normally assumes the latter.
2344If your board uses 24 MHz, you can recompile your kernel with
2345options IOBZCLOCK=24000000
2346or patch the kernel variable
2347.Tn iobzclock
2348to the same value.
2349.It Cd options LIMITMEM=value
2350If there, limit the part of the first memory bank used by
2351.Nx
2352to value megabytes.
2353Default is unlimited.
2354.It Cd options NKPTADD=addvalue
2355.It Cd options NKPTADDSHIFT=shiftvalue
2356The
2357.Tn CPU
2358specific
2359.Tn MMU
2360table for the kernel is pre-allocated at kernel startup time.
2361Part of it is scaled with
2362.Va maxproc ,
2363to have enough room to hold the user program
2364.Tn MMU
2365tables; the second part is a fixed amount for the kernel itself.
2366.Pp
2367The third part accounts for the size of the file buffer cache.
2368Its size is either
2369.Dv NKPTADD
2370pages (if defined) or memory size in bytes divided by two to
2371the power of
2372.Dv NKPTADDSHIFT .
2373The default is undefined
2374.Dv NKPTADD
2375and
2376.Dv NKPTADDSHIFT=24 ,
2377allowing for 16 buffers per megabyte of main memory (while
2378a GENERIC kernel allocates about half of that).
2379When you get "can't get KPT page" panics, you should increase
2380.Dv NKPTADD
2381(if defined), or decrease
2382.Dv NKPTADDSHIFT
2383by one.
2384.It Cd options P5PPC68KBOARD
2385Add special support for Phase5 mixed 68k+PPC boards.
2386Currently, this only affects rebooting from
2387.Nx
2388and is only needed on 68040+PPC, not on
238968060+PPC; without this, affected machines will hang after
2390.Nx
2391has shut
2392down and will only restart after a keyboard reset or a power cycle.
2393.El
2394.Ss arm32-specific Options
2395.Bl -ohang
2396.It Cd options FRENCH_KBD
2397Include translation for French keyboards when using
2398.Em pccons
2399on a Shark.
2400.It Cd options FINNISH_KBD
2401Include translation for Finnish keyboards when using
2402.Em pccons
2403on a Shark.
2404.It Cd options GERMAN_KBD
2405Include translation for German keyboards when using
2406.Em pccons
2407on a Shark.
2408.It Cd options NORWEGIAN_KBD
2409Include translation for French keyboards when using
2410.Em pccons
2411on a Shark.
2412.El
2413.Ss amd64-specific Options
2414.Bl -ohang
2415.It Cd options ENHANCED_SPEEDSTEP
2416Include support for the
2417.Tn Enhanced SpeedStep Technology
2418present in newer
2419.Tn CPU Ns s .
2420.It Cd options EST_FREQ_USERWRITE
2421Allow any user to change the frequency of an
2422.Tn Enhanced SpeedStep Technology
2423capable
2424.Tn CPU .
2425.It Cd options INTEL_ONDEMAND_CLOCKMOD
2426This enables the On Demand Clock Modulation by software
2427on Intel
2428.Tn CPUs
2429supporting the Thermal Monitor feature (TM).
2430You can select the duty cycle with
2431.Xr sysctl 8
2432in the node
2433.Em machdep.clockmod
2434if supported.
2435.It Cd options POWERNOW_K8
2436Include support for AMD Athlon 64 PowerNow! and Cool`n'Quiet
2437Technology, used to change the cpu voltage and frequency
2438on the fly.
2439.El
2440.Ss atari-specific Options
2441.Bl -ohang
2442.It Cd options DISKLABEL_AHDI
2443Include support for AHDI (native Atari) disklabels.
2444.It Cd options DISKLABEL_NBDA
2445Include support for
2446.Nx Ns Tn /atari
2447labels.
2448If you don't set this option, it will be set automatically.
2449.Nx Ns Tn /atari
2450will not work without it.
2451.It Cd options FALCON_SCSI
2452Include support for the 5380-SCSI configuration as found on the Falcon.
2453.It Cd options RELOC_KERNEL
2454If set, the kernel will relocate itself to TT-RAM, if possible.
2455This will give you a slightly faster system.
2456.Em Beware
2457that on some TT030 systems,
2458the system will frequently dump with MMU-faults with this option enabled.
2459.It Cd options SERCONSOLE
2460Allow the modem1-port to act as the system-console.
2461A carrier should be active on modem1 during system boot to active
2462the console functionality.
2463.It Cd options TT_SCSI
2464Include support for the 5380-SCSI configuration as found on the TT030
2465and Hades.
2466.El
2467.Ss i386-specific Options
2468.Bl -ohang
2469.It Cd options ENHANCED_SPEEDSTEP
2470Include support for the
2471.Tn Enhanced SpeedStep Technology
2472present in newer
2473.Tn CPU Ns s .
2474.It Cd options EST_FREQ_USERWRITE
2475Allow any user to change the frequency of an
2476.Tn Enhanced SpeedStep Technology
2477capable
2478.Tn CPU .
2479.It Cd options INTEL_ONDEMAND_CLOCKMOD
2480This enables the On Demand Clock Modulation by software
2481on Intel
2482.Tn CPUs
2483supporting the Thermal Monitor feature (TM).
2484You can select the duty cycle with
2485.Xr sysctl 8
2486in the node
2487.Em machdep.clockmod
2488if supported.
2489.It Cd options POWERNOW_K7
2490Include support for the AMD
2491.Tn PowerNow! Technology
2492present in AMD Athlon Mobile processors.
2493.It Cd options VIA_PADLOCK
2494Include support for the
2495.Tn AES
2496encryption instructions of the
2497.Tn VIA PadLock Security engine ,
2498which is attached as a provider to the opencrypto framework.
2499.It Cd options CPURESET_DELAY=value
2500Specifies the time (in millisecond) to wait before doing a hardware reset
2501in the last phase of a reboot.
2502This gives the user a chance to see error messages from the shutdown
2503operations (like NFS unmounts, buffer cache flush, etc ...).
2504Setting this to 0 will disable the delay.
2505Default is 2 seconds.
2506.It Cd options VM86
2507Include support for virtual 8086 mode, used by
2508.Tn DOS
2509emulators and X servers to run BIOS code, e.g., for some VESA routines.
2510.It Cd options USER_LDT
2511Include i386-specific system calls for modifying the local descriptor table,
2512used by Windows emulators.
2513.It Cd options REALBASEMEM=integer
2514Overrides the base memory size passed in from the boot block.
2515(Value given in kilobytes.)
2516Use this option only if the boot block reports the size incorrectly.
2517(Note that some
2518.Tn BIOS Ns es
2519put the extended
2520.Tn BIOS
2521data area at the top of base memory, and therefore report a smaller
2522base memory size to prevent programs overwriting it.
2523This is correct behavior, and you should not use the
2524.Em REALBASEMEM
2525option to access this memory).
2526.It Cd options REALEXTMEM=integer
2527Overrides the extended memory size passed in from the boot block.
2528(Value given in kilobytes.
2529Extended memory does not include the first megabyte.)
2530Use this option only if the boot block reports the size incorrectly.
2531.It Cd options FRENCH_KBD,FINNISH_KBD,GERMAN_KBD,NORWEGIAN_KBD
2532Select a non-US keyboard layout for the
2533.Em pccons
2534console driver.
2535.It Cd options CYRIX_CACHE_WORKS
2536Relevant only to the Cyrix 486DLC CPU.
2537This option is used to turn on the cache in hold-flush mode.
2538It is not turned on by default because it is known to have problems in
2539certain motherboard implementations.
2540.It Cd options CYRIX_CACHE_REALLY_WORKS
2541Relevant only to the Cyrix 486DLC CPU.
2542This option is used to turn on the cache in write-back mode.
2543It is not turned on by default because it is known to have problems in
2544certain motherboard implementations.
2545In order for this option to take effect, option
2546.Em CYRIX_CACHE_WORKS
2547must also be specified.
2548.It Cd options PCIBIOS
2549Enable support for initializing the
2550.Tn PCI
2551bus using information from the
2552.Tn BIOS .
2553See
2554.Xr pcibios 4
2555for details.
2556.It Cd options KSTACK_CHECK_DR0
2557Detect kernel stack overflow using DR0 register.
2558This option uses DR0 register exclusively so you can't use DR0 register for
2559other purpose (e.g., hardware breakpoint) if you turn this on.
2560.It Cd options MTRR
2561Include support for accessing MTRR registers from user-space.
2562See
2563.Xr i386_get_mtrr 2 .
2564.It Cd options BEEP_ONHALT
2565Make the system speaker emit several beeps when it is completely safe to
2566power down the computer after a
2567.Xr halt 8
2568command.
2569Requires
2570.Xr sysbeep 4
2571support.
2572.It Cd options BEEP_ONHALT_COUNT=times
2573Number of times to beep the speaker when
2574.Cd options BEEP_ONHALT
2575is enabled.
2576Defaults to 3.
2577.It Cd options BEEP_ONHALT_PITCH=hz
2578The tone frequency used when
2579.Cd options BEEP_ONHALT
2580option, in hertz.
2581Defaults to 1500.
2582.It Cd options BEEP_ONHALT_PERIOD=msecs
2583The duration of each beep when
2584.Cd options BEEP_ONHALT
2585is enabled, in milliseconds.
2586Defaults to 250.
2587.It Cd options MULTIBOOT
2588Makes the kernel Multiboot-compliant, allowing it to be booted through
2589a Multiboot-compliant boot manager such as GRUB.
2590See
2591.Xr multiboot 8
2592for more information.
2593.El
2594.Ss isa-specific Options
2595Options specific to
2596.Xr isa 4
2597busses.
2598.Bl -ohang
2599.It Cd options PCIC_ISA_ALLOC_IOBASE=address, PCIC_ISA_ALLOC_IOSIZE=size
2600Control the section of IO bus space used for PCMCIA bus space mapping.
2601Ideally the probed defaults are satisfactory, however in practice
2602that is not always the case.
2603See
2604.Xr pcmcia 4
2605for details.
2606.It Cd options PCIC_ISA_INTR_ALLOC_MASK=mask
2607Controls the allowable interrupts that may be used for
2608.Tn PCMCIA
2609devices.
2610This mask is a logical-or of power-of-2s of allowable interrupts:
2611.Bd -literal -offset 04n
2612.Em "IRQ Val      IRQ Val      IRQ Val       IRQ Val"
2613 0  0x0001    4  0x0010    8  0x0100    12  0x1000
2614 1  0x0002    5  0x0020    9  0x0200    13  0x2000
2615 2  0x0004    6  0x0040   10  0x0400    14  0x4000
2616 3  0x0008    7  0x0080   11  0x0800    15  0x8000
2617.Ed
2618.It Cd options PCKBC_CNATTACH_SELFTEST
2619Perform a self test of the keyboard controller before attaching it as a
2620console.
2621This might be necessary on machines where we boot on cold iron, and
2622pckbc refuses to talk until we request a self test.
2623Currently only the netwinder port uses it.
2624.It Cd options PCKBD_CNATTACH_MAY_FAIL
2625If this option is set the PS/2 keyboard will not be used as the console
2626if it cannot be found during boot.
2627This allows other keyboards, like USB, to be the console keyboard.
2628.It Cd options PCKBD_LAYOUT=layout
2629Sets the default keyboard layout, see
2630.Xr pckbd 4 .
2631.El
2632.Ss m68k-specific Options
2633.Bl -ohang
2634.It Cd options FPU_EMULATE
2635Include support for MC68881/MC68882 emulator.
2636.It Cd options FPSP
2637Include support for 68040 floating point.
2638.It Cd options M68020,M68030,M68040,M68060
2639Include support for a specific
2640.Tn CPU ,
2641at least one (the one you are using) should be specified.
2642.It Cd options M060SP
2643Include software support for 68060.
2644This provides emulation of unimplemented
2645integer instructions as well as emulation of unimplemented floating point
2646instructions and data types and software support for floating point traps.
2647.El
2648.Ss powerpc-specific Options (OEA Only)
2649.Bl -ohang
2650.It Cd options PMAP_MEMLIMIT=value
2651Limit the amount of memory seen by the kernel to
2652.Ar value
2653bytes.
2654.It Cd options PTEGCOUNT=value
2655Specify the size of the page table as
2656.Ar value
2657PTE groups.
2658Normally, one PTEG is allocated per physical page frame.
2659.El
2660.Ss sparc-specific Options
2661.Bl -ohang
2662.It Cd options AUDIO_DEBUG
2663Enable simple event debugging of the logging of the
2664.Xr audio 4
2665device.
2666.It Cd options BLINK
2667Enable blinking of LED.
2668Blink rate is full cycle every N seconds for
2669N \*[Lt] then current load average.
2670See
2671.Xr getloadavg 3 .
2672.\" .It Cd options COLORFONT_CACHE
2673.\" What does this do?
2674.It Cd options COUNT_SW_LEFTOVERS
2675Count how many times the sw SCSI device has left 3, 2, 1 and 0 in the
2676sw_3_leftover, sw_2_leftover, sw_1_leftover, and sw_0_leftover
2677variables accessible from
2678.Xr ddb 4 .
2679See
2680.Xr sw 4 .
2681.It Cd options DEBUG_ALIGN
2682Adds debugging messages calls when user-requested alignment fault
2683handling happens.
2684.It Cd options DEBUG_EMUL
2685Adds debugging messages calls for emulated floating point and
2686alignment fixing operations.
2687.It Cd options DEBUG_SVR4
2688Prints registers messages calls for emulated SVR4 getcontext and
2689setcontext operations.
2690See
2691.Em options COMPAT_SVR4 .
2692.It Cd options EXTREME_DEBUG
2693Adds debugging functions callable from
2694.Xr ddb 4 .
2695The debug_pagetables, test_region and print_fe_map
2696functions print information about page tables for the SUN4M
2697platforms only.
2698.It Cd options EXTREME_EXTREME_DEBUG
2699Adds extra info to
2700.Em options EXTREME_DEBUG .
2701.It Cd options FPU_CONTEXT
2702Make
2703.Em options COMPAT_SVR4
2704getcontext and setcontext include floating point registers.
2705.It Cd options MAGMA_DEBUG
2706Adds debugging messages to the
2707.Xr magma 4
2708device.
2709.It Cd options RASTERCONS_FULLSCREEN
2710Use the entire screen for the console.
2711.It Cd options RASTERCONS_SMALLFONT
2712Use the Fixed font on the console, instead of the normal font.
2713.It Cd options SUN4
2714Support sun4 class machines.
2715.It Cd options SUN4C
2716Support sun4c class machines.
2717.It Cd options SUN4M
2718Support sun4m class machines.
2719.It Cd options SUN4_MMU3L
2720.\" XXX ???
2721Enable support for sun4 3-level MMU machines.
2722.It Cd options V9
2723Enable SPARC V9 assembler in
2724.Xr ddb 4 .
2725.El
2726.Ss sparc64-specific Options
2727.Bl -ohang
2728.It Cd options AUDIO_DEBUG
2729Enable simple event debugging of the logging of the
2730.Xr audio 4
2731device.
2732.It Cd options BLINK
2733Enable blinking of LED.
2734Blink rate is full cycle every N seconds for
2735N \*[Lt] then current load average.
2736See
2737.Xr getloadavg 3 .
2738.El
2739.Ss x68k-specific Options
2740.Bl -ohang
2741.It Cd options EXTENDED_MEMORY
2742Include support for extended memory, e.g., TS-6BE16 and 060turbo on-board.
2743.It Cd options JUPITER
2744Include support for Jupiter-X MPU accelerator
2745.It Cd options ZSCONSOLE,ZSCN_SPEED=value
2746Use the built-in serial port as the system-console.
2747Speed is specified in bps, defaults to 9600.
2748.It Cd options ITE_KERNEL_ATTR=value
2749Set the kernel message attribute for ITE.
2750Value, an integer, is a logical or of the following values:
2751.Bl -tag -width 4n -compact -offset indent
2752.It 1
2753color inversed
2754.It 2
2755underlined
2756.It 4
2757bolded
2758.El
2759.El
2760.\" The following requests should be uncommented and used where appropriate.
2761.\" .Sh FILES
2762.\" .Sh EXAMPLES
2763.Sh SEE ALSO
2764.Xr config 1 ,
2765.Xr gdb 1 ,
2766.Xr ktrace 1 ,
2767.Xr pmc 1 ,
2768.Xr quota 1 ,
2769.Xr vndcompress 1 ,
2770.Xr gettimeofday 2 ,
2771.Xr i386_get_mtrr 2 ,
2772.Xr i386_iopl 2 ,
2773.Xr msgctl 2 ,
2774.Xr msgget 2 ,
2775.Xr msgrcv 2 ,
2776.Xr msgsnd 2 ,
2777.Xr ntp_adjtime 2 ,
2778.Xr ntp_gettime 2 ,
2779.Xr semctl 2 ,
2780.Xr semget 2 ,
2781.Xr semop 2 ,
2782.Xr shmat 2 ,
2783.Xr shmctl 2 ,
2784.Xr shmdt 2 ,
2785.Xr shmget 2 ,
2786.Xr sysctl 3 ,
2787.Xr apm 4 ,
2788.Xr ddb 4 ,
2789.Xr inet 4 ,
2790.Xr iso 4 ,
2791.Xr lkm 4 ,
2792.Xr md 4 ,
2793.Xr ns 4 ,
2794.Xr pcibios 4 ,
2795.Xr pcmcia 4 ,
2796.Xr ppp 4 ,
2797.Xr userconf 4 ,
2798.Xr vnd 4 ,
2799.Xr wscons 4 ,
2800.Xr config 5 ,
2801.Xr edquota 8 ,
2802.Xr init 8 ,
2803.Xr mdsetimage 8 ,
2804.Xr mount_cd9660 8 ,
2805.Xr mount_fdesc 8 ,
2806.Xr mount_kernfs 8 ,
2807.Xr mount_lfs 8 ,
2808.Xr mount_mfs 8 ,
2809.Xr mount_msdos 8 ,
2810.Xr mount_nfs 8 ,
2811.Xr mount_ntfs 8 ,
2812.Xr mount_null 8 ,
2813.Xr mount_portal 8 ,
2814.Xr mount_procfs 8 ,
2815.Xr mount_udf 8 ,
2816.Xr mount_umap 8 ,
2817.Xr mount_union 8 ,
2818.Xr mrouted 8 ,
2819.Xr newfs_lfs 8 ,
2820.Xr ntpd 8 ,
2821.Xr quotaon 8 ,
2822.Xr rpc.rquotad 8 ,
2823.Xr sysctl 8 ,
2824.Xr in_getifa 9
2825.Sh HISTORY
2826The
2827.Nm
2828man page first appeared in
2829.Nx 1.3 .
2830.Sh BUGS
2831The
2832.Em EON
2833option should be a pseudo-device, and is also very fragile.
2834