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