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