13fcd5f6cSKazutaka YOKOTA.\" Copyright (c) 2001 23fcd5f6cSKazutaka YOKOTA.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 33fcd5f6cSKazutaka YOKOTA.\" All rights reserved. 43fcd5f6cSKazutaka YOKOTA.\" 53fcd5f6cSKazutaka YOKOTA.\" Redistribution and use in source and binary forms, with or without 63fcd5f6cSKazutaka YOKOTA.\" modification, are permitted provided that the following conditions 73fcd5f6cSKazutaka YOKOTA.\" are met: 83fcd5f6cSKazutaka YOKOTA.\" 1. Redistributions of source code must retain the above copyright 93fcd5f6cSKazutaka YOKOTA.\" notice, this list of conditions and the following disclaimer as 103fcd5f6cSKazutaka YOKOTA.\" the first lines of this file unmodified. 113fcd5f6cSKazutaka YOKOTA.\" 2. Redistributions in binary form must reproduce the above copyright 123fcd5f6cSKazutaka YOKOTA.\" notice, this list of conditions and the following disclaimer in the 133fcd5f6cSKazutaka YOKOTA.\" documentation and/or other materials provided with the distribution. 143fcd5f6cSKazutaka YOKOTA.\" 153fcd5f6cSKazutaka YOKOTA.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 163fcd5f6cSKazutaka YOKOTA.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 173fcd5f6cSKazutaka YOKOTA.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 183fcd5f6cSKazutaka YOKOTA.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 193fcd5f6cSKazutaka YOKOTA.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 203fcd5f6cSKazutaka YOKOTA.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 213fcd5f6cSKazutaka YOKOTA.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 223fcd5f6cSKazutaka YOKOTA.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 233fcd5f6cSKazutaka YOKOTA.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 243fcd5f6cSKazutaka YOKOTA.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 253fcd5f6cSKazutaka YOKOTA.\" 26*71f00776SGleb Smirnoff.Dd November 19, 2019 273fcd5f6cSKazutaka YOKOTA.Dt DEVICE.HINTS 5 283fcd5f6cSKazutaka YOKOTA.Os 293fcd5f6cSKazutaka YOKOTA.Sh NAME 303fcd5f6cSKazutaka YOKOTA.Nm device.hints 313fcd5f6cSKazutaka YOKOTA.Nd device resource hints 323fcd5f6cSKazutaka YOKOTA.Sh DESCRIPTION 333fcd5f6cSKazutaka YOKOTAThe 34d1d5d924SRuslan Ermilov.Nm 353fcd5f6cSKazutaka YOKOTAfile is read in by the boot 363fcd5f6cSKazutaka YOKOTA.Xr loader 8 372c5aad36STom Rhodeswhen the system is about to start, and its contents are 383fcd5f6cSKazutaka YOKOTApassed to the kernel. 393fcd5f6cSKazutaka YOKOTAIt contains various variables to control the boot behavior of 403fcd5f6cSKazutaka YOKOTAthe kernel. 413fcd5f6cSKazutaka YOKOTAThese variables are typically 42bdf80fecSBrooks Davis.Dq device hints , 43bdf80fecSBrooks Davisbut can include any kernel tunable values. 443fcd5f6cSKazutaka YOKOTA.Pp 45d1d5d924SRuslan ErmilovThe file contains one variable per line. 46d1d5d924SRuslan ErmilovLines starting with the 47d1d5d924SRuslan Ermilov.Ql # 48d1d5d924SRuslan Ermilovcharacter are comments and are ignored by the boot loader. 493fcd5f6cSKazutaka YOKOTA.Pp 503fcd5f6cSKazutaka YOKOTAAfter the file is read by the boot loader, you may examine 512c5aad36STom Rhodesthe variables with the 523fcd5f6cSKazutaka YOKOTA.Ic show 532c5aad36STom Rhodescommand, and may add a new variable, modify an existing one, 542c5aad36STom Rhodesor delete a variable with the 553fcd5f6cSKazutaka YOKOTA.Ic set 563fcd5f6cSKazutaka YOKOTAand 573fcd5f6cSKazutaka YOKOTA.Ic unset 583fcd5f6cSKazutaka YOKOTAcommands of the boot loader 59d1d5d924SRuslan Ermilov(see 60d1d5d924SRuslan Ermilov.Xr loader 8 ) . 613fcd5f6cSKazutaka YOKOTA.Pp 623fcd5f6cSKazutaka YOKOTAAfter the system has started, you can dump these variables 632c5aad36STom Rhodeswith the 643fcd5f6cSKazutaka YOKOTA.Xr kenv 1 653fcd5f6cSKazutaka YOKOTAcommand. 663fcd5f6cSKazutaka YOKOTA.Sh DEVICE HINTS 673fcd5f6cSKazutaka YOKOTADevice hint variables are used by device drivers to set up 683fcd5f6cSKazutaka YOKOTAthe device. 693fcd5f6cSKazutaka YOKOTAThey are most often used by ISA device drivers to specify 703fcd5f6cSKazutaka YOKOTAwhere the driver will probe for the relevant devices, and what 713fcd5f6cSKazutaka YOKOTAresources it will attempt to use. 723fcd5f6cSKazutaka YOKOTA.Pp 733fcd5f6cSKazutaka YOKOTAA device hint line looks like: 743fcd5f6cSKazutaka YOKOTA.Pp 75d1d5d924SRuslan Ermilov.Sm off 76b6514098SUlrich Spörlein.D1 Li hint. Ar driver . Ar unit . Ar keyword Li = Qq Ar value 77d1d5d924SRuslan Ermilov.Sm on 783fcd5f6cSKazutaka YOKOTA.Pp 793fcd5f6cSKazutaka YOKOTAwhere 80d1d5d924SRuslan Ermilov.Ar driver 813fcd5f6cSKazutaka YOKOTAis the name of a device driver, 82d1d5d924SRuslan Ermilov.Ar unit 832c5aad36STom Rhodesis the unit number, and 84d1d5d924SRuslan Ermilov.Ar keyword 853fcd5f6cSKazutaka YOKOTAis the keyword of the hint. 863fcd5f6cSKazutaka YOKOTAThe keyword may be: 873fcd5f6cSKazutaka YOKOTA.Pp 88d1d5d924SRuslan Ermilov.Bl -tag -width ".Li disabled" -compact -offset indent 89d1d5d924SRuslan Ermilov.It Li at 903fcd5f6cSKazutaka YOKOTAspecifies a bus to which the device is attached. 91d1d5d924SRuslan Ermilov.It Li port 923fcd5f6cSKazutaka YOKOTAspecifies the start address of I/O ports to be used by the device. 93c3df85bfSJohn Birrell.It Li portsize 94c3df85bfSJohn Birrellspecifies the number of ports used by the device. 95d1d5d924SRuslan Ermilov.It Li irq 963fcd5f6cSKazutaka YOKOTAis the interrupt line number to be used. 97d1d5d924SRuslan Ermilov.It Li drq 983fcd5f6cSKazutaka YOKOTAis the DMA channel number. 99d1d5d924SRuslan Ermilov.It Li maddr 1002c5aad36STom Rhodesspecifies the physical memory address used by the device. 101ad962727SJohn Birrell.It Li msize 102ad962727SJohn Birrellspecifies the physical memory size used by the device. 103d1d5d924SRuslan Ermilov.It Li flags 1043fcd5f6cSKazutaka YOKOTAsets various flag bits for the device. 105d1d5d924SRuslan Ermilov.It Li disabled 1062c5aad36STom Rhodescan be set to 1073fcd5f6cSKazutaka YOKOTA.Qq 1 1083fcd5f6cSKazutaka YOKOTAto disable the device. 1093fcd5f6cSKazutaka YOKOTA.El 1103fcd5f6cSKazutaka YOKOTA.Pp 1113fcd5f6cSKazutaka YOKOTAA device driver may require one or more hint lines with these keywords, 112f4959cc0SXin LIand may accept other keywords not listed here, through 113f4959cc0SXin LI.Xr resource_int_value 9 . 1143fcd5f6cSKazutaka YOKOTAConsult individual device drivers' manual pages for available 1153fcd5f6cSKazutaka YOKOTAkeywords and their possible values. 1163fcd5f6cSKazutaka YOKOTA.\" .Sh CONTROL VARIABLES 1173fcd5f6cSKazutaka YOKOTA.\" Lines not starting with 1183fcd5f6cSKazutaka YOKOTA.\" .Dq hint. 1193fcd5f6cSKazutaka YOKOTA.\" specify other control variables for the kernel. 1203fcd5f6cSKazutaka YOKOTA.\" They look: 1213fcd5f6cSKazutaka YOKOTA.\" .Pp 1223fcd5f6cSKazutaka YOKOTA.\" .Dl <name>="<value>" 1233fcd5f6cSKazutaka YOKOTA.\" XXX 1243fcd5f6cSKazutaka YOKOTA.\" WE SHOULD LIST AVAILABLE VARIABLE NAMES AND THEIR POSSIBLE VALUES HERE! 1253fcd5f6cSKazutaka YOKOTA.\" .Pp 1263fcd5f6cSKazutaka YOKOTA.Sh FILES 127d1d5d924SRuslan Ermilov.Bl -tag -width ".Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints" -compact 1283fcd5f6cSKazutaka YOKOTA.It Pa /boot/device.hints 129d1d5d924SRuslan ErmilovDevice resource hints file. 130d1d5d924SRuslan Ermilov.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints 131d1d5d924SRuslan ErmilovSample resource hints for the 132d1d5d924SRuslan Ermilov.Pa GENERIC 133d1d5d924SRuslan Ermilovkernel. 134d1d5d924SRuslan Ermilov.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/NOTES 1353fcd5f6cSKazutaka YOKOTANotes on the kernel configuration file and device resource hints. 1363fcd5f6cSKazutaka YOKOTA.El 1373fcd5f6cSKazutaka YOKOTA.Sh EXAMPLES 1383fcd5f6cSKazutaka YOKOTAThe following example sets up resources for the 139*71f00776SGleb Smirnoff.Xr uart 4 140d962d52aSRuslan Ermilovdriver on the ISA bus: 1413fcd5f6cSKazutaka YOKOTA.Bd -literal -offset indent 142*71f00776SGleb Smirnoffhint.uart.0.at="isa" 143*71f00776SGleb Smirnoffhint.uart.0.port="0x3F8" 144*71f00776SGleb Smirnoffhint.uart.0.flags="0x10" 145*71f00776SGleb Smirnoffhint.uart.0.irq="4" 1463fcd5f6cSKazutaka YOKOTA.Ed 147d962d52aSRuslan Ermilov.Pp 148d962d52aSRuslan ErmilovThe following example disables the ACPI driver: 149ac039935SDavid E. O'Brien.Bd -literal -offset indent 1506c407052SMitsuru IWASAKIhint.acpi.0.disabled="1" 151ac039935SDavid E. O'Brien.Ed 152bdf80fecSBrooks Davis.Pp 153bdf80fecSBrooks DavisSetting a tunable variable: 154bdf80fecSBrooks Davis.Bd -literal -offset indent 155bdf80fecSBrooks Davisvm.pmap.pg_ps_enabled=1 156bdf80fecSBrooks Davis.Ed 1573fcd5f6cSKazutaka YOKOTA.Sh SEE ALSO 1583fcd5f6cSKazutaka YOKOTA.Xr kenv 1 , 1593fcd5f6cSKazutaka YOKOTA.Xr loader.conf 5 , 160f4959cc0SXin LI.Xr loader 8 , 1617b1d17a1SGlen Barber.Xr resource_int_value 9 1623fcd5f6cSKazutaka YOKOTA.Sh HISTORY 1633fcd5f6cSKazutaka YOKOTAThe 1643fcd5f6cSKazutaka YOKOTA.Nm 1653fcd5f6cSKazutaka YOKOTAfile first appeared in 1663fcd5f6cSKazutaka YOKOTA.Fx 5.0 . 167