xref: /freebsd/share/man/man5/device.hints.5 (revision c4f6a2a9e1b1879b618c436ab4f56ff75c73a0f5)
1.\" Copyright (c) 2001
2.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer as
10.\"    the first lines of this file unmodified.
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.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd October 7, 2001
29.Dt DEVICE.HINTS 5
30.Os
31.Sh NAME
32.Nm device.hints
33.Nd device resource hints
34.Sh DESCRIPTION
35The
36.Nm
37file is read in by the boot
38.Xr loader 8
39when the system is about to start and its contents will be
40passed to the kernel.
41It contains various variables to control the boot behavior of
42the kernel.
43These variables are typically
44.Dq device hints .
45.\" .Dq device hints ,
46.\" and other control variables.
47.Pp
48The file contains one variable per line.
49Lines starting with the
50.Ql #
51character are comments and are ignored by the boot loader.
52.Pp
53After the file is read by the boot loader, you may examine
54the variables by the
55.Ic show
56command, and may add a new variable, modify existing one,
57or delete one by the
58.Ic set
59and
60.Ic unset
61commands of the boot loader
62(see
63.Xr loader 8 ) .
64.Pp
65After the system has started, you can dump these variables
66by the
67.Xr kenv 1
68command.
69.Sh DEVICE HINTS
70Device hint variables are used by device drivers to set up
71the device.
72They are most often used by ISA device drivers to specify
73where the driver will probe for the relevant devices, and what
74resources it will attempt to use.
75.Pp
76A device hint line looks like:
77.Pp
78.Sm off
79.D1 Li hint. Ar driver Li . Ar unit Li . Ar keyword Li = Qq Ar value
80.Sm on
81.Pp
82where
83.Ar driver
84is the name of a device driver,
85.Ar unit
86is the unit number,
87.Ar keyword
88is the keyword of the hint.
89The keyword may be:
90.Pp
91.Bl -tag -width ".Li disabled" -compact -offset indent
92.It Li at
93specifies a bus to which the device is attached.
94.It Li port
95specifies the start address of I/O ports to be used by the device.
96.It Li irq
97is the interrupt line number to be used.
98.It Li drq
99is the DMA channel number.
100.It Li maddr
101specifies the physical memory address occupied by the device.
102.It Li flags
103sets various flag bits for the device.
104.It Li disabled
105is set to
106.Qq 1
107to disable the device.
108.El
109.Pp
110A device driver may require one or more hint lines with these keywords,
111and may accept other keywords not listed here.
112Consult individual device drivers' manual pages for available
113keywords and their possible values.
114.\" .Sh CONTROL VARIABLES
115.\" Lines not starting with
116.\" .Dq hint.
117.\" specify other control variables for the kernel.
118.\" They look:
119.\" .Pp
120.\" .Dl <name>="<value>"
121.\" XXX
122.\" WE SHOULD LIST AVAILABLE VARIABLE NAMES AND THEIR POSSIBLE VALUES HERE!
123.\" .Pp
124.Sh FILES
125.Bl -tag -width ".Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints" -compact
126.It Pa /boot/device.hints
127Device resource hints file.
128.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints
129Sample resource hints for the
130.Pa GENERIC
131kernel.
132.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/NOTES
133Notes on the kernel configuration file and device resource hints.
134.El
135.Sh EXAMPLES
136The following example sets up resources for the
137.Xr sio 4
138driver on the ISA bus.
139.Bd -literal -offset indent
140hint.sio.0.at="isa"
141hint.sio.0.port="0x3F8"
142hint.sio.0.flags="0x10"
143hint.sio.0.irq="4"
144.Ed
145
146The following example disables the ACPI driver
147.Bd -literal -offset indent
148hint.acpi.0.disable="1"
149.Ed
150.\" .Pp
151.\" A control variable may look like:
152.\" .Pp
153.\" .Bd -literal -offset indent
154.\" debug.acpi.layer="ACPI_RESOURCES"
155.\" .Ed
156.Sh SEE ALSO
157.Xr kenv 1 ,
158.Xr loader.conf 5 ,
159.Xr loader 8
160.Sh HISTORY
161The
162.Nm
163file first appeared in
164.Fx 5.0 .
165