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