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