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