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