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