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