2001-10-08 05:37:56 +00:00
|
|
|
.\" Copyright (c) 2001
|
|
|
|
.\" Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer as
|
|
|
|
.\" the first lines of this file unmodified.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2015-07-23 17:27:10 +00:00
|
|
|
.Dd July 23, 2015
|
2001-10-08 05:37:56 +00:00
|
|
|
.Dt DEVICE.HINTS 5
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm device.hints
|
|
|
|
.Nd device resource hints
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2001-10-08 10:12:41 +00:00
|
|
|
.Nm
|
2001-10-08 05:37:56 +00:00
|
|
|
file is read in by the boot
|
|
|
|
.Xr loader 8
|
2002-12-19 18:26:26 +00:00
|
|
|
when the system is about to start, and its contents are
|
2001-10-08 05:37:56 +00:00
|
|
|
passed to the kernel.
|
|
|
|
It contains various variables to control the boot behavior of
|
|
|
|
the kernel.
|
|
|
|
These variables are typically
|
2015-07-23 17:27:10 +00:00
|
|
|
.Dq device hints ,
|
|
|
|
but can include any kernel tunable values.
|
2001-10-08 05:37:56 +00:00
|
|
|
.Pp
|
2001-10-08 10:12:41 +00:00
|
|
|
The file contains one variable per line.
|
|
|
|
Lines starting with the
|
|
|
|
.Ql #
|
|
|
|
character are comments and are ignored by the boot loader.
|
2001-10-08 05:37:56 +00:00
|
|
|
.Pp
|
|
|
|
After the file is read by the boot loader, you may examine
|
2002-12-19 18:26:26 +00:00
|
|
|
the variables with the
|
2001-10-08 05:37:56 +00:00
|
|
|
.Ic show
|
2002-12-19 18:26:26 +00:00
|
|
|
command, and may add a new variable, modify an existing one,
|
|
|
|
or delete a variable with the
|
2001-10-08 05:37:56 +00:00
|
|
|
.Ic set
|
|
|
|
and
|
|
|
|
.Ic unset
|
|
|
|
commands of the boot loader
|
2001-10-08 10:12:41 +00:00
|
|
|
(see
|
|
|
|
.Xr loader 8 ) .
|
2001-10-08 05:37:56 +00:00
|
|
|
.Pp
|
|
|
|
After the system has started, you can dump these variables
|
2002-12-19 18:26:26 +00:00
|
|
|
with the
|
2001-10-08 05:37:56 +00:00
|
|
|
.Xr kenv 1
|
|
|
|
command.
|
|
|
|
.Sh DEVICE HINTS
|
|
|
|
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.
|
|
|
|
.Pp
|
|
|
|
A device hint line looks like:
|
|
|
|
.Pp
|
2001-10-08 10:12:41 +00:00
|
|
|
.Sm off
|
2010-08-02 13:11:27 +00:00
|
|
|
.D1 Li hint. Ar driver . Ar unit . Ar keyword Li = Qq Ar value
|
2001-10-08 10:12:41 +00:00
|
|
|
.Sm on
|
2001-10-08 05:37:56 +00:00
|
|
|
.Pp
|
|
|
|
where
|
2001-10-08 10:12:41 +00:00
|
|
|
.Ar driver
|
2001-10-08 05:37:56 +00:00
|
|
|
is the name of a device driver,
|
2001-10-08 10:12:41 +00:00
|
|
|
.Ar unit
|
2002-12-19 18:26:26 +00:00
|
|
|
is the unit number, and
|
2001-10-08 10:12:41 +00:00
|
|
|
.Ar keyword
|
2001-10-08 05:37:56 +00:00
|
|
|
is the keyword of the hint.
|
|
|
|
The keyword may be:
|
|
|
|
.Pp
|
2001-10-08 10:12:41 +00:00
|
|
|
.Bl -tag -width ".Li disabled" -compact -offset indent
|
|
|
|
.It Li at
|
2001-10-08 05:37:56 +00:00
|
|
|
specifies a bus to which the device is attached.
|
2001-10-08 10:12:41 +00:00
|
|
|
.It Li port
|
2001-10-08 05:37:56 +00:00
|
|
|
specifies the start address of I/O ports to be used by the device.
|
2003-09-19 22:27:54 +00:00
|
|
|
.It Li portsize
|
|
|
|
specifies the number of ports used by the device.
|
2001-10-08 10:12:41 +00:00
|
|
|
.It Li irq
|
2001-10-08 05:37:56 +00:00
|
|
|
is the interrupt line number to be used.
|
2001-10-08 10:12:41 +00:00
|
|
|
.It Li drq
|
2001-10-08 05:37:56 +00:00
|
|
|
is the DMA channel number.
|
2001-10-08 10:12:41 +00:00
|
|
|
.It Li maddr
|
2002-12-19 18:26:26 +00:00
|
|
|
specifies the physical memory address used by the device.
|
2003-09-07 04:18:17 +00:00
|
|
|
.It Li msize
|
|
|
|
specifies the physical memory size used by the device.
|
2001-10-08 10:12:41 +00:00
|
|
|
.It Li flags
|
2001-10-08 05:37:56 +00:00
|
|
|
sets various flag bits for the device.
|
2001-10-08 10:12:41 +00:00
|
|
|
.It Li disabled
|
2002-12-19 18:26:26 +00:00
|
|
|
can be set to
|
2001-10-08 05:37:56 +00:00
|
|
|
.Qq 1
|
|
|
|
to disable the device.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
A device driver may require one or more hint lines with these keywords,
|
2009-09-12 00:28:05 +00:00
|
|
|
and may accept other keywords not listed here, through
|
|
|
|
.Xr resource_int_value 9 .
|
2001-10-08 05:37:56 +00:00
|
|
|
Consult individual device drivers' manual pages for available
|
|
|
|
keywords and their possible values.
|
|
|
|
.\" .Sh CONTROL VARIABLES
|
|
|
|
.\" Lines not starting with
|
|
|
|
.\" .Dq hint.
|
|
|
|
.\" specify other control variables for the kernel.
|
|
|
|
.\" They look:
|
|
|
|
.\" .Pp
|
|
|
|
.\" .Dl <name>="<value>"
|
|
|
|
.\" XXX
|
|
|
|
.\" WE SHOULD LIST AVAILABLE VARIABLE NAMES AND THEIR POSSIBLE VALUES HERE!
|
|
|
|
.\" .Pp
|
|
|
|
.Sh FILES
|
2001-10-08 10:12:41 +00:00
|
|
|
.Bl -tag -width ".Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints" -compact
|
2001-10-08 05:37:56 +00:00
|
|
|
.It Pa /boot/device.hints
|
2001-10-08 10:12:41 +00:00
|
|
|
Device resource hints file.
|
|
|
|
.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/GENERIC.hints
|
|
|
|
Sample resource hints for the
|
|
|
|
.Pa GENERIC
|
|
|
|
kernel.
|
|
|
|
.It Pa /sys/ Ns Ar ARCH Ns Pa /conf/NOTES
|
2001-10-08 05:37:56 +00:00
|
|
|
Notes on the kernel configuration file and device resource hints.
|
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
The following example sets up resources for the
|
|
|
|
.Xr sio 4
|
2002-11-29 11:39:20 +00:00
|
|
|
driver on the ISA bus:
|
2001-10-08 05:37:56 +00:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
hint.sio.0.at="isa"
|
2001-10-08 10:12:41 +00:00
|
|
|
hint.sio.0.port="0x3F8"
|
2001-10-08 05:37:56 +00:00
|
|
|
hint.sio.0.flags="0x10"
|
|
|
|
hint.sio.0.irq="4"
|
|
|
|
.Ed
|
2002-11-29 11:39:20 +00:00
|
|
|
.Pp
|
|
|
|
The following example disables the ACPI driver:
|
2002-08-09 06:07:33 +00:00
|
|
|
.Bd -literal -offset indent
|
2002-08-30 11:11:07 +00:00
|
|
|
hint.acpi.0.disabled="1"
|
2002-08-09 06:07:33 +00:00
|
|
|
.Ed
|
2015-07-23 17:27:10 +00:00
|
|
|
.Pp
|
|
|
|
Setting a tunable variable:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
vm.pmap.pg_ps_enabled=1
|
|
|
|
.Ed
|
2001-10-08 05:37:56 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr kenv 1 ,
|
|
|
|
.Xr loader.conf 5 ,
|
2010-10-20 04:53:03 +00:00
|
|
|
.Xr loader 8 ,
|
2012-05-12 15:08:22 +00:00
|
|
|
.Xr resource_int_value 9
|
2001-10-08 05:37:56 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
file first appeared in
|
|
|
|
.Fx 5.0 .
|