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.\" 263fcd5f6cSKazutaka YOKOTA.\" $FreeBSD$ 273fcd5f6cSKazutaka YOKOTA.\" 28*71f00776SGleb Smirnoff.Dd November 19, 2019 293fcd5f6cSKazutaka YOKOTA.Dt DEVICE.HINTS 5 303fcd5f6cSKazutaka YOKOTA.Os 313fcd5f6cSKazutaka YOKOTA.Sh NAME 323fcd5f6cSKazutaka YOKOTA.Nm device.hints 333fcd5f6cSKazutaka YOKOTA.Nd device resource hints 343fcd5f6cSKazutaka YOKOTA.Sh DESCRIPTION 353fcd5f6cSKazutaka YOKOTAThe 36d1d5d924SRuslan Ermilov.Nm 373fcd5f6cSKazutaka YOKOTAfile is read in by the boot 383fcd5f6cSKazutaka YOKOTA.Xr loader 8 392c5aad36STom Rhodeswhen the system is about to start, and its contents are 403fcd5f6cSKazutaka YOKOTApassed to the kernel. 413fcd5f6cSKazutaka YOKOTAIt contains various variables to control the boot behavior of 423fcd5f6cSKazutaka YOKOTAthe kernel. 433fcd5f6cSKazutaka YOKOTAThese variables are typically 44bdf80fecSBrooks Davis.Dq device hints , 45bdf80fecSBrooks Davisbut can include any kernel tunable values. 463fcd5f6cSKazutaka YOKOTA.Pp 47d1d5d924SRuslan ErmilovThe file contains one variable per line. 48d1d5d924SRuslan ErmilovLines starting with the 49d1d5d924SRuslan Ermilov.Ql # 50d1d5d924SRuslan Ermilovcharacter are comments and are ignored by the boot loader. 513fcd5f6cSKazutaka YOKOTA.Pp 523fcd5f6cSKazutaka YOKOTAAfter the file is read by the boot loader, you may examine 532c5aad36STom Rhodesthe variables with the 543fcd5f6cSKazutaka YOKOTA.Ic show 552c5aad36STom Rhodescommand, and may add a new variable, modify an existing one, 562c5aad36STom Rhodesor delete a variable with the 573fcd5f6cSKazutaka YOKOTA.Ic set 583fcd5f6cSKazutaka YOKOTAand 593fcd5f6cSKazutaka YOKOTA.Ic unset 603fcd5f6cSKazutaka YOKOTAcommands of the boot loader 61d1d5d924SRuslan Ermilov(see 62d1d5d924SRuslan Ermilov.Xr loader 8 ) . 633fcd5f6cSKazutaka YOKOTA.Pp 643fcd5f6cSKazutaka YOKOTAAfter the system has started, you can dump these variables 652c5aad36STom Rhodeswith the 663fcd5f6cSKazutaka YOKOTA.Xr kenv 1 673fcd5f6cSKazutaka YOKOTAcommand. 683fcd5f6cSKazutaka YOKOTA.Sh DEVICE HINTS 693fcd5f6cSKazutaka YOKOTADevice hint variables are used by device drivers to set up 703fcd5f6cSKazutaka YOKOTAthe device. 713fcd5f6cSKazutaka YOKOTAThey are most often used by ISA device drivers to specify 723fcd5f6cSKazutaka YOKOTAwhere the driver will probe for the relevant devices, and what 733fcd5f6cSKazutaka YOKOTAresources it will attempt to use. 743fcd5f6cSKazutaka YOKOTA.Pp 753fcd5f6cSKazutaka YOKOTAA device hint line looks like: 763fcd5f6cSKazutaka YOKOTA.Pp 77d1d5d924SRuslan Ermilov.Sm off 78b6514098SUlrich Spörlein.D1 Li hint. Ar driver . Ar unit . Ar keyword Li = Qq Ar value 79d1d5d924SRuslan Ermilov.Sm on 803fcd5f6cSKazutaka YOKOTA.Pp 813fcd5f6cSKazutaka YOKOTAwhere 82d1d5d924SRuslan Ermilov.Ar driver 833fcd5f6cSKazutaka YOKOTAis the name of a device driver, 84d1d5d924SRuslan Ermilov.Ar unit 852c5aad36STom Rhodesis the unit number, and 86d1d5d924SRuslan Ermilov.Ar keyword 873fcd5f6cSKazutaka YOKOTAis the keyword of the hint. 883fcd5f6cSKazutaka YOKOTAThe keyword may be: 893fcd5f6cSKazutaka YOKOTA.Pp 90d1d5d924SRuslan Ermilov.Bl -tag -width ".Li disabled" -compact -offset indent 91d1d5d924SRuslan Ermilov.It Li at 923fcd5f6cSKazutaka YOKOTAspecifies a bus to which the device is attached. 93d1d5d924SRuslan Ermilov.It Li port 943fcd5f6cSKazutaka YOKOTAspecifies the start address of I/O ports to be used by the device. 95c3df85bfSJohn Birrell.It Li portsize 96c3df85bfSJohn Birrellspecifies the number of ports used by the device. 97d1d5d924SRuslan Ermilov.It Li irq 983fcd5f6cSKazutaka YOKOTAis the interrupt line number to be used. 99d1d5d924SRuslan Ermilov.It Li drq 1003fcd5f6cSKazutaka YOKOTAis the DMA channel number. 101d1d5d924SRuslan Ermilov.It Li maddr 1022c5aad36STom Rhodesspecifies the physical memory address used by the device. 103ad962727SJohn Birrell.It Li msize 104ad962727SJohn Birrellspecifies the physical memory size used by the device. 105d1d5d924SRuslan Ermilov.It Li flags 1063fcd5f6cSKazutaka YOKOTAsets various flag bits for the device. 107d1d5d924SRuslan Ermilov.It Li disabled 1082c5aad36STom Rhodescan be set to 1093fcd5f6cSKazutaka YOKOTA.Qq 1 1103fcd5f6cSKazutaka YOKOTAto disable the device. 1113fcd5f6cSKazutaka YOKOTA.El 1123fcd5f6cSKazutaka YOKOTA.Pp 1133fcd5f6cSKazutaka YOKOTAA device driver may require one or more hint lines with these keywords, 114f4959cc0SXin LIand may accept other keywords not listed here, through 115f4959cc0SXin LI.Xr resource_int_value 9 . 1163fcd5f6cSKazutaka YOKOTAConsult individual device drivers' manual pages for available 1173fcd5f6cSKazutaka YOKOTAkeywords and their possible values. 1183fcd5f6cSKazutaka YOKOTA.\" .Sh CONTROL VARIABLES 1193fcd5f6cSKazutaka YOKOTA.\" Lines not starting with 1203fcd5f6cSKazutaka YOKOTA.\" .Dq hint. 1213fcd5f6cSKazutaka YOKOTA.\" specify other control variables for the kernel. 1223fcd5f6cSKazutaka YOKOTA.\" They look: 1233fcd5f6cSKazutaka YOKOTA.\" .Pp 1243fcd5f6cSKazutaka YOKOTA.\" .Dl <name>="<value>" 1253fcd5f6cSKazutaka YOKOTA.\" XXX 1263fcd5f6cSKazutaka YOKOTA.\" WE SHOULD LIST AVAILABLE VARIABLE NAMES AND THEIR POSSIBLE VALUES HERE! 1273fcd5f6cSKazutaka YOKOTA.\" .Pp 1283fcd5f6cSKazutaka YOKOTA.Sh FILES 129d1d5d924SRuslan Ermilov.Bl -tag -width ".Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints" -compact 1303fcd5f6cSKazutaka YOKOTA.It Pa /boot/device.hints 131d1d5d924SRuslan ErmilovDevice resource hints file. 132d1d5d924SRuslan Ermilov.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints 133d1d5d924SRuslan ErmilovSample resource hints for the 134d1d5d924SRuslan Ermilov.Pa GENERIC 135d1d5d924SRuslan Ermilovkernel. 136d1d5d924SRuslan Ermilov.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/NOTES 1373fcd5f6cSKazutaka YOKOTANotes on the kernel configuration file and device resource hints. 1383fcd5f6cSKazutaka YOKOTA.El 1393fcd5f6cSKazutaka YOKOTA.Sh EXAMPLES 1403fcd5f6cSKazutaka YOKOTAThe following example sets up resources for the 141*71f00776SGleb Smirnoff.Xr uart 4 142d962d52aSRuslan Ermilovdriver on the ISA bus: 1433fcd5f6cSKazutaka YOKOTA.Bd -literal -offset indent 144*71f00776SGleb Smirnoffhint.uart.0.at="isa" 145*71f00776SGleb Smirnoffhint.uart.0.port="0x3F8" 146*71f00776SGleb Smirnoffhint.uart.0.flags="0x10" 147*71f00776SGleb Smirnoffhint.uart.0.irq="4" 1483fcd5f6cSKazutaka YOKOTA.Ed 149d962d52aSRuslan Ermilov.Pp 150d962d52aSRuslan ErmilovThe following example disables the ACPI driver: 151ac039935SDavid E. O'Brien.Bd -literal -offset indent 1526c407052SMitsuru IWASAKIhint.acpi.0.disabled="1" 153ac039935SDavid E. O'Brien.Ed 154bdf80fecSBrooks Davis.Pp 155bdf80fecSBrooks DavisSetting a tunable variable: 156bdf80fecSBrooks Davis.Bd -literal -offset indent 157bdf80fecSBrooks Davisvm.pmap.pg_ps_enabled=1 158bdf80fecSBrooks Davis.Ed 1593fcd5f6cSKazutaka YOKOTA.Sh SEE ALSO 1603fcd5f6cSKazutaka YOKOTA.Xr kenv 1 , 1613fcd5f6cSKazutaka YOKOTA.Xr loader.conf 5 , 162f4959cc0SXin LI.Xr loader 8 , 1637b1d17a1SGlen Barber.Xr resource_int_value 9 1643fcd5f6cSKazutaka YOKOTA.Sh HISTORY 1653fcd5f6cSKazutaka YOKOTAThe 1663fcd5f6cSKazutaka YOKOTA.Nm 1673fcd5f6cSKazutaka YOKOTAfile first appeared in 1683fcd5f6cSKazutaka YOKOTA.Fx 5.0 . 169