1.\" $NetBSD: options.4,v 1.416 2012/05/25 15:54:02 tsutsui Exp $ 2.\" 3.\" Copyright (c) 1996 4.\" Perry E. Metzger. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgment: 16.\" This product includes software developed for the NetBSD Project 17.\" by Perry E. Metzger. 18.\" 4. The name of the author may not be used to endorse or promote products 19.\" derived from this software without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31.\" 32.\" 33.Dd May 25, 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 854.Lk http://www.coda.cs.cmu.edu 855for more details. 856.Em NOTE : 857You also need to enable the pseudo-device, vcoda, for the Coda 858file system to work. 859.It Cd file-system SMBFS 860.Bq Em EXPERIMENTAL 861Includes code for the SMB/CIFS file system. 862See 863.Xr mount_smbfs 8 864for details. 865.Em NOTE : 866You also need to enable the pseudo-device, nsmb, for the SMB 867file system to work. 868.It Cd file-system PTYFS 869.Bq Em EXPERIMENTAL 870Includes code for a special file system (normally mounted on 871.Pa /dev/pts ) 872in which pseudo-terminal slave devices become visible in the file system. 873See 874.Xr mount_ptyfs 8 875for details. 876.It Cd file-system TMPFS 877Includes code for the efficient memory file system, normally used over 878.Pa /tmp . 879See 880.Xr mount_tmpfs 8 881for details. 882.It Cd file-system PUFFS 883Includes kernel support for the pass-to-userspace framework file system. 884It can be used to implement file system functionality in userspace. 885See 886.Xr puffs 3 887for more details. 888This enables for example sshfs: 889.Xr mount_psshfs 8 . 890.El 891.Ss File System Options 892.Bl -ohang 893.It Cd options MAGICLINKS 894Enables the expansion of special strings 895.Po 896beginning with 897.Dq @ 898.Pc 899when traversing symbolic links. 900See 901.Xr symlink 7 902for a list of supported strings. 903Note that this option only controls the enabling of this feature 904by the kernel at boot-up. 905This feature can still be manipulated with the 906.Xr sysctl 8 907command regardless of the setting of this option. 908.It Cd options NFSSERVER 909Include the server side of the 910.Em NFS 911(Network File System) remote file sharing protocol. 912Although the bulk of the code implementing 913.Em NFS 914is kernel based, several user level daemons are needed for it to 915work. 916See 917.Xr mountd 8 918and 919.Xr nfsd 8 920for details. 921.It Cd options QUOTA 922Enables kernel support for file system quotas. 923See 924.Xr quotaon 8 , 925.Xr edquota 8 , 926and 927.Xr quota 1 928for details. 929Note that quotas only work on 930.Dq ffs 931file systems, although 932.Xr rpc.rquotad 8 933permits them to be accessed over 934.Em NFS . 935.It Cd options QUOTA2 936Enables kernel support for the new file system quotas format. 937See 938.Xr tunefs 8 , 939.Xr newfs 8 , 940.Xr mount_mfs 8 , 941.Xr edquota 8 , 942and 943.Xr quota 1 944for details. 945Note that quota2 is only supported by 946.Dq ffs 947and 948.Dq mfs 949file systems at this time. 950.It Cd options FFS_EI 951Enable ``Endian-Independent'' FFS support. 952This allows a system to mount an FFS file system created for another 953architecture, at a small performance cost for all FFS file systems. 954See also 955.Xr newfs 8 , 956.Xr fsck_ffs 8 , 957.Xr dumpfs 8 958for file system byte order status and manipulation. 959.It Cd options FFS_NO_SNAPSHOT 960Disable the 961.Dq file system snapshot 962support in FFS file systems. 963Maybe useful for install media kernels, small memory systems and 964embedded systems which don't require the snapshot support. 965.It Cd options UFS_EXTATTR 966Enable extended attribute support for UFS1 filesystems. 967.It Cd options WAPBL 968Enable 969.Dq Write Ahead Physical Block Logging file system journaling . 970This provides rapid file system consistency checking after a system outage. 971It also provides better general use performance over regular FFS. 972See also 973.Xr wapbl 4 . 974.It Cd options NVNODE=integer 975This option sets the size of the cache used by the name-to-inode translation 976routines, (a.k.a. the 977.Fn namei 978cache, though called by many other names in the kernel source). 979By default, this cache has 980.Dv NPROC 981(set as 20 + 16 * MAXUSERS) * (80 + NPROC / 8) entries. 982A reasonable way to derive a value of 983.Dv NVNODE , 984should you notice a large number of namei cache misses with a tool such as 985.Xr systat 1 , 986is to examine your system's current computed value with 987.Xr sysctl 8 , 988(which calls this parameter "kern.maxvnodes") and to increase this value 989until either the namei cache hit rate improves or it is determined that 990your system does not benefit substantially from an increase in the size of 991the namei cache. 992.It Cd options NAMECACHE_ENTER_REVERSE 993Causes the namei cache to always enter a reverse mapping (vnode -\*[Gt] name) 994as well as a normal one. 995Normally, this is already done for directory vnodes, to speed up the getcwd 996operation. 997This option will cause longer hash chains in the reverse cache, and thus 998slow down getcwd somewhat. 999However, it does make vnode -\*[Gt] path translations possible in some cases. 1000For now, only useful if strict /proc/#/maps emulation for Linux binaries is 1001required. 1002.It Cd options EXT2FS_SYSTEM_FLAGS 1003This option changes the behavior of the APPEND and IMMUTABLE flags 1004for a file on an 1005.Em ext2 1006file system. 1007Without this option, the superuser or owner of the file can 1008set and clear them. 1009With this option, only the superuser can set them, and 1010they can't be cleared if the securelevel is greater than 0. 1011See also 1012.Xr chflags 1 1013and 1014.Xr secmodel_securelevel 9 . 1015.It Cd options NFS_BOOT_BOOTP 1016Enable use of the BOOTP protocol (RFCs 951 and 1048) to get configuration 1017information if NFS is used to mount the root file system. 1018See 1019.Xr diskless 8 1020for details. 1021.It Cd options NFS_BOOT_BOOTSTATIC 1022Enable use of static values defined as 1023.Dq NFS_BOOTSTATIC_MYIP , 1024.Dq NFS_BOOTSTATIC_GWIP , 1025.Dq NFS_BOOTSTATIC_SERVADDR , 1026and 1027.Dq NFS_BOOTSTATIC_SERVER 1028in kernel options to get configuration information 1029if NFS is used to mount the root file system. 1030.It Cd options NFS_BOOT_DHCP 1031Same as 1032.Dq NFS_BOOT_BOOTP , 1033but use the DHCP extensions to the 1034BOOTP protocol (RFC 1541). 1035.It Cd options NFS_BOOT_BOOTP_REQFILE 1036Specifies the string sent in the bp_file field of the BOOTP / DHCP 1037request packet. 1038.It Cd options NFS_BOOT_BOOTPARAM 1039Enable use of the BOOTPARAM protocol, consisting of RARP and 1040BOOTPARAM RPC, to get configuration information if NFS 1041is used to mount the root file system. 1042See 1043.Xr diskless 8 1044for details. 1045.It Cd options NFS_BOOT_RWSIZE=value 1046Set the initial NFS read and write sizes for diskless-boot requests. 1047The normal default is 8Kbytes. 1048This option provides a way to lower the value (e.g., to 1024 bytes) 1049as a workaround for buggy network interface cards or boot PROMs. 1050Once booted, the read and write request sizes can be increased by 1051remounting the file system. 1052See 1053.Xr mount_nfs 8 1054for details. 1055.It Cd options NFS_V2_ONLY 1056Reduce the size of the NFS client code by omitting code that's only required 1057for NFSv3 and NQNFS support, leaving only that code required to use NFSv2 1058servers. 1059.It Cd options UFS_DIRHASH 1060Increase lookup performance by maintaining in-core hash tables 1061for large directories. 1062.El 1063.Ss Buffer queue strategy options 1064The following options enable alternative buffer queue strategies. 1065.Bl -ohang 1066.It Cd options BUFQ_READPRIO 1067Enable experimental buffer queue strategy for disk I/O. 1068In the default strategy, outstanding disk requests are ordered by 1069sector number and sent to the disk, regardless of whether the 1070operation is a read or write; this option gives priority to issuing 1071read requests over write requests. 1072Although requests may therefore be issued out of sector-order, causing 1073more seeks and thus lower overall throughput, interactive system 1074responsiveness under heavy disk I/O load may be improved, as processes 1075blocking on disk reads are serviced sooner (file writes typically 1076don't cause applications to block). 1077The performance effect varies greatly depending on the hardware, drive 1078firmware, file system configuration, workload, and desired performance 1079trade-off. 1080Systems using drive write-cache (most modern IDE disks, by default) 1081are unlikely to benefit and may well suffer; such disks acknowledge 1082writes very quickly, and optimize them internally according to 1083physical layout. 1084Giving these disks as many requests to work with as possible (the 1085standard strategy) will typically produce the best results, especially 1086if the drive has a large cache; the drive will silently complete 1087writes from cache as it seeks for reads. 1088Disks that support a large number of concurrent tagged requests (SCSI 1089disks and many hardware RAID controllers) expose this internal 1090scheduling with tagged responses, and don't block for reads; such 1091disks may not see a noticeable difference with either strategy. 1092However, if IDE disks are run with write-cache disabled for safety, 1093writes are not acknowledged until actually completed, and only one 1094request can be outstanding; a large number of small writes in one 1095locality can keep the disk busy, starving reads elsewhere on the disk. 1096Such systems are likely to see the most benefit from this option. 1097Finally, the performance interaction of this option with ffs soft 1098dependencies can be subtle, as that mechanism can drastically alter 1099the workload for file system metadata writes. 1100.It Cd options BUFQ_PRIOCSCAN 1101Enable another buffer queue strategy for disk I/O, per-priority cyclical scan. 1102.It Cd options NEW_BUFQ_STRATEGY 1103Synonym of 1104.Em BUFQ_READPRIO . 1105.El 1106.Ss Miscellaneous Options 1107.Bl -ohang 1108.It Cd options CPU_UCODE 1109Support cpu microcode loading via 1110.Xr cpuctl 8 . 1111.It Cd options MEMORY_DISK_DYNAMIC 1112This option makes the 1113.Xr md 4 1114.Tn RAM 1115disk size dynamically sized. 1116It is incompatible with 1117.Xr mdsetimage 8 . 1118.It Cd options MEMORY_DISK_HOOKS 1119This option allows for some machine dependent functions to be called when 1120the 1121.Xr md 4 1122.Tn RAM 1123disk driver is configured. 1124This can result in automatically loading a 1125.Tn RAM 1126disk from floppy on open (among other things). 1127.It Cd options MEMORY_DISK_IS_ROOT 1128Forces the 1129.Xr md 4 1130.Tn RAM 1131disk to be the root device. 1132This can only be overridden when 1133the kernel is booted in the 'ask-for-root' mode. 1134.It Cd options MEMORY_DISK_ROOT_SIZE=integer 1135Allocates the given number of 512 byte blocks as memory for the 1136.Xr md 4 1137.Tn RAM 1138disk, to be populated with 1139.Xr mdsetimage 8 . 1140.It Cd options MEMORY_DISK_SERVER=0 1141Do not include the interface to a userland memory disk server process. 1142Per default, this option is set to 1, including the support code. 1143Useful for install media kernels. 1144.It Cd options MEMORY_DISK_RBFLAGS=value 1145This option sets the 1146.Xr reboot 2 1147flags used when booting with a memory disk as root file system. 1148Possible values include 1149.Dv RB_AUTOBOOT 1150(boot in the usual fashion - default value), and 1151.Dv RB_SINGLE 1152(boot in single-user mode). 1153.It Cd options MODULAR 1154Enables the framework for kernel modules (see 1155.Xr module 7 ) . 1156.It Cd options VND_COMPRESSION 1157Enables the 1158.Xr vnd 4 1159driver to also handle compressed images. 1160See 1161.Xr vndcompress 1 , 1162.Xr vnd 4 1163and 1164.Xr vnconfig 8 1165for more information. 1166.It Cd options SPLDEBUG 1167Help the kernel programmer find bugs related to the interrupt priority 1168level. 1169When 1170.Fn spllower 1171or 1172.Fn splraise 1173changes the current CPU's interrupt priority level to or from 1174.Dv IPL_HIGH , 1175record a backtrace. 1176Read 1177.Xr return_address 9 1178for caveats about collecting backtraces. 1179This feature is experimental, and it is only available on i386. 1180See 1181.Pa sys/kern/subr_spldebug.c . 1182.It Cd options TFTPROOT 1183Download the root memory disk through TFTP at root mount time. 1184This enables the use of a root 1185.Tn RAM 1186disk without requiring it to be embedded in the kernel using 1187.Xr mdsetimage 8 . 1188The 1189.Tn RAM 1190disk name is obtained using DHCP's filename parameter. 1191This option requires 1192.Em MEMORY_DISK_HOOKS , 1193.Em MEMORY_DISK_DYNAMIC , 1194and 1195.Em MEMORY_DISK_IS_ROOT . 1196It is incompatible with 1197.Em MEMORY_DISK_ROOT_SIZE . 1198.It Cd options MALLOC_NOINLINE 1199Time critical fixed size memory allocation is performed with 1200.Fn MALLOC 1201and 1202.Fn FREE . 1203Normally these expand to inline code, but with 1204.Em MALLOC_NOINLINE 1205these call the normal 1206.Fn malloc 1207and 1208.Fn free 1209functions. 1210Useful for install media kernels, small memory systems and embedded systems. 1211.It Cd options HZ=integer 1212On ports that support it, set the system clock frequency (see 1213.Xr hz 9 ) 1214to the supplied value. 1215Handle with care. 1216.It Cd options NTP 1217Turns on in-kernel precision timekeeping support used by software 1218implementing 1219.Em NTP 1220(Network Time Protocol, RFC 1305). 1221The 1222.Em NTP 1223option adds an in-kernel Phase-Locked Loop (PLL) for normal 1224.Em NTP 1225operation, and a Frequency-Locked Loop (FLL) for intermittently-connected 1226operation. 1227.Xr ntpd 8 1228will employ a user-level PLL when kernel support is unavailable, 1229but the in-kernel version has lower latency and more precision, and 1230so typically keeps much better time. 1231.Pp 1232The interface to the kernel 1233.Em NTP 1234support is provided by the 1235.Xr ntp_adjtime 2 1236and 1237.Xr ntp_gettime 2 1238system calls, which are intended for use by 1239.Xr ntpd 8 1240and are enabled by the option. 1241On systems with sub-microsecond resolution timers, or where (HZ / 100000) 1242is not an integer, the 1243.Em NTP 1244option also enables extended-precision arithmetic to keep track of 1245fractional clock ticks at NTP time-format precision. 1246.It Cd options PPS_SYNC 1247This option enables a kernel serial line discipline for receiving time 1248phase signals from an external reference clock such as a radio clock. 1249.Po 1250The 1251.Em NTP 1252option (which see) must be on if the 1253.Em PPS_SYNC 1254option is used 1255.Pc . 1256Some reference clocks generate a Pulse Per Second (PPS) signal in 1257phase with their time source. 1258The 1259.Em PPS 1260line discipline receives this signal on either the data leads 1261or the DCD control lead of a serial port. 1262.Pp 1263.Em NTP 1264uses the PPS signal to discipline the local clock oscillator to a high 1265degree of precision (typically less than 50 microseconds in time and 12660.1 ppm in accuracy). 1267.Em PPS 1268can also generate a serial output pulse when the system receives a PPS 1269interrupt. 1270This can be used to measure the system interrupt latency and thus calibrate 1271.Em NTP 1272to account for it. 1273Using 1274.Em PPS 1275usually requires a gadget box 1276to convert from 1277.Tn TTL 1278to 1279.Tn RS-232 1280signal levels. 1281The gadget box and PPS are described in more detail in the HTML documentation 1282for 1283.Xr ntpd 8 1284in 1285.Pa /usr/share/doc/html/ntp . 1286.Pp 1287.Nx 1288currently supports this option in 1289.Xr com 4 1290and 1291.Xr zsc 4 . 1292.It Cd options SETUIDSCRIPTS 1293Allows scripts with the setuid bit set to execute as the effective 1294user rather than the real user, just like binary executables. 1295.Pp 1296.Em NOTE : 1297Using this option will also enable 1298.Em options FDSCRIPTS 1299.It Cd options FDSCRIPTS 1300Allows execution of scripts with the execute bit set, but not the 1301read bit, by opening the file and passing the file descriptor to 1302the shell, rather than the filename. 1303.Pp 1304.Em NOTE : 1305Execute only (non-readable) scripts will have 1306.Va argv[0] 1307set to 1308.Pa /dev/fd/* . 1309What this option allows as far as security is 1310concerned, is the ability to safely ensure that the correct script 1311is run by the interpreter, as it is passed as an already open file. 1312.It Cd options PUCCN 1313Enables treating serial ports found on PCI boards 1314.Xr puc 4 1315as potential console devices. 1316The method for choosing such a console device is port dependent. 1317.It Cd options RTC_OFFSET=integer 1318The kernel (and typically the hardware battery backed-up clock on 1319those machines that have one) keeps time in 1320.Em UTC 1321(Universal Coordinated Time, once known as 1322.Em GMT , 1323or Greenwich Mean Time) 1324and not in the time of the local time zone. 1325The 1326.Em RTC_OFFSET 1327option is used on some ports (such as the i386) to tell the kernel 1328that the hardware clock is offset from 1329.Em UTC 1330by the specified number of minutes. 1331This is typically used when a machine boots several operating 1332systems and one of them wants the hardware clock to run in the 1333local time zone and not in 1334.Em UTC , 1335e.g. 1336.Em RTC_OFFSET=300 1337means 1338the hardware clock is set to US Eastern Time (300 minutes behind 1339.Em UTC ) , 1340and not 1341.Em UTC . 1342(Note: 1343.Em RTC_OFFSET 1344is used to initialize a kernel variable named 1345.Va rtc_offset 1346which is the source actually used to determine the clock offset, and 1347which may be accessed via the kern.rtc_offset sysctl variable. 1348See 1349.Xr sysctl 8 1350and 1351.Xr sysctl 3 1352for details. 1353Since the kernel clock is initialized from the hardware clock very 1354early in the boot process, it is not possible to meaningfully change 1355.Va rtc_offset 1356in system initialization scripts. 1357Changing this value currently may only be done at kernel compile 1358time or by patching the kernel and rebooting). 1359.Pp 1360.Em NOTE : 1361Unfortunately, in many cases where the hardware clock 1362is kept in local time, it is adjusted for Daylight Savings 1363Time; this means that attempting to use 1364.Em RTC_OFFSET 1365to let 1366.Nx 1367coexist with such an operating system, like Windows, 1368would necessitate changing 1369.Em RTC_OFFSET 1370twice a year. 1371As such, this solution is imperfect. 1372.It Cd options KMEMSTATS 1373The kernel memory allocator, 1374.Xr malloc 9 , 1375will keep statistics on its performance if this option is enabled. 1376Unfortunately, this option therefore essentially disables the 1377.Fn MALLOC 1378and 1379.Fn FREE 1380forms of the memory allocator, which are used to enhance the performance 1381of certain critical sections of code in the kernel. 1382This option therefore can lead to a significant decrease in the 1383performance of certain code in the kernel if enabled. 1384Examples of such code include the 1385.Fn namei 1386routine, the 1387.Xr ccd 4 1388driver, 1389and much of the networking code. 1390.It Cd options MAXUPRC=integer 1391Sets the soft 1392.Dv RLIMIT_NPROC 1393resource limit, which specifies the maximum number of simultaneous 1394processes a user is permitted to run, for process 0; 1395this value is inherited by its child processes. 1396It defaults to 1397.Em CHILD_MAX , 1398which is currently defined to be 160. 1399Setting 1400.Em MAXUPRC 1401to a value less than 1402.Em CHILD_MAX 1403is not permitted, as this would result in a violation of the semantics of 1404.St -p1003.1-90 . 1405.It Cd options NOFILE=integer 1406Sets the soft 1407.Dv RLIMIT_NOFILE 1408resource limit, which specifies the maximum number of open 1409file descriptors for each process; 1410this value is inherited by its child processes. 1411It defaults to 1412.Em OPEN_MAX , 1413which is currently defined to be 64. 1414.It Cd options MAXFILES=integer 1415Sets the default value of the 1416.Em kern.maxfiles 1417sysctl variable, which indicates the maximum number of files that may 1418be open in the system. 1419.It Cd options DEFCORENAME=string 1420Sets the default value of the 1421.Em kern.defcorename 1422sysctl variable, otherwise it is set to 1423.Nm %n.core . 1424See 1425.Xr sysctl 8 1426and 1427.Xr sysctl 3 1428for details. 1429.It Cd options RASOPS_CLIPPING 1430Enables clipping within the 1431.Nm rasops 1432raster-console output system. 1433.Em NOTE : 1434only available on architectures that use 1435.Nm rasops 1436for console output. 1437.It Cd options RASOPS_SMALL 1438Removes optimized character writing code from the 1439.Nm rasops 1440raster-console output system. 1441.Em NOTE : 1442only available on architectures that use 1443.Nm rasops 1444for console output. 1445.It Cd options INCLUDE_CONFIG_FILE 1446Embeds the kernel config file used to define the kernel in the kernel 1447binary itself. 1448The embedded data also includes any files directly included by the config 1449file itself, e.g. 1450.Pa GENERIC.local 1451or 1452.Pa std.$MACHINE . 1453The embedded config file can be extracted from the resulting kernel with 1454.Xr config 1 1455.Fl x , 1456or by the following command: 1457.Bd -literal -offset indent 1458strings netbsd | sed -n 's/^_CFG_//p' | unvis 1459.Ed 1460.It Cd options INCLUDE_JUST_CONFIG 1461Similar to the above option, but includes just the actual config file, 1462not any included files. 1463.It Cd options PIPE_SOCKETPAIR 1464Use slower, but smaller socketpair(2)-based pipe implementation instead 1465of default faster, but bigger one. 1466Primarily useful for installation kernels. 1467.It Cd options USERCONF 1468Compiles in the in-kernel device configuration manager. 1469See 1470.Xr userconf 4 1471for details. 1472.It Cd options PERFCTRS 1473Compiles in kernel support for CPU performance-monitoring counters. 1474See 1475.Xr pmc 1 1476for details. 1477.Em NOTE : 1478not available on all architectures. 1479.It Cd options SYSCALL_STATS 1480Count the number of times each system call number is called. 1481The values can be read through the sysctl interface and displayed using 1482.Xr systat 1 . 1483.Em NOTE : 1484not yet available on all architectures. 1485.It Cd options SYSCALL_TIMES 1486Count the time spent (using 1487.Fn cpu_counter32 ) 1488in each system call. 1489.Em NOTE : 1490Using this option will also enable 1491.Cd options SYSCALL_STATS . 1492.It Cd options SYSCALL_TIMES_HASCOUNTER 1493Force use of 1494.Fn cpu_counter32 1495even if 1496.Fn cpu_hascounter 1497reports false. 1498Useful for systems where the cycle counter doesn't run at a constant rate 1499(e.g. Soekris boxes). 1500.It Cd options XSERVER_DDB 1501A supplement to XSERVER that adds support for entering 1502.Xr ddb 4 1503while in 1504.Tn X11 . 1505.It Cd options FILEASSOC 1506Support for 1507.Xr fileassoc 9 . 1508.It Cd options FILEASSOC_NHOOKS=integer 1509Number of storage slots per file for 1510.Xr fileassoc 9 . 1511Default is 4. 1512.El 1513.Ss Networking Options 1514.Bl -ohang 1515.It Cd options GATEWAY 1516Enables 1517.Em IPFORWARDING 1518(which see) 1519and (on most ports) increases the size of 1520.Em NMBCLUSTERS 1521(which see). 1522In general, 1523.Em GATEWAY 1524is used to indicate that a system should act as a router, and 1525.Em IPFORWARDING 1526is not invoked directly. 1527(Note that 1528.Em GATEWAY 1529has no impact on protocols other than 1530.Tn IP , 1531such as 1532.Tn CLNP ) . 1533.Em GATEWAY 1534option also compiles IPv4 and IPv6 fast forwarding code into the kernel. 1535.It Cd options ICMPPRINTFS 1536The 1537.Em ICMPPRINTFS 1538option will enable debugging information to be printed about 1539the 1540.Xr icmp 4 1541protocol. 1542.It Cd options IPFORWARDING=value 1543If 1544.Em value 1545is 1 this enables IP routing behavior. 1546If 1547.Em value 1548is 0 (the default), it disables it. 1549The 1550.Em GATEWAY 1551option sets this to 1 automatically. 1552With this option enabled, the machine will forward IP datagrams destined 1553for other machines between its interfaces. 1554Note that even without this option, the kernel will 1555still forward some packets (such as source routed packets) -- removing 1556.Em GATEWAY 1557and 1558.Em IPFORWARDING 1559is insufficient to stop all routing through a bastion host on a 1560firewall -- source routing is controlled independently. 1561To turn off source routing, use 1562.Em options IPFORWSRCRT=0 1563(which see). 1564Note that IP forwarding may be turned on and off independently of the 1565setting of the 1566.Em IPFORWARDING 1567option through the use of the 1568.Em net.inet.ip.forwarding 1569sysctl variable. 1570If 1571.Em net.inet.ip.forwarding 1572is 1, IP forwarding is on. 1573See 1574.Xr sysctl 8 1575and 1576.Xr sysctl 3 1577for details. 1578.It Cd options IPFORWSRCRT=value 1579If 1580.Em value 1581is set to zero, source routing of IP datagrams is turned off. 1582If 1583.Em value 1584is set to one (the default) or the option is absent, source routed IP 1585datagrams are forwarded by the machine. 1586Note that source routing of IP packets may be turned on and off 1587independently of the setting of the 1588.Em IPFORWSRCRT 1589option through the use of the 1590.Em net.inet.ip.forwsrcrt 1591sysctl variable. 1592If 1593.Em net.inet.ip.forwsrcrt 1594is 1, forwarding of source routed IP datagrams is on. 1595See 1596.Xr sysctl 8 1597and 1598.Xr sysctl 3 1599for details. 1600.It Cd options IFA_STATS 1601Tells the kernel to maintain per-address statistics on bytes sent 1602and received over (currently) Internet and AppleTalk addresses. 1603.\"This can be a fairly expensive operation, so you probably want to 1604.\"keep this disabled. 1605The option is not recommended as it degrades system stability. 1606.It Cd options IFQ_MAXLEN=value 1607Increases the allowed size of the network interface packet queues. 1608The default queue size is 50 packets, and you do not normally need 1609to increase it. 1610.It Cd options IPSELSRC 1611Includes support for source-address selection policies. 1612See 1613.Xr in_getifa 9 . 1614.It Cd options MROUTING 1615Includes support for IP multicast routers. 1616You certainly want 1617.Em INET 1618with this. 1619Multicast routing is controlled by the 1620.Xr mrouted 8 1621daemon. 1622See also option 1623.Cd PIM . 1624.It Cd options PIM 1625Includes support for Protocol Independent Multicast (PIM) routing. 1626You need 1627.Em MROUTING 1628and 1629.Em INET 1630with this. 1631Software using this can be found e.g. in 1632.Pa pkgsrc/net/xorp . 1633.It Cd options INET 1634Includes support for the 1635.Tn TCP/IP 1636protocol stack. 1637You almost certainly want this. 1638See 1639.Xr inet 4 1640for details. 1641.It Cd options INET6 1642Includes support for the 1643.Tn IPv6 1644protocol stack. 1645See 1646.Xr inet6 4 1647for details. 1648Unlike 1649.Em INET , 1650.Em INET6 1651enables multicast routing code as well. 1652This option requires 1653.Em INET 1654at this moment, but it should not. 1655.It Cd options ND6_DEBUG 1656The option sets the default value of net.inet6.icmp6.nd6_debug to 1, 1657for debugging IPv6 neighbor discovery protocol handling. 1658See 1659.Xr sysctl 3 1660for details. 1661.It Cd options IPSEC 1662Includes support for the 1663.Tn IPsec 1664protocol, using the FAST_IPSEC implementation. 1665See 1666.Xr fast_ipsec 4 1667for details. 1668(This option is an alias for the 1669.Cd FAST_IPSEC 1670option described below.) 1671.It Cd options IPSEC_DEBUG 1672Enables debugging code in 1673.Tn IPsec 1674stack. 1675See 1676.Xr ipsec 4 1677for details. 1678.It Cd options FAST_IPSEC 1679Includes support for the 1680.Tn IPsec 1681protocol, using the implementation derived from 1682.Ox , 1683relaying on 1684.Xr opencrypto 9 1685to carry out cryptographic operations. 1686See 1687.Xr fast_ipsec 4 1688for details. 1689.It Cd options IPSEC_NAT_T 1690Includes support for 1691.Tn IPsec 1692Network Address Translator traversal (NAT-T), as described in RFCs 3947 1693and 3948. 1694This feature might be patent-encumbered in some countries. 1695.It Cd options ALTQ 1696Enabled ALTQ (Alternate Queueing). 1697For simple rate-limiting, use 1698.Xr tbrconfig 8 1699to set up the interface transmission rate. 1700To use queueing disciplines, their appropriate kernel options should also 1701be defined (documented below). 1702Queueing disciplines are managed by 1703.Xr altqd 8 . 1704See 1705.Xr altq 9 1706for details. 1707.It Cd options ALTQ_HFSC 1708Include support for ALTQ-implemented HFSC (Hierarchical Fair Service Curve) 1709module. 1710HFSC supports both link-sharing and guaranteed real-time services. 1711HFSC employs a service curve based QoS model, and its unique feature 1712is an ability to decouple delay and bandwidth allocation. 1713Requires 1714.Em ALTQ_RED 1715to use the RED queueing discipline on HFSC classes, or 1716.Em ALTQ_RIO 1717to use the RIO queueing discipline on HFSC classes. 1718This option assumes 1719.Em ALTQ . 1720.It Cd options ALTQ_PRIQ 1721Include support for ALTQ-implemented PRIQ (Priority Queueing). 1722PRIQ implements a simple priority-based queueing discipline. 1723A higher priority class is always served first. 1724Requires 1725.Em ALTQ_RED 1726to use the RED queueing discipline on HFSC classes, or 1727.Em ALTQ_RIO 1728to use the RIO queueing discipline on HFSC classes. 1729This option assumes 1730.Em ALTQ . 1731.It Cd options ALTQ_WFQ 1732Include support for ALTQ-implemented WFQ (Weighted Fair Queueing). 1733WFQ implements a weighted-round robin scheduler for a set of queues. 1734A weight can be assigned to each queue to give a different proportion 1735of the link capacity. 1736A hash function is used to map a flow to one of a set of queues. 1737This option assumes 1738.Em ALTQ . 1739.It Cd options ALTQ_FIFOQ 1740Include support for ALTQ-implemented FIFO queueing. 1741FIFOQ is a simple drop-tail FIFO (First In, First Out) queueing discipline. 1742This option assumes 1743.Em ALTQ . 1744.It Cd options ALTQ_RIO 1745Include support for ALTQ-implemented RIO (RED with In/Out). 1746The original RIO has 2 sets of RED parameters; one for in-profile 1747packets and the other for out-of-profile packets. 1748At the ingress of the network, profile meters tag packets as IN or 1749OUT based on contracted profiles for customers. 1750Inside the network, IN packets receive preferential treatment by 1751the RIO dropper. 1752ALTQ/RIO has 3 drop precedence levels defined for the Assured Forwarding 1753PHB of DiffServ (RFC 2597). 1754This option assumes 1755.Em ALTQ . 1756.It Cd options ALTQ_BLUE 1757Include support for ALTQ-implemented Blue buffer management. 1758Blue is another active buffer management mechanism. 1759This option assumes 1760.Em ALTQ . 1761.It Cd options ALTQ_FLOWVALVE 1762Include support for ALTQ-implemented Flowvalve. 1763Flowvalve is a simple implementation of a RED penalty box that identifies 1764and punishes misbehaving flows. 1765This option requires 1766.Em ALTQ_RED 1767and assumes 1768.Em ALTQ . 1769.It Cd options ALTQ_CDNR 1770Include support for ALTQ-implemented CDNR (diffserv traffic conditioner) 1771packet marking/manipulation. 1772Traffic conditioners are components to meter, mark, or drop incoming 1773packets according to some rules. 1774As opposed to queueing disciplines, traffic conditioners handle incoming 1775packets at an input interface. 1776This option assumes 1777.Em ALTQ . 1778.It Cd options ALTQ_NOPCC 1779Disables use of processor cycle counter to measure time in ALTQ. 1780This option should be defined for a non-Pentium i386 CPU which does not 1781have TSC, SMP (per-CPU counters are not in sync), or power management 1782which affects processor cycle counter. 1783This option assumes 1784.Em ALTQ . 1785.It Cd options ALTQ_IPSEC 1786Include support for IPsec in IPv4 ALTQ. 1787This option assumes 1788.Em ALTQ . 1789.It Cd options ALTQ_JOBS 1790Include support for ALTQ-implemented JoBS (Joint Buffer Management 1791and Scheduling). 1792This option assumes 1793.Em ALTQ . 1794.It Cd options ALTQ_AFMAP 1795Include support for an undocumented ALTQ feature that is used to map an IP 1796flow to an ATM VC (Virtual Circuit). 1797This option assumes 1798.Em ALTQ . 1799.It Cd options ALTQ_LOCALQ 1800Include support for ALTQ-implemented local queues. 1801Its practical use is undefined. 1802Assumes 1803.Em ALTQ . 1804.It Cd options SUBNETSARELOCAL 1805Sets default value for net.inet.ip.subnetsarelocal variable, which 1806controls whether non-directly-connected subnets of connected networks 1807are considered "local" for purposes of choosing the MSS for a TCP 1808connection. 1809This is mostly present for historic reasons and completely irrelevant if 1810you enable Path MTU discovery. 1811.It Cd options HOSTZEROBROADCAST 1812Sets default value for net.inet.ip.hostzerobroadcast variable, which 1813controls whether the zeroth host address of each connected subnet is 1814also considered a broadcast address. 1815Default value is "1", for compatibility with old systems; if this is 1816set to zero on all hosts on a subnet, you should be able to fit an extra 1817host per subnet on the 1818".0" address. 1819.It Cd options MCLSHIFT=value 1820This option is the base-2 logarithm of the size of mbuf clusters. 1821The 1822.Bx 1823networking stack keeps network packets in a linked 1824list, or chain, of kernel buffer objects called mbufs. 1825The system provides larger mbuf clusters as an optimization for 1826large packets, instead of using long chains for large packets. 1827The mbuf cluster size, 1828or 1829.Em MCLBYTES , 1830must be a power of two, and is computed as two raised to the power 1831.Em MCLSHIFT . 1832On systems with Ethernet network adapters, 1833.Em MCLSHIFT 1834is often set to 11, giving 2048-byte mbuf clusters, large enough to 1835hold a 1500-byte 1836.Tn Ethernet 1837frame in a single cluster. 1838Systems with network interfaces supporting larger frame sizes like 1839.Tn ATM , 1840.Tn FDDI , 1841or 1842.Tn HIPPI 1843may perform better with 1844.Em MCLSHIFT 1845set to 12 or 13, giving mbuf cluster sizes of 4096 and 8192 bytes, 1846respectively. 1847.It Cd options ISO,TPIP 1848Include support for the ubiquitous 1849.Tn OSI 1850protocol stack. 1851See 1852.Xr iso 4 1853for details. 1854This option assumes 1855.Em INET . 1856.It Cd options EON 1857Include support for tunneling 1858.Tn OSI 1859protocols over 1860.Tn IP . 1861Known to be broken, or at least very fragile, and undocumented. 1862.It Cd options NETATALK 1863Include support for the 1864.Tn AppleTalk 1865protocol stack. 1866The kernel provides provision for the 1867.Em Datagram Delivery Protocol 1868(DDP), providing SOCK_DGRAM support and 1869.Tn AppleTalk 1870routing. 1871This stack is used by the 1872.Em NETATALK 1873package, which adds support for 1874.Tn AppleTalk 1875server services via user libraries and applications. 1876.It Cd options BLUETOOTH 1877Include support for the 1878.Tn Bluetooth 1879protocol stack. 1880See 1881.Xr bluetooth 4 1882for details. 1883.It Cd options IPNOPRIVPORTS 1884Normally, only root can bind a socket descriptor to a so-called 1885.Dq privileged 1886.Tn TCP 1887port, that is, a port number in the range 0-1023. 1888This option eliminates those checks from the kernel. 1889This can be useful if there is a desire to allow daemons without 1890privileges to bind those ports, e.g., on firewalls. 1891The security tradeoffs in doing this are subtle. 1892This option should only be used by experts. 1893.It Cd options TCP_COMPAT_42 1894.Tn TCP 1895bug compatibility with 1896.Bx 4.2 . 1897In 1898.Bx 4.2 , 1899.Tn TCP 1900sequence numbers were 32-bit signed values. 1901Modern implementations of TCP use unsigned values. 1902This option clamps the initial sequence number to start in 1903the range 2^31 rather than the full unsigned range of 2^32. 1904Also, under 1905.Bx 4.2 , 1906keepalive packets must contain at least one byte or else 1907the remote end would not respond. 1908.It Cd options TCP_DEBUG 1909Record the last 1910.Em TCP_NDEBUG 1911TCP packets with SO_DEBUG set, and decode to the console if 1912.Em tcpconsdebug 1913is set. 1914.It Cd options TCP_NDEBUG 1915Number of packets to record for 1916.Em TCP_DEBUG . 1917Defaults to 100. 1918.It Cd options TCP_SENDSPACE=value 1919.It Cd options TCP_RECVSPACE=value 1920These options set the max TCP window size to other sizes than the default. 1921The TCP window sizes can be altered via 1922.Xr sysctl 8 1923as well. 1924.It Cd options TCP_INIT_WIN=value 1925This option sets the initial TCP window size for non-local connections, 1926which is used when the transmission starts. 1927The default size is 1, but if the machine should act more aggressively, 1928the initial size can be set to some other value. 1929The initial TCP window size can be set via 1930.Xr sysctl 8 1931as well. 1932.It Cd options PFIL_HOOKS 1933This option turns on the packet filter interface hooks. 1934See 1935.Xr pfil 9 1936for details. 1937This option assumes 1938.Em INET . 1939.It Cd options IPFILTER_LOG 1940This option, in conjunction with 1941.Em pseudo-device ipfilter , 1942enables logging of IP packets using IP-Filter. 1943.It Cd options IPFILTER_LOOKUP 1944This option enables the 1945IP-Filter 1946.Xr ippool 8 1947functionality to be enabled. 1948.It Cd options IPFILTER_COMPAT 1949This option enables older IP-Filter binaries to work. 1950.It Cd options IPFILTER_DEFAULT_BLOCK 1951This option sets the default policy of IP-Filter. 1952If it is set, IP-Filter will block packets by default. 1953.It Cd options BRIDGE_IPF 1954This option causes 1955.Em bridge 1956devices to use the IP and/or IPv6 filtering hooks, forming 1957a link-layer filter that uses protocol-layer rules. 1958This option assumes the presence of 1959.Em pseudo-device ipfilter . 1960.It Cd options MBUFTRACE 1961This option can help track down mbuf leaks. 1962When enabled, mbufs are tagged with the devices and protocols using them, 1963which slightly decreases network performance. 1964This additional information can be viewed with 1965.Xr netstat 1 : 1966.Dl Ic netstat Fl mssv 1967Not all devices or protocols support this option. 1968.El 1969.Ss Sysctl Related Options 1970.Bl -ohang 1971.It Cd options SYSCTL_DISALLOW_CREATE 1972Disallows the creation or deletion of nodes from the sysctl tree, as 1973well as the assigning of descriptions to nodes that lack them, by any 1974process. 1975These operations are still available to kernel sub-systems, including 1976loadable kernel modules. 1977.It Cd options SYSCTL_DISALLOW_KWRITE 1978Prevents processes from adding nodes to the sysctl tree that make 1979existing kernel memory areas writable. 1980Sections of kernel memory can still be read and new nodes that own 1981their own data may still be writable. 1982.It Cd options SYSCTL_DEBUG_SETUP 1983Causes the SYSCTL_SETUP routines to print a brief message when they 1984are invoked. 1985This is merely meant as an aid in determining the order in which 1986sections of the tree are created. 1987.It Cd options SYSCTL_DEBUG_CREATE 1988Prints a message each time 1989.Fn sysctl_create , 1990the function that adds nodes to the tree, is called. 1991.It Cd options SYSCTL_INCLUDE_DESCR 1992Causes the kernel to include short, human readable descriptions for 1993nodes in the sysctl tree. 1994The descriptions can be retrieved programmatically (see 1995.Xr sysctl 3 ) , 1996or by the sysctl binary itself (see 1997.Xr sysctl 8 ) . 1998The descriptions are meant to give an indication of the purpose and/or 1999effects of a given node's value, not replace the documentation for the 2000given subsystem as a whole. 2001.El 2002.Ss System V IPC Options 2003.Bl -ohang 2004.It Cd options SYSVMSG 2005Includes support for 2006.At V 2007style message queues. 2008See 2009.Xr msgctl 2 , 2010.Xr msgget 2 , 2011.Xr msgrcv 2 , 2012.Xr msgsnd 2 . 2013.It Cd options SYSVSEM 2014Includes support for 2015.At V 2016style semaphores. 2017See 2018.Xr semctl 2 , 2019.Xr semget 2 , 2020.Xr semop 2 . 2021.It Cd options SEMMNI=value 2022Sets the number of 2023.At V 2024style semaphore identifiers. 2025The GENERIC config file for your port will have the default. 2026.It Cd options SEMMNS=value 2027Sets the number of 2028.At V 2029style semaphores in the system. 2030The GENERIC config file for your port will have the default. 2031.It Cd options SEMUME=value 2032Sets the maximum number of undo entries per process for 2033.At V 2034style semaphores. 2035The GENERIC config file for your port will have the default. 2036.It Cd options SEMMNU=value 2037Sets the number of undo structures in the system for 2038.At V 2039style semaphores. 2040The GENERIC config file for your port will have the default. 2041.It Cd options SYSVSHM 2042Includes support for 2043.At V 2044style shared memory. 2045See 2046.Xr shmat 2 , 2047.Xr shmctl 2 , 2048.Xr shmdt 2 , 2049.Xr shmget 2 . 2050.It Cd options SHMMAXPGS=value 2051Sets the maximum number of 2052.At V 2053style shared memory pages that are available through the 2054.Xr shmget 2 2055system call. 2056Default value is 1024 on most ports. 2057See 2058.Pa /usr/include/machine/vmparam.h 2059for the default. 2060.El 2061.Ss VM Related Options 2062.Bl -ohang 2063.It Cd options NMBCLUSTERS=value 2064The number of mbuf clusters the kernel supports. 2065Mbuf clusters are MCLBYTES in size (usually 2k). 2066This is used to compute the size of the kernel VM map 2067.Em mb_map , 2068which maps mbuf clusters. 2069Default on most ports is 1024 (2048 with 2070.Dq options GATEWAY 2071). 2072See 2073.Pa /usr/include/machine/param.h 2074for exact default information. 2075Increase this value if you get 2076.Dq mclpool limit reached 2077messages. 2078.It Cd options NKMEMPAGES=value 2079.It Cd options NKMEMPAGES_MIN=value 2080.It Cd options NKMEMPAGES_MAX=value 2081Size of kernel VM map 2082.Em kmem_map , 2083in PAGE_SIZE-sized chunks (the VM page size; this value may be read 2084from the 2085.Xr sysctl 8 2086variable 2087.Em hw.pagesize 2088). 2089This VM map is used to map the kernel malloc arena. 2090The kernel attempts to auto-size this map based on the amount of 2091physical memory in the system. 2092Platform-specific code may place bounds on this computed size, 2093which may be viewed with the 2094.Xr sysctl 8 2095variable 2096.Em vm.nkmempages . 2097See 2098.Pa /usr/include/machine/param.h 2099for the default upper and lower bounds. 2100The related options 2101.Sq NKMEMPAGES_MIN 2102and 2103.Sq NKMEMPAGES_MAX 2104allow the bounds to be overridden in the kernel configuration file. 2105These options are provided in the event the computed value is 2106insufficient resulting in an 2107.Dq out of space in kmem_map 2108panic. 2109.It Cd options SB_MAX=value 2110Sets the max size in bytes that a socket buffer is allowed to occupy. 2111The default is 256k, but sometimes it needs to be increased, for example 2112when using large TCP windows. 2113This option can be changed via 2114.Xr sysctl 8 2115as well. 2116.It Cd options SOMAXKVA=value 2117Sets the maximum size of kernel virtual memory that the socket buffers 2118are allowed to use. 2119The default is 16MB, but in situations where for example large TCP 2120windows are used this value must also be increased. 2121This option can be changed via 2122.Xr sysctl 8 2123as well. 2124.It Cd options BUFCACHE=value 2125Size of the buffer cache as a percentage of total available 2126.Tn RAM . 2127Ignored if BUFPAGES is also specified. 2128.It Cd options NBUF=value 2129Sets the number of buffer headers available, i.e., the number of 2130open files that may have a buffer cache entry. 2131Each buffer header 2132requires MAXBSIZE (machine dependent, but usually 65536) bytes. 2133The default value is machine dependent, but is usually equal to the 2134value of BUFPAGES. 2135If an architecture dependent VM_MAX_KERNEL_BUF constant is defined 2136then NBUF may be reduced at run time so that the storage allocated 2137for buffer headers doesn't exceed that limit. 2138.It Cd options BUFPAGES=value 2139These options set the number of pages available for the buffer cache. 2140Their default value is a machine dependent value, often calculated as 2141between 5% and 10% of total available 2142.Tn RAM . 2143.It Cd options MAXTSIZ=bytes 2144Sets the maximum size limit of a process' text segment. 2145See 2146.Pa /usr/include/machine/vmparam.h 2147for the port-specific default. 2148.It Cd options DFLDSIZ=bytes 2149Sets the default size limit of a process' data segment, the value that 2150will be returned as the soft limit for 2151.Dv RLIMIT_DATA 2152(as returned by 2153.Xr getrlimit 2 ) . 2154See 2155.Pa /usr/include/machine/vmparam.h 2156for the port-specific default. 2157.It Cd options MAXDSIZ=bytes 2158Sets the maximum size limit of a process' data segment, the value that 2159will be returned as the hard limit for 2160.Dv RLIMIT_DATA 2161(as returned by 2162.Xr getrlimit 2 ) . 2163See 2164.Pa /usr/include/machine/vmparam.h 2165for the port-specific default. 2166.It Cd options DFLSSIZ=bytes 2167Sets the default size limit of a process' stack segment, the value that 2168will be returned as the soft limit for 2169.Dv RLIMIT_STACK 2170(as returned by 2171.Xr getrlimit 2 ) . 2172See 2173.Pa /usr/include/machine/vmparam.h 2174for the port-specific default. 2175.It Cd options MAXSSIZ=bytes 2176Sets the maximum size limit of a process' stack segment, the value that 2177will be returned as the hard limit for 2178.Dv RLIMIT_STACK 2179(as returned by 2180.Xr getrlimit 2 ) . 2181See 2182.Pa /usr/include/machine/vmparam.h 2183for the port-specific default. 2184.It Cd options DUMP_ON_PANIC=integer 2185Defaults to one. 2186If set to zero, the kernel will not dump to the dump device when 2187it panics, though dumps can still be forced via 2188.Xr ddb 4 2189with the 2190.Dq sync 2191command. 2192Note that this sets the value of the 2193.Em kern.dump_on_panic 2194.Xr sysctl 3 2195variable which may be changed at run time -- see 2196.Xr sysctl 8 2197for details. 2198.It Cd options USE_TOPDOWN_VM 2199User space memory allocations (as made by 2200.Xr mmap 2 ) 2201will be arranged in a 2202.Dq top down 2203fashion instead of the traditional 2204.Dq upwards from MAXDSIZ \&+ vm_daddr 2205method. 2206This includes the placement of 2207.Xr ld.so 1 . 2208Arranging memory in this manner allows either (or both of) the heap or 2209.Xr mmap 2 2210allocated space to grow larger than traditionally possible. 2211This option is not available on all ports, but is instead expected to be 2212offered on a port-by-port basis, after which some ports will commit to 2213using it by default. 2214See the files 2215.Pa /usr/include/uvm/uvm_param.h 2216for some implementation details, and 2217.Pa /usr/include/machine/vmparam.h 2218for port specific details including availability. 2219.It Cd options VMSWAP 2220Enable paging device/file support. 2221This option is on by default. 2222.It Cd options PDPOLICY_CLOCKPRO 2223Use CLOCK-Pro, an alternative page replace policy. 2224.El 2225.Ss Security Options 2226.Bl -ohang 2227.It Cd options INSECURE 2228Hardwires the kernel security level at \-1. 2229This means that the system 2230always runs in secure level \-1 mode, even when running multiuser. 2231See the manual page for 2232.Xr init 8 2233for details on the implications of this. 2234The kernel secure level may manipulated by the superuser by altering the 2235.Em kern.securelevel 2236.Xr sysctl 3 2237variable (the secure level may only be lowered by a call from process ID 1, 2238i.e., 2239.Xr init 8 ) . 2240See also 2241.Xr secmodel_securelevel 9 , 2242.Xr sysctl 8 2243and 2244.Xr sysctl 3 . 2245.It Cd options VERIFIED_EXEC_FP_MD5 2246Enables support for MD5 hashes in Veriexec. 2247.It Cd options VERIFIED_EXEC_FP_SHA1 2248Enables support for SHA1 hashes in Veriexec. 2249.It Cd options VERIFIED_EXEC_FP_RMD160 2250Enables support for RMD160 hashes in Veriexec. 2251.It Cd options VERIFIED_EXEC_FP_SHA256 2252Enables support for SHA256 hashes in Veriexec. 2253.It Cd options VERIFIED_EXEC_FP_SHA384 2254Enables support for SHA384 hashes in Veriexec. 2255.It Cd options VERIFIED_EXEC_FP_SHA512 2256Enables support for SHA512 hashes in Veriexec. 2257.It Cd options PAX_MPROTECT=value 2258Enables PaX MPROTECT, 2259.Xr mprotect 2 2260restrictions from the PaX project. 2261.Pp 2262The 2263.Ar value 2264is the default value for the 2265.Em global 2266knob, see 2267.Xr sysctl 3 . 2268If 0, PaX MPROTECT will be enabled only if explicitly set on programs 2269using 2270.Xr paxctl 8 . 2271If 1, PaX MPROTECT will be enabled for all programs. 2272Programs can be exempted using 2273.Xr paxctl 8 . 2274.Pp 2275See 2276.Xr security 7 2277for more details. 2278.It Cd options PAX_SEGVGUARD=value 2279Enables PaX Segvguard. 2280.Pp 2281The 2282.Ar value 2283is the default value for the 2284.Em global 2285knob, see 2286.Xr sysctl 3 . 2287If 0, PaX Segvguard will be enabled only if explicitly set on programs 2288using 2289.Xr paxctl 8 . 2290If 1, PaX Segvguard will be enabled to all programs, and exemption can 2291be done using 2292.Xr paxctl 8 . 2293.Pp 2294See 2295.Xr security 7 2296for more details. 2297.It Cd options PAX_ASLR=value 2298Enables PaX ASLR. 2299.Pp 2300The 2301.Ar value 2302is the default value for the 2303.Em global 2304knob, see 2305.Xr sysctl 3 . 2306If 0, PaX ASLR will be enabled only if explicitly set on programs 2307using 2308.Xr paxctl 8 . 2309If 1, PaX ASLR will be enabled to all programs, and exemption can 2310be done using 2311.Xr paxctl 8 . 2312.Pp 2313See 2314.Xr security 7 2315for more details. 2316.It Cd options USER_VA0_DISABLE_DEFAULT=value 2317Sets the initial value of the flag which controls whether user programs 2318can map virtual address 0. 2319The flag can be changed at runtime by 2320.Xr sysctl 3 . 2321.El 2322.Ss amiga-specific Options 2323.Bl -ohang 2324.It Cd options BB060STUPIDROM 2325When the bootloader (which passes 2326.Tn AmigaOS 2327.Tn ROM 2328information) claims we have a 68060 2329.Tn CPU 2330without 2331.Tn FPU , 2332go look into the Processor Configuration Register (PCR) to find out. 2333You need this with 2334.Tn Amiga 2335.Tn ROM Ns s 2336up to (at least) V40.xxx (OS3.1), 2337when you boot via the bootblocks and don't have a DraCo. 2338.It Cd options IOBZCLOCK=frequency 2339The IOBlix boards come with two different serial master clocks: older ones 2340use 24 MHz, newer ones use 22.1184 MHz. 2341The driver normally assumes the latter. 2342If your board uses 24 MHz, you can recompile your kernel with 2343options IOBZCLOCK=24000000 2344or patch the kernel variable 2345.Tn iobzclock 2346to the same value. 2347.It Cd options LIMITMEM=value 2348If there, limit the part of the first memory bank used by 2349.Nx 2350to value megabytes. 2351Default is unlimited. 2352.It Cd options NKPTADD=addvalue 2353.It Cd options NKPTADDSHIFT=shiftvalue 2354The 2355.Tn CPU 2356specific 2357.Tn MMU 2358table for the kernel is pre-allocated at kernel startup time. 2359Part of it is scaled with 2360.Va maxproc , 2361to have enough room to hold the user program 2362.Tn MMU 2363tables; the second part is a fixed amount for the kernel itself. 2364.Pp 2365The third part accounts for the size of the file buffer cache. 2366Its size is either 2367.Dv NKPTADD 2368pages (if defined) or memory size in bytes divided by two to 2369the power of 2370.Dv NKPTADDSHIFT . 2371The default is undefined 2372.Dv NKPTADD 2373and 2374.Dv NKPTADDSHIFT=24 , 2375allowing for 16 buffers per megabyte of main memory (while 2376a GENERIC kernel allocates about half of that). 2377When you get "can't get KPT page" panics, you should increase 2378.Dv NKPTADD 2379(if defined), or decrease 2380.Dv NKPTADDSHIFT 2381by one. 2382.It Cd options P5PPC68KBOARD 2383Add special support for Phase5 mixed 68k+PPC boards. 2384Currently, this only affects rebooting from 2385.Nx 2386and is only needed on 68040+PPC, not on 238768060+PPC; without this, affected machines will hang after 2388.Nx 2389has shut 2390down and will only restart after a keyboard reset or a power cycle. 2391.El 2392.Ss atari-specific Options 2393.Bl -ohang 2394.It Cd options DISKLABEL_AHDI 2395Include support for AHDI (native Atari) disklabels. 2396.It Cd options DISKLABEL_NBDA 2397Include support for 2398.Nx Ns Tn /atari 2399labels. 2400If you don't set this option, it will be set automatically. 2401.Nx Ns Tn /atari 2402will not work without it. 2403.It Cd options FALCON_SCSI 2404Include support for the 5380-SCSI configuration as found on the Falcon. 2405.It Cd options RELOC_KERNEL 2406If set, the kernel will relocate itself to TT-RAM, if possible. 2407This will give you a slightly faster system. 2408.Em Beware 2409that on some TT030 systems, 2410the system will frequently dump with MMU-faults with this option enabled. 2411.It Cd options SERCONSOLE 2412Allow the modem1-port to act as the system-console. 2413A carrier should be active on modem1 during system boot to active 2414the console functionality. 2415.It Cd options TT_SCSI 2416Include support for the 5380-SCSI configuration as found on the TT030 2417and Hades. 2418.El 2419.Ss i386-specific Options 2420.Bl -ohang 2421.It Cd options CPURESET_DELAY=value 2422Specifies the time (in millisecond) to wait before doing a hardware reset 2423in the last phase of a reboot. 2424This gives the user a chance to see error messages from the shutdown 2425operations (like NFS unmounts, buffer cache flush, etc ...). 2426Setting this to 0 will disable the delay. 2427Default is 2 seconds. 2428.It Cd options VM86 2429Include support for virtual 8086 mode, used by 2430.Tn DOS 2431emulators and X servers to run BIOS code, e.g., for some VESA routines. 2432.It Cd options USER_LDT 2433Include i386-specific system calls for modifying the local descriptor table, 2434used by Windows emulators. 2435.It Cd options PAE 2436Enable 2437.Tn PAE (Physical Address Extension) 2438mode. 2439.Tn PAE 2440permits up to 36 bits physical addressing (64GB of physical memory), and 2441turns physical addresses to 64 bits entities in the memory management 2442subsystem. 2443Userland virtual address space remains at 32 bits (4GB). 2444.Tn PAE 2445mode is required to enable the 2446.Tn NX/XD (No-eXecute/eXecute Disable) 2447bit for pages, which allows marking certain ones as not being executable. 2448Any attempt to execute code from such a page will raise an exception. 2449.It Cd options REALBASEMEM=integer 2450Overrides the base memory size passed in from the boot block. 2451(Value given in kilobytes.) 2452Use this option only if the boot block reports the size incorrectly. 2453(Note that some 2454.Tn BIOS Ns es 2455put the extended 2456.Tn BIOS 2457data area at the top of base memory, and therefore report a smaller 2458base memory size to prevent programs overwriting it. 2459This is correct behavior, and you should not use the 2460.Em REALBASEMEM 2461option to access this memory). 2462.It Cd options REALEXTMEM=integer 2463Overrides the extended memory size passed in from the boot block. 2464(Value given in kilobytes. 2465Extended memory does not include the first megabyte.) 2466Use this option only if the boot block reports the size incorrectly. 2467.It Cd options CYRIX_CACHE_WORKS 2468Relevant only to the Cyrix 486DLC CPU. 2469This option is used to turn on the cache in hold-flush mode. 2470It is not turned on by default because it is known to have problems in 2471certain motherboard implementations. 2472.It Cd options CYRIX_CACHE_REALLY_WORKS 2473Relevant only to the Cyrix 486DLC CPU. 2474This option is used to turn on the cache in write-back mode. 2475It is not turned on by default because it is known to have problems in 2476certain motherboard implementations. 2477In order for this option to take effect, option 2478.Em CYRIX_CACHE_WORKS 2479must also be specified. 2480.It Cd options PCIBIOS 2481Enable support for initializing the 2482.Tn PCI 2483bus using information from the 2484.Tn BIOS . 2485See 2486.Xr pcibios 4 2487for details. 2488.It Cd options KSTACK_CHECK_DR0 2489Detect kernel stack overflow using DR0 register. 2490This option uses DR0 register exclusively so you can't use DR0 register for 2491other purpose (e.g., hardware breakpoint) if you turn this on. 2492.It Cd options MTRR 2493Include support for accessing MTRR registers from user-space. 2494See 2495.Xr i386_get_mtrr 2 . 2496.It Cd options BEEP_ONHALT 2497Make the system speaker emit several beeps when it is completely safe to 2498power down the computer after a 2499.Xr halt 8 2500command. 2501Requires 2502.Xr sysbeep 4 2503support. 2504.It Cd options BEEP_ONHALT_COUNT=times 2505Number of times to beep the speaker when 2506.Cd options BEEP_ONHALT 2507is enabled. 2508Defaults to 3. 2509.It Cd options BEEP_ONHALT_PITCH=hz 2510The tone frequency used when 2511.Cd options BEEP_ONHALT 2512option, in hertz. 2513Defaults to 1500. 2514.It Cd options BEEP_ONHALT_PERIOD=msecs 2515The duration of each beep when 2516.Cd options BEEP_ONHALT 2517is enabled, in milliseconds. 2518Defaults to 250. 2519.It Cd options MULTIBOOT 2520Makes the kernel Multiboot-compliant, allowing it to be booted through 2521a Multiboot-compliant boot manager such as GRUB. 2522See 2523.Xr multiboot 8 2524for more information. 2525.It Cd options SPLASHSCREEN 2526Display a splash screen during boot. 2527.It Cd options SPLASHSCREEN_PROGRESS 2528Display a progress bar at the splash screen during boot. 2529This option requires 2530.Em SPLASHSCREEN . 2531.El 2532.Ss isa-specific Options 2533Options specific to 2534.Xr isa 4 2535busses. 2536.Bl -ohang 2537.It Cd options PCIC_ISA_ALLOC_IOBASE=address, PCIC_ISA_ALLOC_IOSIZE=size 2538Control the section of IO bus space used for PCMCIA bus space mapping. 2539Ideally the probed defaults are satisfactory, however in practice 2540that is not always the case. 2541See 2542.Xr pcmcia 4 2543for details. 2544.It Cd options PCIC_ISA_INTR_ALLOC_MASK=mask 2545Controls the allowable interrupts that may be used for 2546.Tn PCMCIA 2547devices. 2548This mask is a logical-or of power-of-2s of allowable interrupts: 2549.Bd -literal -offset 04n 2550.Em "IRQ Val IRQ Val IRQ Val IRQ Val" 2551 0 0x0001 4 0x0010 8 0x0100 12 0x1000 2552 1 0x0002 5 0x0020 9 0x0200 13 0x2000 2553 2 0x0004 6 0x0040 10 0x0400 14 0x4000 2554 3 0x0008 7 0x0080 11 0x0800 15 0x8000 2555.Ed 2556.It Cd options PCKBC_CNATTACH_SELFTEST 2557Perform a self test of the keyboard controller before attaching it as a 2558console. 2559This might be necessary on machines where we boot on cold iron, and 2560pckbc refuses to talk until we request a self test. 2561Currently only the netwinder port uses it. 2562.It Cd options PCKBD_CNATTACH_MAY_FAIL 2563If this option is set the PS/2 keyboard will not be used as the console 2564if it cannot be found during boot. 2565This allows other keyboards, like USB, to be the console keyboard. 2566.It Cd options PCKBD_LAYOUT=layout 2567Sets the default keyboard layout, see 2568.Xr pckbd 4 . 2569.El 2570.Ss m68k-specific Options 2571.Bl -ohang 2572.It Cd options FPU_EMULATE 2573Include support for MC68881/MC68882 emulator. 2574.It Cd options FPSP 2575Include support for 68040 floating point. 2576.It Cd options M68020,M68030,M68040,M68060 2577Include support for a specific 2578.Tn CPU , 2579at least one (the one you are using) should be specified. 2580.It Cd options M060SP 2581Include software support for 68060. 2582This provides emulation of unimplemented 2583integer instructions as well as emulation of unimplemented floating point 2584instructions and data types and software support for floating point traps. 2585.El 2586.Ss powerpc-specific Options (OEA Only) 2587.Bl -ohang 2588.It Cd options PMAP_MEMLIMIT=value 2589Limit the amount of memory seen by the kernel to 2590.Ar value 2591bytes. 2592.It Cd options PTEGCOUNT=value 2593Specify the size of the page table as 2594.Ar value 2595PTE groups. 2596Normally, one PTEG is allocated per physical page frame. 2597.El 2598.Ss sparc-specific Options 2599.Bl -ohang 2600.It Cd options AUDIO_DEBUG 2601Enable simple event debugging of the logging of the 2602.Xr audio 4 2603device. 2604.It Cd options BLINK 2605Enable blinking of LED. 2606Blink rate is full cycle every N seconds for 2607N \*[Lt] then current load average. 2608See 2609.Xr getloadavg 3 . 2610.\" .It Cd options COLORFONT_CACHE 2611.\" What does this do? 2612.It Cd options COUNT_SW_LEFTOVERS 2613Count how many times the sw SCSI device has left 3, 2, 1 and 0 in the 2614sw_3_leftover, sw_2_leftover, sw_1_leftover, and sw_0_leftover 2615variables accessible from 2616.Xr ddb 4 . 2617See 2618.Xr sw 4 . 2619.It Cd options DEBUG_ALIGN 2620Adds debugging messages calls when user-requested alignment fault 2621handling happens. 2622.It Cd options DEBUG_EMUL 2623Adds debugging messages calls for emulated floating point and 2624alignment fixing operations. 2625.It Cd options DEBUG_SVR4 2626Prints registers messages calls for emulated SVR4 getcontext and 2627setcontext operations. 2628See 2629.Em options COMPAT_SVR4 . 2630.It Cd options EXTREME_DEBUG 2631Adds debugging functions callable from 2632.Xr ddb 4 . 2633The debug_pagetables, test_region and print_fe_map 2634functions print information about page tables for the SUN4M 2635platforms only. 2636.It Cd options EXTREME_EXTREME_DEBUG 2637Adds extra info to 2638.Em options EXTREME_DEBUG . 2639.It Cd options FPU_CONTEXT 2640Make 2641.Em options COMPAT_SVR4 2642getcontext and setcontext include floating point registers. 2643.It Cd options MAGMA_DEBUG 2644Adds debugging messages to the 2645.Xr magma 4 2646device. 2647.It Cd options RASTERCONS_FULLSCREEN 2648Use the entire screen for the console. 2649.It Cd options RASTERCONS_SMALLFONT 2650Use the Fixed font on the console, instead of the normal font. 2651.It Cd options SUN4 2652Support sun4 class machines. 2653.It Cd options SUN4C 2654Support sun4c class machines. 2655.It Cd options SUN4M 2656Support sun4m class machines. 2657.It Cd options SUN4_MMU3L 2658.\" XXX ??? 2659Enable support for sun4 3-level MMU machines. 2660.It Cd options V9 2661Enable SPARC V9 assembler in 2662.Xr ddb 4 . 2663.El 2664.Ss sparc64-specific Options 2665.Bl -ohang 2666.It Cd options AUDIO_DEBUG 2667Enable simple event debugging of the logging of the 2668.Xr audio 4 2669device. 2670.It Cd options BLINK 2671Enable blinking of LED. 2672Blink rate is full cycle every N seconds for 2673N \*[Lt] then current load average. 2674See 2675.Xr getloadavg 3 . 2676.El 2677.Ss x68k-specific Options 2678.Bl -ohang 2679.It Cd options EXTENDED_MEMORY 2680Include support for extended memory, e.g., TS-6BE16 and 060turbo on-board. 2681.It Cd options JUPITER 2682Include support for Jupiter-X MPU accelerator 2683.It Cd options ZSCONSOLE,ZSCN_SPEED=value 2684Use the built-in serial port as the system-console. 2685Speed is specified in bps, defaults to 9600. 2686.It Cd options ITE_KERNEL_ATTR=value 2687Set the kernel message attribute for ITE. 2688Value, an integer, is a logical or of the following values: 2689.Bl -tag -width 4n -compact -offset indent 2690.It 1 2691color inversed 2692.It 2 2693underlined 2694.It 4 2695bolded 2696.El 2697.El 2698.\" The following requests should be uncommented and used where appropriate. 2699.\" .Sh FILES 2700.\" .Sh EXAMPLES 2701.Sh SEE ALSO 2702.Xr config 1 , 2703.Xr gdb 1 , 2704.Xr ktrace 1 , 2705.Xr pmc 1 , 2706.Xr quota 1 , 2707.Xr vndcompress 1 , 2708.Xr gettimeofday 2 , 2709.Xr i386_get_mtrr 2 , 2710.Xr i386_iopl 2 , 2711.Xr msgctl 2 , 2712.Xr msgget 2 , 2713.Xr msgrcv 2 , 2714.Xr msgsnd 2 , 2715.Xr ntp_adjtime 2 , 2716.Xr ntp_gettime 2 , 2717.Xr reboot 2 , 2718.Xr semctl 2 , 2719.Xr semget 2 , 2720.Xr semop 2 , 2721.Xr shmat 2 , 2722.Xr shmctl 2 , 2723.Xr shmdt 2 , 2724.Xr shmget 2 , 2725.Xr sysctl 3 , 2726.Xr apm 4 , 2727.Xr ddb 4 , 2728.Xr inet 4 , 2729.Xr iso 4 , 2730.Xr md 4 , 2731.Xr pcibios 4 , 2732.Xr pcmcia 4 , 2733.Xr ppp 4 , 2734.Xr userconf 4 , 2735.Xr vnd 4 , 2736.Xr wscons 4 , 2737.Xr config 5 , 2738.Xr edquota 8 , 2739.Xr init 8 , 2740.Xr mdsetimage 8 , 2741.Xr mount_cd9660 8 , 2742.Xr mount_fdesc 8 , 2743.Xr mount_kernfs 8 , 2744.Xr mount_lfs 8 , 2745.Xr mount_mfs 8 , 2746.Xr mount_msdos 8 , 2747.Xr mount_nfs 8 , 2748.Xr mount_ntfs 8 , 2749.Xr mount_null 8 , 2750.Xr mount_portal 8 , 2751.Xr mount_procfs 8 , 2752.Xr mount_udf 8 , 2753.Xr mount_umap 8 , 2754.Xr mount_union 8 , 2755.Xr mrouted 8 , 2756.Xr newfs_lfs 8 , 2757.Xr ntpd 8 , 2758.Xr quotaon 8 , 2759.Xr rpc.rquotad 8 , 2760.Xr sysctl 8 , 2761.Xr in_getifa 9 2762.Sh HISTORY 2763The 2764.Nm 2765man page first appeared in 2766.Nx 1.3 . 2767.Sh BUGS 2768The 2769.Em EON 2770option should be a pseudo-device, and is also very fragile. 2771