1.\" $NetBSD: options.4,v 1.193 2003/02/02 22:53:57 jmmv 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 NOFILE=integer 1065Sets the soft 1066.Dv RLIMIT_NOFILE 1067resource limit, which specifies the maximum number of open 1068file descriptors for each process; 1069this value is inherited by its child processes. 1070It defaults to 1071.Em OPEN_MAX , 1072which is currently defined to be 64. 1073.It Cd options DEFCORENAME=string 1074Sets the default value of the 1075.Em kern.defcorename 1076sysctl variable, otherwise it is set to 1077.Nm %n.core . 1078See 1079.Xr sysctl 8 1080and 1081.Xr sysctl 3 1082for details. 1083.It Cd options RASOPS_CLIPPING 1084Enables clipping within the 1085.Nm rasops 1086raster-console output system. 1087.Em NOTE : 1088only available on architectures that use 1089.Nm rasops 1090for console output. 1091.It Cd options RASOPS_SMALL 1092Removes optimized character writing code from the 1093.Nm rasops 1094raster-console output system. 1095.Em NOTE : 1096only available on architectures that use 1097.Nm rasops 1098for console output. 1099.It Cd options INCLUDE_CONFIG_FILE 1100Embeds the kernel config file used to define the kernel in the kernel 1101binary itself. 1102The embedded data also includes any files directly included by the config 1103file itself, e.g. 1104.Pa GENERIC.local 1105or 1106.Pa std.$MACHINE . 1107The embedded config file can be extracted from the resulting kernel by 1108the following command: 1109.Bd -literal -offset indent 1110strings netbsd | sed -n 's/^_CFG_//p' | unvis 1111.Ed 1112.It Cd options INCLUDE_JUST_CONFIG 1113Similar to the above option, but includes just the actual config file, 1114not any included files. 1115.It Cd options PIPE_SOCKETPAIR 1116Use slower, but smaller socketpair(2)-based pipe implementation instead 1117of default faster, but bigger one. 1118Primarily useful for installation kernels. 1119.It Cd options USERCONF 1120Compiles in the in-kernel device configuration manager. 1121See 1122.Xr userconf 4 1123for details. 1124.It Cd options PERFCTRS 1125Compiles in kernel support for CPU performance-monitoring counters. 1126See 1127.Xr pmc 1 1128for details. 1129.Em NOTE : 1130not available on all architectures. 1131.El 1132.Ss Networking Options 1133.Bl -ohang 1134.It Cd options GATEWAY 1135Enables 1136.Em IPFORWARDING 1137(which see) 1138and (on most ports) increases the size of 1139.Em NMBCLUSTERS 1140(which see). 1141In general, 1142.Em GATEWAY 1143is used to indicate that a system should act as a router, and 1144.Em IPFORWARDING 1145is not invoked directly. 1146(Note that 1147.Em GATEWAY 1148has no impact on protocols other than 1149.Tn IP , 1150such as 1151.Tn CLNP 1152or 1153.Tn XNS ) . 1154.Em GATEWAY 1155option also compiles IPv4 fast forwarding code into the kernel. 1156.It Cd options IPFORWARDING=value 1157If 1158.Em value 1159is 1 this enables IP routing behavior. 1160If 1161.Em value 1162is 0 (the default), it disables it. 1163The 1164.Em GATEWAY 1165option sets this to 1 automatically. 1166With this option enabled, the machine will forward IP datagrams destined 1167for other machines between its interfaces. 1168Note that even without this option, the kernel will 1169still forward some packets (such as source routed packets) -- removing 1170.Em GATEWAY 1171and 1172.Em IPFORWARDING 1173is insufficient to stop all routing through a bastion host on a 1174firewall -- source routing is controlled independently. 1175To turn off source routing, use 1176.Em options IPFORWSRCRT=0 1177(which see). 1178Note that IP forwarding may be turned on and off independently of the 1179setting of the 1180.Em IPFORWARDING 1181option through the use of the 1182.Em net.inet.ip.forwarding 1183sysctl variable. 1184If 1185.Em net.inet.ip.forwarding 1186is 1, IP forwarding is on. 1187See 1188.Xr sysctl 8 1189and 1190.Xr sysctl 3 1191for details. 1192.It Cd options IPFORWSRCRT=value 1193If 1194.Em value 1195is set to zero, source routing of IP datagrams is turned off. 1196If 1197.Em value 1198is set to one (the default) or the option is absent, source routed IP 1199datagrams are forwarded by the machine. 1200Note that source routing of IP packets may be turned on and off 1201independently of the setting of the 1202.Em IPFORWSRCRT 1203option through the use of the 1204.Em net.inet.ip.forwsrcrt 1205sysctl variable. 1206If 1207.Em net.inet.ip.forwsrcrt 1208is 1, forwarding of source routed IP datagrams is on. 1209See 1210.Xr sysctl 8 1211and 1212.Xr sysctl 3 1213for details. 1214.It Cd options IFA_STATS 1215Tells the kernel to maintain per-address statistics on bytes sent 1216and received over (currently) internet and appletalk addresses. 1217.\"This can be a fairly expensive operation, so you probably want to 1218.\"keep this disabled. 1219The option is not recommended as it degrades system stability. 1220.It Cd options MROUTING 1221Includes support for IP multicast routers. 1222You certainly want 1223.Em INET 1224with this. 1225Multicast routing is controlled by the 1226.Xr mrouted 8 1227daemon. 1228.It Cd options INET 1229Includes support for the 1230.Tn TCP/IP 1231protocol stack. 1232You almost certainly want this. 1233See 1234.Xr inet 4 1235for details. 1236This option is currently required. 1237.It Cd options INET6 1238Includes support for the 1239.Tn IPv6 1240protocol stack. 1241See 1242.Xr inet6 4 1243for details. 1244Unlike 1245.Em INET , 1246.Em INET6 1247enables multicast routing code as well. 1248This option requires 1249.Em INET 1250at this moment, but it should not. 1251.It Cd options ND6_DEBUG 1252The option sets the default value of net.inet6.icmp6.nd6_debug to 1, 1253for debugging IPv6 neighbor discovery protocol handling. 1254See 1255.Xr sysctl 3 1256for details. 1257.It Cd options IPSEC 1258Includes support for the 1259.Tn IPsec 1260protocol. 1261See 1262.Xr ipsec 4 1263for details. 1264.Em IPSEC 1265will enable 1266secret key management part, 1267policy management part, 1268.Tn AH 1269and 1270.Tn IPComp . 1271Kernel binary will not be subject to export control in most of countries, 1272even if compiled with 1273.Em IPSEC . 1274For example, it should be okay to export it from within the United States 1275to the outside. 1276.Em INET6 1277and 1278.Em IPSEC 1279are orthogonal so you can get IPv4-only kernel with IPsec support, 1280IPv4/v6 dual support kernel without IPsec, and so forth. 1281This option requires 1282.Em INET 1283at this moment, but it should not. 1284.It Cd options IPSEC_DEBUG 1285Enables debugging code in 1286.Tn IPsec 1287stack. 1288This option assumes 1289.Em IPSEC . 1290.It Cd options IPSEC_ESP 1291Includes support for 1292.Tn IPsec 1293.Tn ESP 1294protocol. 1295See 1296.Xr ipsec 4 1297for details. 1298.Em IPSEC_ESP 1299will enable source code that is subject to export control in some countries 1300.Pq including the United States , 1301and compiled kernel binary will be subject to certain restriction. 1302This option assumes 1303.Em IPSEC . 1304.It Cd options ALTQ 1305Enabled ALTQ (Alternate Queueing). 1306For simple rate-limiting, use 1307.Xr tbrconfig 8 1308to set up the interface transmission rate. 1309To use queueing disciplines, their appropriate kernel options should also 1310be defined (documented below). 1311Queueing disciplines are managed by 1312.Xr altqd 8 . 1313See 1314.Xr altq 9 1315for details. 1316.It Cd options ALTQ_HFSC 1317Include support for ALTQ-implemented HFSC (Hierarchical Fair Service Curve) 1318module. 1319HFSC supports both link-sharing and guaranteed real-time services. 1320H-FSC employs a service curve based QoS model, and its unique feature 1321is an ability to decouple delay and bandwidth allocation. 1322Requires 1323.Em ALTQ_RED 1324to use the RED queueing discipline on HFSC classes, or 1325.Em ALTQ_RIO 1326to use the RIO queueing discipline on HFSC classes. 1327This option assumes 1328.Em ALTQ . 1329.It Cd options ALTQ_PRIQ 1330Include support for ALTQ-implemented PRIQ (Priority Queueing). 1331PRIQ implements a simple priority-based queueing discipline. 1332A higher priority class is always served first. 1333Requires 1334.Em ALTQ_RED 1335to use the RED queueing discipline on HFSC classes, or 1336.Em ALTQ_RIO 1337to use the RIO queueing discipline on HFSC classes. 1338This option assumes 1339.Em ALTQ . 1340.It Cd options ALTQ_WFQ 1341Include support for ALTQ-implemented WFQ (Weighted Fair Queueing). 1342WFQ implements a weighted-round robin scheduler for a set of queues. 1343A weight can be assigned to each queue to give a different proportion 1344of the link capacity. 1345A hash function is used to map a flow to one of a set of queues. 1346This option assumes 1347.Em ALTQ . 1348.It Cd options ALTQ_FIFOQ 1349Include support for ALTQ-implemented FIFO queueing. 1350FIFOQ is a simple drop-tail FIFO (First In, First Out) queueing discipline. 1351This option assumes 1352.Em ALTQ . 1353.It Cd options ALTQ_RIO 1354Include support for ALTQ-implemented RIO (RED with In/Out). 1355The original RIO has 2 sets of RED parameters; one for in-profile 1356packets and the other for out-of-profile packets. 1357At the ingress of the network, profile meters tag packets as IN or 1358OUT based on contracted profiles for customers. 1359Inside the network, IN packets receive preferential treatment by 1360the RIO dropper. 1361ALTQ/RIO has 3 drop precedence levels defined for the Assured Forwarding 1362PHB of DiffServ (RFC2597). 1363This option assumes 1364.Em ALTQ . 1365.It Cd options ALTQ_BLUE 1366Include support for ALTQ-implemented Blue buffer management. 1367Blue is another active buffer management mechanism. 1368This option assumes 1369.Em ALTQ . 1370.It Cd options ALTQ_FLOWVALVE 1371Include support for ALTQ-implemented Flowvalve. 1372Flowvalve is a simple implementation of a RED penalty box that identifies 1373and punishes misbehaving flows. 1374This option requires 1375.Em ALTQ_RED 1376and assumes 1377.Em ALTQ . 1378.It Cd options ALTQ_CDNR 1379Include support for ALTQ-implemented CDNR (diffserv traffic conditioner) 1380packet marking/manipulation. 1381Traffic conditioners are components to meter, mark, or drop incoming 1382packets according to some rules. 1383As opposed to queueing disciplines, traffic conditioners handle incoming 1384packets at an input interface. 1385This option assumes 1386.Em ALTQ . 1387.It Cd options ALTQ_NOPCC 1388Disables use of processor cycle counter to measure time in ALTQ. 1389This option should be defined for a non-Pentium i386 CPU which does not 1390have TSC, SMP (per-CPU counters are not in sync), or power management 1391which affects processor cycle counter. 1392This option assumes 1393.Em ALTQ . 1394.It Cd options ALTQ_IPSEC 1395Include support for IPSEC in IPv4 ALTQ. 1396This option assumes 1397.Em ALTQ . 1398.It Cd options ALTQ_JOBS 1399Undocumented at this time. 1400.It Cd options ALTQ_AFMAP 1401Include support for an undocumented ALTQ feature that is used to map an IP 1402flow to an ATM VC (Virtual Circuit). 1403This option assumes 1404.Em ALTQ . 1405.It Cd options ALTQ_LOCALQ 1406Include support for ALTQ-implemented local queues. 1407Its practical use is undefined. 1408Assumes 1409.Em ALTQ . 1410.It Cd options SUBNETSARELOCAL 1411Sets default value for net.inet.ip.subnetsarelocal variable, which 1412controls whether non-directly-connected subnets of connected networks 1413are considered "local" for purposes of choosing the MSS for a TCP 1414connection. 1415This is mostly present for historic reasons and completely irrelevant if 1416you enable Path MTU discovery. 1417.It Cd options HOSTZEROBROADCAST 1418Sets default value for net.inet.ip.hostzerobroadcast variable, which 1419controls whether the zeroth host address of each connected subnet is 1420also considered a broadcast address. 1421Default value is "1", for compatibility with old systems; if this is 1422set to zero on all hosts on a subnet, you should be able to fit an extra 1423host per subnet on the 1424".0" address. 1425.It Cd options MCLSHIFT=value 1426This option is the base-2 logarithm of the size of mbuf clusters. 1427The 1428.Bx 1429networking stack keeps network packets in a linked 1430list, or chain, of kernel buffer objects called mbufs. 1431The system provides larger mbuf clusters as an optimization for 1432large packets, instead of using long chains for large packets. 1433The mbuf cluster size, 1434or 1435.Em MCLBYTES , 1436must be a power of two, and is computed as two raised to the power 1437.Em MCLSHIFT . 1438On systems with Ethernet network adaptors, 1439.Em MCLSHIFT 1440is often set to 11, giving 2048-byte mbuf clusters, large enough to 1441hold a 1500-byte 1442.Tn Ethernet 1443frame in a single cluster. 1444Systems with network interfaces supporting larger frame sizes like 1445.Tn ATM , 1446.Tn FDDI , 1447or 1448.Tn HIPPI 1449may perform better with 1450.Em MCLSHIFT 1451set to 12 or 13, giving mbuf cluster sizes of 4096 and 8192 bytes, 1452respectively. 1453.It Cd options NS 1454Include support for the 1455.Tn Xerox 1456.Tn XNS 1457protocol stack. 1458See 1459.Xr ns 4 1460for details. 1461.It Cd options ISO,TPIP 1462Include support for the ubiquitous 1463.Tn OSI 1464protocol stack. 1465See 1466.Xr iso 4 1467for details. 1468This option assumes 1469.Em INET . 1470.It Cd options EON 1471Include support for tunneling 1472.Tn OSI 1473protocols over 1474.Tn IP . 1475Known to be broken, or at least very fragile, and undocumented. 1476.It Cd options CCITT,LLC,HDLC 1477Include support for the 1478.Tn CCITT 1479(nee 1480.Tn ITU-TSS ) 1481.Tn X.25 1482protocol stack. 1483The state of this code is currently unknown, and probably contains bugs. 1484This option assumes 1485.Em INET . 1486.It Cd options NETATALK 1487Include support for the 1488.Tn AppleTalk 1489protocol stack. 1490The kernel provides provision for the 1491.Em Datagram Delivery Protocol 1492(DDP), providing SOCK_DGRAM support and 1493.Tn AppleTalk 1494routing. 1495This stack is used by the 1496.Em NETATALK 1497package, which adds support for 1498.Tn AppleTalk 1499server services via user libraries and applications. 1500.It Cd options IPNOPRIVPORTS 1501Normally, only root can bind a socket descriptor to a so-called 1502.Dq privileged 1503.Tn TCP 1504port, that is, a port number in the range 0-1023. 1505This option eliminates those checks from the kernel. 1506This can be useful if there is a desire to allow daemons without 1507privileges to bind those ports, e.g. on firewalls. 1508The security tradeoffs in doing this are subtle. 1509This option should only be used by experts. 1510.It Cd options TCP_COMPAT_42 1511.Tn TCP 1512bug compatibility with 1513.Bx 4.2 . 1514In 1515.Bx 4.2 , 1516.Tn TCP 1517sequence numbers were 32-bit signed values. 1518Modern implementations of TCP use unsigned values. 1519This option clamps the initial sequence number to start in 1520the range 2^31 rather than the full unsigned range of 2^32. 1521Also, under 1522.Bx 4.2 , 1523keepalive packets must contain at least one byte or else 1524the remote end would not respond. 1525.It Cd options TCP_DEBUG 1526Record the last 1527.Em TCP_NDEBUG 1528TCP packets with SO_DEBUG set, and decode to the console if 1529.Em tcpconsdebug 1530is set. 1531.It Cd options TCP_NDEBUG 1532Number of packets to record for 1533.Em TCP_DEBUG . 1534Defaults to 100. 1535.It Cd options PFIL_HOOKS 1536This option turns on the packet filter interface hooks. 1537See 1538.Xr pfil 9 1539for details. 1540This option assumes 1541.Em INET . 1542.It Cd options IPFILTER_LOG 1543This option, in conjunction with 1544.Em pseudo-device ipfilter , 1545enables logging of IP packets using ip-filter. 1546.It Cd options IPFILTER_DEFAULT_BLOCK 1547This option sets the default policy of ip-filter. 1548If it is set, ip-filter will block packets by default. 1549.El 1550.Ss System V IPC Options 1551.Bl -ohang 1552.It Cd options SYSVMSG 1553Includes support for 1554.At V 1555style message queues. 1556See 1557.Xr msgctl 2 , 1558.Xr msgget 2 , 1559.Xr msgrcv 2 , 1560.Xr msgsnd 2 . 1561.It Cd options SYSVSEM 1562Includes support for 1563.At V 1564style semaphores. 1565See 1566.Xr semctl 2 , 1567.Xr semget 2 , 1568.Xr semop 2 . 1569.It Cd options SEMMNI=value 1570Sets the number of 1571.At V 1572style semaphore identifiers. 1573The GENERIC config file for your port will have the default. 1574.It Cd options SEMMNS=value 1575Sets the number of 1576.At V 1577style semaphores in the system. 1578The GENERIC config file for your port will have the default. 1579.It Cd options SEMUME=value 1580Sets the maximum number of undo entries per process for 1581.At V 1582style semaphores. 1583The GENERIC config file for your port will have the default. 1584.It Cd options SEMMNU=value 1585Sets the number of undo structures in the system for 1586.At V 1587style semaphores. 1588The GENERIC config file for your port will have the default. 1589.It Cd options SYSVSHM 1590Includes support for 1591.At V 1592style shared memory. 1593See 1594.Xr shmat 2 , 1595.Xr shmctl 2 , 1596.Xr shmdt 2 , 1597.Xr shmget 2 . 1598.It Cd options SHMMAXPGS=value 1599Sets the maximum number of 1600.At V 1601style shared memory pages that are available through the 1602.Xr shmget 2 1603system call. 1604Default value is 1024 on most ports. 1605See 1606.Pa /usr/include/machine/vmparam.h 1607for the default. 1608.El 1609.Ss VM Related Options 1610.Bl -ohang 1611.It Cd options NMBCLUSTERS=value 1612The number of mbuf clusters the kernel supports. 1613Mbuf clusters are MCLBYTES in size (usually 2k). 1614This is used to compute the size of the kernel VM map 1615.Em mb_map , 1616which maps mbuf clusters. 1617Default on most ports is 1024 (2048 with 1618.Dq options GATEWAY 1619). 1620See 1621.Pa /usr/include/machine/param.h 1622for exact default information. 1623Increase this value if you get 1624.Dq mclpool limit reached 1625messages. 1626.It Cd options NKMEMPAGES=value 1627.It Cd options NKMEMPAGES_MIN=value 1628.It Cd options NKMEMPAGES_MAX=value 1629Size of kernel VM map 1630.Em kmem_map , 1631in PAGE_SIZE-sized chunks (the VM page size; this value may be read 1632from the 1633.Xr sysctl 8 1634variable 1635.Em hw.pagesize 1636). 1637This VM map is used to map the kernel malloc arena. 1638The kernel attempts to auto-size this map based on the amount of 1639physical memory in the system. 1640Platform-specific code may place bounds on this computed size, 1641which may be viewed with the 1642.Xr sysctl 8 1643variable 1644.Em vm.nkmempages . 1645See 1646.Pa /usr/include/machine/param.h 1647for the default upper and lower bounds. 1648The related options 1649.Sq NKMEMPAGES_MIN 1650and 1651.Sq NKMEMPAGES_MAX 1652allow the bounds to be overridden in the kernel configuration file. 1653These options are provided in the event the computed value is 1654insufficient resulting in an 1655.Dq out of space in kmem_map 1656panic. 1657.It Cd options BUFCACHE=value 1658Size of the buffer cache as a percentage of total available 1659.Tn RAM . 1660Ignored if BUFPAGES is also specified. 1661.It Cd options NBUF=value 1662.It Cd options BUFPAGES=value 1663These options set the number of pages available for the buffer cache. 1664Their default value is a machine dependent value, often calculated as 1665between 5% and 10% of total available 1666.Tn RAM . 1667.It Cd options MAXTSIZ=bytes 1668Sets the maximum size limit of a process' text segment. 1669See 1670.Pa /usr/include/machine/vmparam.h 1671for the port-specific default. 1672.It Cd options DFLDSIZ=bytes 1673Sets the default size limit of a process' data segment, the value that 1674will be returned as the soft 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 MAXDSIZ=bytes 1682Sets the maximum size limit of a process' data segment, the value that 1683will be returned as the hard limit for 1684.Dv RLIMIT_DATA 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 DFLSSIZ=bytes 1691Sets the default size limit of a process' stack segment, the value that 1692will be returned as the soft 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.It Cd options MAXSSIZ=bytes 1700Sets the maximum size limit of a process' stack segment, the value that 1701will be returned as the hard limit for 1702.Dv RLIMIT_STACK 1703(as returned by 1704.Xr getrlimit 2 ) . 1705See 1706.Pa /usr/include/machine/vmparam.h 1707for the port-specific default. 1708.El 1709.Ss amiga-specific Options 1710.Bl -ohang 1711.It Cd options BB060STUPIDROM 1712When the bootloader (which passes 1713.Tn AmigaOS 1714.Tn ROM 1715information) claims we have a 68060 1716.Tn CPU 1717without 1718.Tn FPU , 1719go look into the Processor Configuration Register (PCR) to find out. 1720You need this with 1721.Tn Amiga 1722.Tn ROM Ns s 1723up to (at least) V40.xxx (OS3.1), 1724when you boot via the bootblocks and don't have a DraCo. 1725.It Cd options IOBZCLOCK=frequency 1726The IOBlix boards come with two different serial master clocks: older ones 1727use 24 MHz, newer ones use 22.1184 MHz. 1728The driver normally assumes the latter. 1729If your board uses 24 MHz, you can recompile your kernel with 1730options IOBZCLOCK=24000000 1731or patch the kernel variable 1732.Tn iobzclock 1733to the same value. 1734.It Cd options LIMITMEM=value 1735If there, limit the part of the first memory bank used by 1736.Nx 1737to value megabytes. 1738Default is unlimited. 1739.It Cd options NKPTADD=addvalue 1740.It Cd options NKPTADDSHIFT=shiftvalue 1741The 1742.Tn CPU 1743specific 1744.Tn MMU 1745table for the kernel is pre-allocated at kernel startup time. 1746Part of it is scaled with 1747.Va maxproc , 1748to have enough room to hold the user program 1749.Tn MMU 1750tables; the second part is a fixed amount for the kernel itself. 1751.Pp 1752The third part accounts for the size of the file buffer cache. 1753Its size is either 1754.Dv NKPTADD 1755pages (if defined) or memory size in bytes divided by two to 1756the power of 1757.Dv NKPTADDSHIFT . 1758The default is undefined 1759.Dv NKPTADD 1760and 1761.Dv NKPTADDSHIFT=24 , 1762allowing for 16 buffers per megabyte of main memory (while 1763a GENERIC kernel allocates about half of that). 1764When you get "can't get KPT page" panics, you should increase 1765.Dv NKPTADD 1766(if defined), or decrease 1767.Dv NKPTADDSHIFT 1768by one. 1769.It Cd options P5PPC68KBOARD 1770Add special support for Phase5 mixed 68k+PPC boards. 1771Currently, this only affects rebooting from 1772.Nx 1773and is only needed on 68040+PPC, not on 177468060+PPC; without this, affected machines will hang after 1775.Nx 1776has shut 1777down and will only restart after a keyboard reset or a power cycle. 1778.El 1779.Ss arm32-specific Options 1780.Bl -ohang 1781.It Cd options FRENCH_KBD 1782Include translation for French keyboards when using 1783.Em pccons 1784on a Shark. 1785.It Cd options FINNISH_KBD 1786Include translation for Finnish keyboards when using 1787.Em pccons 1788on a Shark. 1789.It Cd options GERMAN_KBD 1790Include translation for German keyboards when using 1791.Em pccons 1792on a Shark. 1793.It Cd options NORWEGIAN_KBD 1794Include translation for French keyboards when using 1795.Em pccons 1796on a Shark. 1797.El 1798.Ss atari-specific Options 1799.Bl -ohang 1800.It Cd options DISKLABEL_AHDI 1801Include support for AHDI (native Atari) disklabels. 1802.It Cd options DISKLABEL_NBDA 1803Include support for 1804.Nx Ns Tn /atari 1805labels. 1806If you don't set this option, it will be set automatically. 1807.Nx Ns Tn /atari 1808will not work without it. 1809.It Cd options FALCON_SCSI 1810Include support for the 5380-SCSI configuration as found on the Falcon. 1811.It Cd options RELOC_KERNEL 1812If set, the kernel will relocate itself to TT-RAM, if possible. 1813This will give you a slightly faster system. 1814.Em Beware 1815that on some TT030 systems, 1816the system will frequently dump with MMU-faults with this option enabled. 1817.It Cd options SERCONSOLE 1818Allow the modem1-port to act as the system-console. 1819A carrier should be active on modem1 during system boot to active 1820the console functionality. 1821.It Cd options TT_SCSI 1822Include support for the 5380-SCSI configuration as found on the TT030 1823and Hades. 1824.El 1825.Ss i386-specific Options 1826.Bl -ohang 1827.It Cd options I386_CPU,I486_CPU,I586_CPU,I686_CPU 1828Include support for a particular class of 1829.Tn CPU 1830.Po 1831.Tn i386 , 1832.Tn i486 , 1833.Tn Pentium , 1834or 1835.Tn Pentium Pro 1836.Pc . 1837If the appropriate class for your 1838.Tn CPU 1839is not configured, the kernel will use the highest class available 1840that will work. 1841In general, using the correct 1842.Tn CPU 1843class will result in the best performance. 1844At least one of these options must be present. 1845.It Cd options CPURESET_DELAY=value 1846specifies the time (in millisecond) to wait before doing a hardware reset 1847in the last phase of a reboot. 1848This gives the user a chance to see error messages from the shutdown 1849operations (like NFS unmounts, buffer cache flush, etc ...). 1850Setting this to 0 will disable the delay. 1851Default is 2 seconds. 1852.It Cd options MATH_EMULATE 1853Include the floating point emulator. 1854This is useful only for 1855.Tn CPU Ns s 1856that lack an 1857internal Floating Point Unit 1858.Pq Tn FPU 1859or co-processor. 1860.It Cd options VM86 1861Include support for virtual 8086 mode, used by 1862.Tn DOS 1863emulators and X servers to run BIOS code, e.g. for some VESA routines. 1864.It Cd options USER_LDT 1865Include i386-specific system calls for modifying the local descriptor table, 1866used by Windows emulators. 1867.It Cd options REALBASEMEM=integer 1868Overrides the base memory size passed in from the boot block. 1869(Value given in kilobytes.) 1870Use this option only if the boot block reports the size incorrectly. 1871(Note that some 1872.Tn BIOS Ns es 1873put the extended 1874.Tn BIOS 1875data area at the top of base memory, and therefore report a smaller 1876base memory size to prevent programs overwriting it. 1877This is correct behavior, and you should not use the 1878.Em REALBASEMEM 1879option to access this memory). 1880.It Cd options REALEXTMEM=integer 1881Overrides the extended memory size passed in from the boot block. 1882(Value given in kilobytes. 1883Extended memory does not include the first megabyte.) 1884Use this option only if the boot block reports the size incorrectly. 1885.It Cd options FRENCH_KBD,FINNISH_KBD,GERMAN_KBD,NORWEGIAN_KBD 1886Select a non-US keyboard layout for the 1887.Em pccons 1888console driver. 1889.It Cd options CYRIX_CACHE_WORKS 1890Relevant only to the Cyrix 486DLC cpu. 1891This option is used to turn on the cache in hold-flush mode. 1892It is not turned on by default because it is known to have problems in 1893certain motherboard implementations. 1894.It Cd options CYRIX_CACHE_REALLY_WORKS 1895Relevant only to the Cyrix 486DLC cpu. 1896This option is used to turn on the cache in write-back mode. 1897It is not turned on by default because it is known to have problems in 1898certain motherboard implementations. 1899In order for this option to take effect, option 1900.Em CYRIX_CACHE_WORKS 1901must also be specified. 1902.It Cd options PCIBIOS 1903Enable support for initializing the 1904.Tn PCI 1905bus using information from the 1906.Tn BIOS . 1907See 1908.Xr pcibios 4 1909for details. 1910.It Cd options KSTACK_CHECK_DR0 1911Detect kernel stack overflow using DR0 register. 1912This option uses DR0 register exclusively so you can't use DR0 register for 1913other purpose (e.g. hardware breakpoint) if you turn this on. 1914.El 1915.Ss isa-specific Options 1916Options specific to 1917.Xr isa 4 1918busses. 1919.Bl -ohang 1920.It Cd options PCIC_ISA_ALLOC_IOBASE=address, PCIC_ISA_ALLOC_IOSIZE=size 1921Control the section of IO bus space used for PCMCIA bus space mapping. 1922Ideally the probed defaults are satisfactory, however in practice 1923that is not always the case. 1924See 1925.Xr pcmcia 4 1926for details. 1927.It Cd options PCIC_ISA_INTR_ALLOC_MASK=mask 1928Controls the allowable interrupts that may be used for 1929.Tn PCMCIA 1930devices. 1931This mask is a logical-or of power-of-2s of allowable interrupts: 1932.Bd -literal -offset 04n 1933.Em "IRQ Val IRQ Val IRQ Val IRQ Val" 1934 0 0x0001 4 0x0010 8 0x0100 12 0x1000 1935 1 0x0002 5 0x0020 9 0x0200 13 0x2000 1936 2 0x0004 6 0x0040 10 0x0400 14 0x4000 1937 3 0x0008 7 0x0080 11 0x0800 15 0x8000 1938.Ed 1939.El 1940.Ss m68k-specific Options 1941.Bl -ohang 1942.It Cd options FPU_EMULATE 1943Include support for MC68881/MC68882 emulator. 1944.It Cd options FPSP 1945Include support for 68040 floating point. 1946.It Cd options M68020,M68030,M68040,M68060 1947Include support for a specific 1948.Tn CPU , 1949at least one (the one you are using) should be specified. 1950.It Cd options M060SP 1951Include software support for 68060. 1952This provides emulation of unimplemented 1953integer instructions as well as emulation of unimplemented floating point 1954instructions and data types and software support for floating point traps. 1955.El 1956.Ss sparc-specific Options 1957.Bl -ohang 1958.It Cd options AUDIO_DEBUG 1959Enable simple event debugging of the logging of the 1960.Xr audio 4 1961device. 1962.It Cd options BLINK 1963Enable blinking of LED. 1964Blink rate is full cycle every N seconds for 1965N \*[Lt] then current load average. 1966See 1967.Xr getloadavg 3 . 1968.\" .It Cd options COLORFONT_CACHE 1969.\" this is totally fucked up.. what does this do? 1970.It Cd options COUNT_SW_LEFTOVERS 1971Count how many times the sw SCSI device has left 3, 2, 1 and 0 in the 1972sw_3_leftover, sw_2_leftover, sw_1_leftover, and sw_0_leftover 1973variables accessible from 1974.Xr ddb 4 . 1975See 1976.Xr sw 4 . 1977.It Cd options DEBUG_ALIGN 1978Adds debugging messages calls when user-requested alignment fault 1979handling happens. 1980.It Cd options DEBUG_EMUL 1981Adds debugging messages calls for emulated floating point and 1982alignment fixing operations. 1983.It Cd options DEBUG_SVR4 1984Prints registers messages calls for emulated SVR4 getcontext and 1985setcontext operations. 1986See 1987.Em options COMPAT_SVR4 . 1988.It Cd options EXTREME_DEBUG 1989Adds debugging functions callable from 1990.Xr ddb 4 . 1991The debug_pagetables, test_region and print_fe_map 1992functions print information about page tables for the SUN4M 1993platforms only. 1994.It Cd options EXTREME_EXTREME_DEBUG 1995Adds extra info to 1996.Em options EXTREME_DEBUG . 1997.It Cd options FPU_CONTEXT 1998Make 1999.Em options COMPAT_SVR4 2000getcontext and setcontext include floating point registers. 2001.It Cd options MAGMA_DEBUG 2002Adds debugging messages to the 2003.Xr magma 4 2004device. 2005.It Cd options RASTERCONS_FULLSCREEN 2006Use the entire screen for the console. 2007.It Cd options RASTERCONS_SMALLFONT 2008Use the Fixed font on the console, instead of the normal font. 2009.It Cd options SUN4 2010Support sun4 class machines. 2011.It Cd options SUN4C 2012Support sun4c class machines. 2013.It Cd options SUN4M 2014Support sun4m class machines. 2015.It Cd options SUN4_MMU3L 2016.\" XXX ??? 2017Enable support for sun4 3-level MMU machines. 2018.It Cd options V9 2019Enable SPARC V9 assembler in 2020.Xr ddb 4 . 2021.El 2022.Ss sparc64-specific Options 2023.Bl -ohang 2024.It Cd options AUDIO_DEBUG 2025Enable simple event debugging of the logging of the 2026.Xr audio 4 2027device. 2028.It Cd options BLINK 2029Enable blinking of LED. 2030Blink rate is full cycle every N seconds for 2031N \*[Lt] then current load average. 2032See 2033.Xr getloadavg 3 . 2034.El 2035.Ss x68k-specific Options 2036.Bl -ohang 2037.It Cd options EXTENDED_MEMORY 2038Include support for extended memory e.g. TS-6BE16 and 060turbo on-board. 2039.It Cd options JUPITER 2040Include support for Jupiter-X MPU accelerator 2041.It Cd options ZSCONSOLE,ZSCN_SPEED=value 2042Use the built-in serial port as the system-console. 2043Speed is specified in bps, defaults to 9600. 2044.It Cd options ITE_KERNEL_ATTR=value 2045Set the kernel message attribute for ITE. 2046Value, an integer, is a logical or of the following values: 2047.Bl -tag -width 4n -compact -offset indent 2048.It 1 2049color inversed 2050.It 2 2051underlined 2052.It 4 2053bolded 2054.El 2055.El 2056.\" The following requests should be uncommented and used where appropriate. 2057.\" .Sh FILES 2058.\" .Sh EXAMPLES 2059.Sh SEE ALSO 2060.Xr gdb 1 , 2061.Xr ktrace 1 , 2062.Xr pmc 1 , 2063.Xr quota 1 , 2064.Xr gettimeofday 2 , 2065.Xr i386_iopl 2 , 2066.Xr msgctl 2 , 2067.Xr msgget 2 , 2068.Xr msgrcv 2 , 2069.Xr msgsnd 2 , 2070.Xr ntp_adjtime 2 , 2071.Xr ntp_gettime 2 , 2072.Xr semctl 2 , 2073.Xr semget 2 , 2074.Xr semop 2 , 2075.Xr shmat 2 , 2076.Xr shmctl 2 , 2077.Xr shmdt 2 , 2078.Xr shmget 2 , 2079.Xr sysctl 3 , 2080.Xr apm 4 , 2081.Xr ddb 4 , 2082.Xr inet 4 , 2083.Xr iso 4 , 2084.Xr lkm 4 , 2085.Xr md 4 , 2086.Xr ns 4 , 2087.Xr pcibios 4 , 2088.Xr pcmcia 4 , 2089.Xr ppp 4 , 2090.Xr userconf 4 , 2091.Xr wscons 4 , 2092.Xr config 8 , 2093.Xr edquota 8 , 2094.Xr init 8 , 2095.Xr mdsetimage 8 , 2096.Xr mount_cd9660 8 , 2097.Xr mount_fdesc 8 , 2098.Xr mount_kernfs 8 , 2099.Xr mount_lfs 8 , 2100.Xr mount_mfs 8 , 2101.Xr mount_msdos 8 , 2102.Xr mount_nfs 8 , 2103.Xr mount_ntfs 8 , 2104.Xr mount_null 8 , 2105.Xr mount_portal 8 , 2106.Xr mount_procfs 8 , 2107.Xr mount_umap 8 , 2108.Xr mount_union 8 , 2109.Xr mrouted 8 , 2110.Xr newfs_lfs 8 , 2111.Xr ntpd 8 , 2112.Xr quotaon 8 , 2113.Xr rpc.rquotad 8 , 2114.Xr sysctl 8 2115.Sh HISTORY 2116The 2117.Nm 2118man page first appeared in 2119.Nx 1.3 . 2120.Sh BUGS 2121The 2122.Em INET 2123and the 2124.Em VNODEPAGER 2125options should not be required. 2126The 2127.Em EON 2128option should be a pseudo-device, and is also very fragile. 2129