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.\" 28f4959cc0SXin LI.Dd September 11, 2009 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 443fcd5f6cSKazutaka YOKOTA.Dq device hints . 453fcd5f6cSKazutaka YOKOTA.\" .Dq device hints , 463fcd5f6cSKazutaka YOKOTA.\" and other control variables. 473fcd5f6cSKazutaka YOKOTA.Pp 48d1d5d924SRuslan ErmilovThe file contains one variable per line. 49d1d5d924SRuslan ErmilovLines starting with the 50d1d5d924SRuslan Ermilov.Ql # 51d1d5d924SRuslan Ermilovcharacter are comments and are ignored by the boot loader. 523fcd5f6cSKazutaka YOKOTA.Pp 533fcd5f6cSKazutaka YOKOTAAfter the file is read by the boot loader, you may examine 542c5aad36STom Rhodesthe variables with the 553fcd5f6cSKazutaka YOKOTA.Ic show 562c5aad36STom Rhodescommand, and may add a new variable, modify an existing one, 572c5aad36STom Rhodesor delete a variable with the 583fcd5f6cSKazutaka YOKOTA.Ic set 593fcd5f6cSKazutaka YOKOTAand 603fcd5f6cSKazutaka YOKOTA.Ic unset 613fcd5f6cSKazutaka YOKOTAcommands of the boot loader 62d1d5d924SRuslan Ermilov(see 63d1d5d924SRuslan Ermilov.Xr loader 8 ) . 643fcd5f6cSKazutaka YOKOTA.Pp 653fcd5f6cSKazutaka YOKOTAAfter the system has started, you can dump these variables 662c5aad36STom Rhodeswith the 673fcd5f6cSKazutaka YOKOTA.Xr kenv 1 683fcd5f6cSKazutaka YOKOTAcommand. 693fcd5f6cSKazutaka YOKOTA.Sh DEVICE HINTS 703fcd5f6cSKazutaka YOKOTADevice hint variables are used by device drivers to set up 713fcd5f6cSKazutaka YOKOTAthe device. 723fcd5f6cSKazutaka YOKOTAThey are most often used by ISA device drivers to specify 733fcd5f6cSKazutaka YOKOTAwhere the driver will probe for the relevant devices, and what 743fcd5f6cSKazutaka YOKOTAresources it will attempt to use. 753fcd5f6cSKazutaka YOKOTA.Pp 763fcd5f6cSKazutaka YOKOTAA device hint line looks like: 773fcd5f6cSKazutaka YOKOTA.Pp 78d1d5d924SRuslan Ermilov.Sm off 79*b6514098SUlrich Spörlein.D1 Li hint. Ar driver . Ar unit . Ar keyword Li = Qq Ar value 80d1d5d924SRuslan Ermilov.Sm on 813fcd5f6cSKazutaka YOKOTA.Pp 823fcd5f6cSKazutaka YOKOTAwhere 83d1d5d924SRuslan Ermilov.Ar driver 843fcd5f6cSKazutaka YOKOTAis the name of a device driver, 85d1d5d924SRuslan Ermilov.Ar unit 862c5aad36STom Rhodesis the unit number, and 87d1d5d924SRuslan Ermilov.Ar keyword 883fcd5f6cSKazutaka YOKOTAis the keyword of the hint. 893fcd5f6cSKazutaka YOKOTAThe keyword may be: 903fcd5f6cSKazutaka YOKOTA.Pp 91d1d5d924SRuslan Ermilov.Bl -tag -width ".Li disabled" -compact -offset indent 92d1d5d924SRuslan Ermilov.It Li at 933fcd5f6cSKazutaka YOKOTAspecifies a bus to which the device is attached. 94d1d5d924SRuslan Ermilov.It Li port 953fcd5f6cSKazutaka YOKOTAspecifies the start address of I/O ports to be used by the device. 96c3df85bfSJohn Birrell.It Li portsize 97c3df85bfSJohn Birrellspecifies the number of ports used by the device. 98d1d5d924SRuslan Ermilov.It Li irq 993fcd5f6cSKazutaka YOKOTAis the interrupt line number to be used. 100d1d5d924SRuslan Ermilov.It Li drq 1013fcd5f6cSKazutaka YOKOTAis the DMA channel number. 102d1d5d924SRuslan Ermilov.It Li maddr 1032c5aad36STom Rhodesspecifies the physical memory address used by the device. 104ad962727SJohn Birrell.It Li msize 105ad962727SJohn Birrellspecifies the physical memory size used by the device. 106d1d5d924SRuslan Ermilov.It Li flags 1073fcd5f6cSKazutaka YOKOTAsets various flag bits for the device. 108d1d5d924SRuslan Ermilov.It Li disabled 1092c5aad36STom Rhodescan be set to 1103fcd5f6cSKazutaka YOKOTA.Qq 1 1113fcd5f6cSKazutaka YOKOTAto disable the device. 1123fcd5f6cSKazutaka YOKOTA.El 1133fcd5f6cSKazutaka YOKOTA.Pp 1143fcd5f6cSKazutaka YOKOTAA device driver may require one or more hint lines with these keywords, 115f4959cc0SXin LIand may accept other keywords not listed here, through 116f4959cc0SXin LI.Xr resource_int_value 9 . 1173fcd5f6cSKazutaka YOKOTAConsult individual device drivers' manual pages for available 1183fcd5f6cSKazutaka YOKOTAkeywords and their possible values. 1193fcd5f6cSKazutaka YOKOTA.\" .Sh CONTROL VARIABLES 1203fcd5f6cSKazutaka YOKOTA.\" Lines not starting with 1213fcd5f6cSKazutaka YOKOTA.\" .Dq hint. 1223fcd5f6cSKazutaka YOKOTA.\" specify other control variables for the kernel. 1233fcd5f6cSKazutaka YOKOTA.\" They look: 1243fcd5f6cSKazutaka YOKOTA.\" .Pp 1253fcd5f6cSKazutaka YOKOTA.\" .Dl <name>="<value>" 1263fcd5f6cSKazutaka YOKOTA.\" XXX 1273fcd5f6cSKazutaka YOKOTA.\" WE SHOULD LIST AVAILABLE VARIABLE NAMES AND THEIR POSSIBLE VALUES HERE! 1283fcd5f6cSKazutaka YOKOTA.\" .Pp 1293fcd5f6cSKazutaka YOKOTA.Sh FILES 130d1d5d924SRuslan Ermilov.Bl -tag -width ".Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints" -compact 1313fcd5f6cSKazutaka YOKOTA.It Pa /boot/device.hints 132d1d5d924SRuslan ErmilovDevice resource hints file. 133d1d5d924SRuslan Ermilov.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints 134d1d5d924SRuslan ErmilovSample resource hints for the 135d1d5d924SRuslan Ermilov.Pa GENERIC 136d1d5d924SRuslan Ermilovkernel. 137d1d5d924SRuslan Ermilov.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/NOTES 1383fcd5f6cSKazutaka YOKOTANotes on the kernel configuration file and device resource hints. 1393fcd5f6cSKazutaka YOKOTA.El 1403fcd5f6cSKazutaka YOKOTA.Sh EXAMPLES 1413fcd5f6cSKazutaka YOKOTAThe following example sets up resources for the 1423fcd5f6cSKazutaka YOKOTA.Xr sio 4 143d962d52aSRuslan Ermilovdriver on the ISA bus: 1443fcd5f6cSKazutaka YOKOTA.Bd -literal -offset indent 1453fcd5f6cSKazutaka YOKOTAhint.sio.0.at="isa" 146d1d5d924SRuslan Ermilovhint.sio.0.port="0x3F8" 1473fcd5f6cSKazutaka YOKOTAhint.sio.0.flags="0x10" 1483fcd5f6cSKazutaka YOKOTAhint.sio.0.irq="4" 1493fcd5f6cSKazutaka YOKOTA.Ed 150d962d52aSRuslan Ermilov.Pp 151d962d52aSRuslan ErmilovThe following example disables the ACPI driver: 152ac039935SDavid E. O'Brien.Bd -literal -offset indent 1536c407052SMitsuru IWASAKIhint.acpi.0.disabled="1" 154ac039935SDavid E. O'Brien.Ed 1553fcd5f6cSKazutaka YOKOTA.\" .Pp 1563fcd5f6cSKazutaka YOKOTA.\" A control variable may look like: 1573fcd5f6cSKazutaka YOKOTA.\" .Pp 1583fcd5f6cSKazutaka YOKOTA.\" .Bd -literal -offset indent 1593fcd5f6cSKazutaka YOKOTA.\" debug.acpi.layer="ACPI_RESOURCES" 1603fcd5f6cSKazutaka YOKOTA.\" .Ed 1613fcd5f6cSKazutaka YOKOTA.Sh SEE ALSO 1623fcd5f6cSKazutaka YOKOTA.Xr kenv 1 , 1633fcd5f6cSKazutaka YOKOTA.Xr loader.conf 5 , 164f4959cc0SXin LI.Xr loader 8, 165f4959cc0SXin LI.Xr resource_int_value 9 . 1663fcd5f6cSKazutaka YOKOTA.Sh HISTORY 1673fcd5f6cSKazutaka YOKOTAThe 1683fcd5f6cSKazutaka YOKOTA.Nm 1693fcd5f6cSKazutaka YOKOTAfile first appeared in 1703fcd5f6cSKazutaka YOKOTA.Fx 5.0 . 171