📄 device-hints.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Device Hints</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="The FreeBSD Booting Process" href="boot.html" /><link rel="PREVIOUS" title="Kernel Interaction During Boot" href="boot-kernel.html" /><link rel="NEXT" title="Init: Process Control Initialization" href="boot-init.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="boot-kernel.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 12 The FreeBSD BootingProcess</td><td width="10%" align="right" valign="bottom"><a href="boot-init.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="DEVICE-HINTS" name="DEVICE-HINTS">12.5 Device Hints</a></h1><i class="AUTHORGROUP"><span class="CONTRIB">Contributed by</span> Tom Rhodes.</i> <div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> This is a FreeBSD 5.0 and later feature which does not exist inearlier versions.</p></blockquote></div><p>During initial system startup, the boot <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=loader&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">loader</span>(8)</span></a> will readthe <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=device.hints&sektion=5&manpath=FreeBSD+6-current"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">device.hints</span>(5)</span></a>file. This file stores kernel boot information known as variables, sometimes referred toas ``device hints''. These ``device hints'' are used by device drivers for deviceconfiguration.</p><p>Device hints may also be specified at the <a href="boot-blocks.html#BOOT-LOADER">Stage3 boot loader</a> prompt. Variables can be added using <tt class="COMMAND">set</tt>,removed with <tt class="COMMAND">unset</tt>, and viewed with the <ttclass="COMMAND">show</tt> commands. Variables set in the <ttclass="FILENAME">/boot/device.hints</tt> file can be overridden here also. Device hintsentered at the boot loader are not permanent and will be forgotten on the nextreboot.</p><p>Once the system is booted, the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=kenv&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">kenv</span>(1)</span></a> command can beused to dump all of the variables.</p><p>The syntax for the <tt class="FILENAME">/boot/device.hints</tt> file is one variableper line, using the standard hash ``#'' as comment markers. Lines are constructed asfollows:</p><pre class="SCREEN"><kbd class="USERINPUT">hint.driver.unit.keyword="<varclass="REPLACEABLE">value</var>"</kbd></pre><p>The syntax for the Stage 3 boot loader is:</p><pre class="SCREEN"><kbd class="USERINPUT">set hint.driver.unit.keyword=<varclass="REPLACEABLE">value</var></kbd></pre><p><var class="LITERAL">driver</var> is the device driver name, <varclass="LITERAL">unit</var> is the device driver unit number, and <varclass="LITERAL">keyword</var> is the hint keyword. The keyword may consist of thefollowing options:</p><ul><li><p><var class="LITERAL">at</var>: specifies the bus which the device is attached to.</p></li><li><p><var class="LITERAL">port</var>: specifies the start address of the <acronymclass="ACRONYM">I/O</acronym> to be used.</p></li><li><p><var class="LITERAL">irq</var>: specifies the interrupt request number to be used.</p></li><li><p><var class="LITERAL">drq</var>: specifies the DMA channel number.</p></li><li><p><var class="LITERAL">maddr</var>: specifies the physical memory address occupied bythe device.</p></li><li><p><var class="LITERAL">flags</var>: sets various flag bits for the device.</p></li><li><p><var class="LITERAL">disabled</var>: if set to <var class="LITERAL">1</var> the deviceis disabled.</p></li></ul><p>Device drivers may accept (or require) more hints not listed here, viewing theirmanual page is recommended. For more information, consult the <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=device.hints&sektion=5&manpath=FreeBSD+6-current"><span class="CITEREFENTRY"><span class="REFENTRYTITLE">device.hints</span>(5)</span></a>,<a href="http://www.FreeBSD.org/cgi/man.cgi?query=kenv&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">kenv</span>(1)</span></a>, <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=loader.conf&sektion=5"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">loader.conf</span>(5)</span></a>, and <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=loader&sektion=8"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">loader</span>(8)</span></a> manualpages.</p></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="boot-kernel.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="boot-init.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Kernel Interaction During Boot</td><td width="34%" align="center" valign="top"><a href="boot.html" accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Init: Process Control Initialization</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting <<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>>.<br />For questions about this documentation, e-mail <<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>>.</small></p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -