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