1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
<table class="head">
<tr>
<td class="head-ltitle">DEVICE.HINTS(5)</td>
<td class="head-vol">File Formats Manual</td>
<td class="head-rtitle">DEVICE.HINTS(5)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">device.hints</code> —
<span class="Nd">device resource hints</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">device.hints</code> file is read in by the
boot <a class="Xr">loader(8)</a> when the system is about to start, and its
contents are passed to the kernel. It contains various variables to control
the boot behavior of the kernel. These variables are typically
“device hints”, but can include any kernel tunable values.</p>
<p class="Pp">The file contains one variable per line. Lines starting with the
‘<code class="Li">#</code>’ character are comments and are
ignored by the boot loader.</p>
<p class="Pp">After the file is read by the boot loader, you may examine the
variables with the <code class="Ic">show</code> command, and may add a new
variable, modify an existing one, or delete a variable with the
<code class="Ic">set</code> and <code class="Ic">unset</code> commands of
the boot loader (see <a class="Xr">loader(8)</a>).</p>
<p class="Pp">After the system has started, you can dump these variables with
the <a class="Xr">kenv(1)</a> command.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DEVICE_HINTS"><a class="permalink" href="#DEVICE_HINTS">DEVICE
HINTS</a></h1>
<p class="Pp">Device hint variables are used by device drivers to set up the
device. They are most often used by ISA device drivers to specify where the
driver will probe for the relevant devices, and what resources it will
attempt to use.</p>
<p class="Pp">A device hint line looks like:</p>
<p class="Pp"></p>
<div class="Bd
Bd-indent"><code class="Li">hint.</code><var class="Ar">driver</var>.<var class="Ar">unit</var>.<var class="Ar">keyword</var><code class="Li">=</code>"<var class="Ar">value</var>"</div>
<p class="Pp">where <var class="Ar">driver</var> is the name of a device driver,
<var class="Ar">unit</var> is the unit number, and
<var class="Ar">keyword</var> is the keyword of the hint. The keyword may
be:</p>
<p class="Pp"></p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
<dt id="at"><a class="permalink" href="#at"><code class="Li">at</code></a></dt>
<dd>specifies a bus to which the device is attached.</dd>
<dt id="port"><a class="permalink" href="#port"><code class="Li">port</code></a></dt>
<dd>specifies the start address of I/O ports to be used by the device.</dd>
<dt id="portsize"><a class="permalink" href="#portsize"><code class="Li">portsize</code></a></dt>
<dd>specifies the number of ports used by the device.</dd>
<dt id="irq"><a class="permalink" href="#irq"><code class="Li">irq</code></a></dt>
<dd>is the interrupt line number to be used.</dd>
<dt id="drq"><a class="permalink" href="#drq"><code class="Li">drq</code></a></dt>
<dd>is the DMA channel number.</dd>
<dt id="maddr"><a class="permalink" href="#maddr"><code class="Li">maddr</code></a></dt>
<dd>specifies the physical memory address used by the device.</dd>
<dt id="msize"><a class="permalink" href="#msize"><code class="Li">msize</code></a></dt>
<dd>specifies the physical memory size used by the device.</dd>
<dt id="flags"><a class="permalink" href="#flags"><code class="Li">flags</code></a></dt>
<dd>sets various flag bits for the device.</dd>
<dt id="disabled"><a class="permalink" href="#disabled"><code class="Li">disabled</code></a></dt>
<dd>can be set to "1" to disable the device.</dd>
</dl>
</div>
<p class="Pp">A device driver may require one or more hint lines with these
keywords, and may accept other keywords not listed here, through
<a class="Xr">resource_int_value(9)</a>. Consult individual device drivers'
manual pages for available keywords and their possible values.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag Bl-compact">
<dt><span class="Pa">/boot/device.hints</span></dt>
<dd>Device resource hints file.</dd>
<dt><span class="Pa">/sys/</span><var class="Ar">ARCH</var><span class="Pa">/conf/GENERIC.hints</span></dt>
<dd>Sample resource hints for the <span class="Pa">GENERIC</span> kernel.</dd>
<dt><span class="Pa">/sys/</span><var class="Ar">ARCH</var><span class="Pa">/conf/NOTES</span></dt>
<dd>Notes on the kernel configuration file and device resource hints.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
<p class="Pp">The following example sets up resources for the
<a class="Xr">uart(4)</a> driver on the ISA bus:</p>
<div class="Bd Pp Bd-indent Li">
<pre>hint.uart.0.at="isa"
hint.uart.0.port="0x3F8"
hint.uart.0.flags="0x10"
hint.uart.0.irq="4"</pre>
</div>
<p class="Pp">The following example disables the ACPI driver:</p>
<div class="Bd Pp Bd-indent Li">
<pre>hint.acpi.0.disabled="1"</pre>
</div>
<p class="Pp">Setting a tunable variable:</p>
<div class="Bd Pp Bd-indent Li">
<pre>vm.pmap.pg_ps_enabled=1</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><a class="Xr">kenv(1)</a>, <a class="Xr">loader.conf(5)</a>,
<a class="Xr">loader(8)</a>, <a class="Xr">resource_int_value(9)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">device.hints</code> file first appeared in
<span class="Ux">FreeBSD 5.0</span>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">November 19, 2019</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|