xref: /freebsd/share/man/man4/attimer.4 (revision 76a6875b081f682e9140147cbef042aead3123ad)
174f3a46aSAlexander Motin.\" Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
274f3a46aSAlexander Motin.\" All rights reserved.
374f3a46aSAlexander Motin.\"
474f3a46aSAlexander Motin.\" Redistribution and use in source and binary forms, with or without
574f3a46aSAlexander Motin.\" modification, are permitted provided that the following conditions
674f3a46aSAlexander Motin.\" are met:
774f3a46aSAlexander Motin.\" 1. Redistributions of source code must retain the above copyright
874f3a46aSAlexander Motin.\"    notice, this list of conditions and the following disclaimer.
974f3a46aSAlexander Motin.\" 2. Redistributions in binary form must reproduce the above copyright
1074f3a46aSAlexander Motin.\"    notice, this list of conditions and the following disclaimer in the
1174f3a46aSAlexander Motin.\"    documentation and/or other materials provided with the distribution.
1274f3a46aSAlexander Motin.\"
1374f3a46aSAlexander Motin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1474f3a46aSAlexander Motin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1574f3a46aSAlexander Motin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1674f3a46aSAlexander Motin.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1774f3a46aSAlexander Motin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1874f3a46aSAlexander Motin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1974f3a46aSAlexander Motin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2074f3a46aSAlexander Motin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2174f3a46aSAlexander Motin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2274f3a46aSAlexander Motin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2374f3a46aSAlexander Motin.\" SUCH DAMAGE.
2474f3a46aSAlexander Motin.\"
2574f3a46aSAlexander Motin.\" $FreeBSD$
2674f3a46aSAlexander Motin.\"
2774f3a46aSAlexander Motin.Dd September 14, 2010
2874f3a46aSAlexander Motin.Dt attimer 4
2974f3a46aSAlexander Motin.Os
3074f3a46aSAlexander Motin.Sh NAME
3174f3a46aSAlexander Motin.Nm attimer
3274f3a46aSAlexander Motin.Nd i8254 Programmable Interval Timer (AT Timer) driver
3374f3a46aSAlexander Motin.Sh SYNOPSIS
3474f3a46aSAlexander MotinThis driver is a mandatory part of x86 kernels.
3574f3a46aSAlexander Motin.Pp
3674f3a46aSAlexander MotinThe following tunables are settable from the
3774f3a46aSAlexander Motin.Xr loader 8 :
3874f3a46aSAlexander Motin.Bl -ohang
3974f3a46aSAlexander Motin.It Va hint.attimer. Ns Ar X Ns Va .clock
4074f3a46aSAlexander Motincontrols event timers functionality support. Setting to 0, disables it.
4174f3a46aSAlexander MotinDefault value is 1.
4274f3a46aSAlexander Motin.It Va hint.attimer. Ns Ar X Ns Va .timecounter
4374f3a46aSAlexander Motincontrols time counter functionality support. Setting to 0, disables it.
4474f3a46aSAlexander MotinDefault value is 1.
45*76a6875bSAlexander Motin.It Va hw.i8254.freq
46*76a6875bSAlexander Motinallows to override default counter frequency.
47*76a6875bSAlexander MotinThe same value is also available in run-time via
48*76a6875bSAlexander Motin.Va machdep.i8254_freq
49*76a6875bSAlexander Motinsysctl.
5074f3a46aSAlexander Motin.El
5174f3a46aSAlexander Motin.Sh DESCRIPTION
5274f3a46aSAlexander MotinThis driver uses i8254 Programmable Interval Timer (AT Timer) hardware
5374f3a46aSAlexander Motinto supply kernel with one time counter and one event timer, and generate
5474f3a46aSAlexander Motinsound tones for system speaker.
5574f3a46aSAlexander MotinThis hardware includes three channels.
5674f3a46aSAlexander MotinEach channel includes 16bit counter, counting down with known,
5774f3a46aSAlexander Motinplatform-dependent frequency.
5874f3a46aSAlexander MotinCounters can operate in several different modes, including periodic and
5974f3a46aSAlexander Motinone-shot.
6074f3a46aSAlexander MotinOutput of each channel has platform-defined wiring: one channel is wired
6174f3a46aSAlexander Motinto the interrupt controller and may be used as event timer, one channel is
6274f3a46aSAlexander Motinwired to speaker and used to generate sound tones, and one timer is reserved
6374f3a46aSAlexander Motinfor platform purposes.
6474f3a46aSAlexander Motin.Pp
6574f3a46aSAlexander MotinDriver uses single hardware channel to provide both time counter and event
6674f3a46aSAlexander Motintimer functionality.
6774f3a46aSAlexander MotinTo make it possible, respective counter must be running in periodic more.
6874f3a46aSAlexander MotinAs result, one-shot event timer mode supported only when time counter
6974f3a46aSAlexander Motinfunctionality is disabled.
7074f3a46aSAlexander Motin.Pp
7174f3a46aSAlexander MotinEvent timer provided by the driver is irrelevant to CPU power states.
7274f3a46aSAlexander Motin.Sh SEE ALSO
73c45456fbSAlexander Motin.Xr atrtc 4 ,
7474f3a46aSAlexander Motin.Xr hpet 4 ,
7574f3a46aSAlexander Motin.Xr eventtimers 7
76