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