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