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