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