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