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