ATTIMER(4)
π ATTIMER(4) β the i8254 Programmable Interval Timer (AT Timer) driver, explained π
okay so this is the attimer page from the Kernel Interfaces Manual, and it's genuinely one of those "small driver, big responsibilities" situations. it's giving quiet main character energy. let's get into it π«Ά
β¨ NAME β¨
attimer β the i8254 Programmable Interval Timer (AT Timer) driver. yes bestie, that's the beepy-ticky one π
πΈ SYNOPSIS πΈ
this driver is a mandatory part of x86 kernels, so no, you can't just opt out, it's not that kind of party π
the following tunables are settable from loader(8):
hint.attimer.X.clock
- controls support for the event timer functionality π°οΈ
- setting this value to
0disables it - the default value is
1
hint.attimer.X.timecounter
- controls support for the time counter functionality β±οΈ
- setting this value to
0disables it - the default value is
1
hw.i8254.freq
- lets you override the default counter frequency ποΈ
- the same value is also available at run-time via the
machdep.i8254_freqsysctl
lowkey important:hw.i8254.freqandmachdep.i8254_freqare literally the same value, one's the loader-time knob and one's the run-time view. iykyk π
π¦ DESCRIPTION π¦
so this driver takes the i8254 Programmable Interval Timer (AT Timer) hardware and uses it to hand the kernel one timecounter and one event timer, plus it generates sound tones for the system speaker πβ¨ like, multitasking icon behavior.
the hardware itself includes three channels. and each channel includes a 16 bit counter which decreases with a known, platform-dependent frequency. counters can operate in several different modes, including periodic and one-shot β so you've got options, she's versatile πββοΈ
the output of each channel has platform-defined wiring, and here's the breakdown:
- one channel is wired to the interrupt controller and may be used as the event timer π°οΈ
- one channel is wired to the speaker and is used to generate sound tones π΅
- one timer is reserved for platform purposes (hands off, she's busy) π
and here's the clever-but-slightly-fussy part: the attimer driver uses a single hardware channel to provide both time counter and event timer functionality. to make that possible, the respective counter must be running in periodic mode. and because of that, the one-shot event timer mode is supported only when time counter functionality is disabled β οΈ like, that's the tradeoff, that's the deal, no cap.
also worth knowing, fr fr: the event timer provided by the driver is irrelevant to CPU power states π so don't go expecting it to have opinions about your power management. it does not.
π SEE ALSO π
go read those too, bestie, they're the friend group ππ
and that's the whole page, periodt π this one came from Debian, dated May 26, 2014 β yes she's a 2014 queen and she's still holding it down β bye bestie, go configure your timers responsibly π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms