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.\" 27*9bb8172bSChristian Brueffer.Dd May 26, 2014 28a6d11f71SRuslan Ermilov.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 40*9bb8172bSChristian Brueffercontrols support for the event timer functionality. 41*9bb8172bSChristian BruefferSetting this value to 42*9bb8172bSChristian Brueffer.Dv 0 43*9bb8172bSChristian Bruefferdisables it. 44*9bb8172bSChristian BruefferThe default value is 45*9bb8172bSChristian Brueffer.Dv 1 . 4674f3a46aSAlexander Motin.It Va hint.attimer. Ns Ar X Ns Va .timecounter 47*9bb8172bSChristian Brueffercontrols support for the time counter functionality. 48*9bb8172bSChristian BruefferSetting this value to 49*9bb8172bSChristian Brueffer.Dv 0 50*9bb8172bSChristian Bruefferdisables it. 51*9bb8172bSChristian BruefferThe default value is 52*9bb8172bSChristian Brueffer.Dv 1 . 5376a6875bSAlexander Motin.It Va hw.i8254.freq 54*9bb8172bSChristian Bruefferallows overriding the default counter frequency. 55*9bb8172bSChristian BruefferThe same value is also available at run-time via the 5676a6875bSAlexander Motin.Va machdep.i8254_freq 5776a6875bSAlexander Motinsysctl. 5874f3a46aSAlexander Motin.El 5974f3a46aSAlexander Motin.Sh DESCRIPTION 6074f3a46aSAlexander MotinThis driver uses i8254 Programmable Interval Timer (AT Timer) hardware 61*9bb8172bSChristian Bruefferto supply the kernel with one timecounter and one event timer, and to generate 62*9bb8172bSChristian Brueffersound tones for the system speaker. 6374f3a46aSAlexander MotinThis hardware includes three channels. 64*9bb8172bSChristian BruefferEach channel includes a 16 bit counter which decreases with a known, 6574f3a46aSAlexander Motinplatform-dependent frequency. 6674f3a46aSAlexander MotinCounters can operate in several different modes, including periodic and 6774f3a46aSAlexander Motinone-shot. 68*9bb8172bSChristian BruefferThe output of each channel has platform-defined wiring: one channel is wired 6974f3a46aSAlexander Motinto the interrupt controller and may be used as event timer, one channel is 70*9bb8172bSChristian Bruefferwired to the speaker and used to generate sound tones, and one timer is reserved 7174f3a46aSAlexander Motinfor platform purposes. 7274f3a46aSAlexander Motin.Pp 73*9bb8172bSChristian BruefferThe 74*9bb8172bSChristian Brueffer.Nm 75*9bb8172bSChristian Bruefferdriver uses a single hardware channel to provide both time counter and event 7674f3a46aSAlexander Motintimer functionality. 77*9bb8172bSChristian BruefferTo make this possible, the respective counter must be running in periodic mode. 78*9bb8172bSChristian BruefferAs a result, the one-shot event timer mode is supported only when time counter 7974f3a46aSAlexander Motinfunctionality is disabled. 8074f3a46aSAlexander Motin.Pp 81*9bb8172bSChristian BruefferThe event timer provided by the driver is irrelevant to CPU power states. 8274f3a46aSAlexander Motin.Sh SEE ALSO 8373889c80SAlexander Motin.Xr apic 4 , 84c45456fbSAlexander Motin.Xr atrtc 4 , 8573889c80SAlexander Motin.Xr eventtimers 4 , 862a6be868SAlexander Motin.Xr hpet 4 , 872a6be868SAlexander Motin.Xr timecounters 4 88