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