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