1.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" 27.Dd December 20, 2011 28.Dt APIC 4 29.Os 30.Sh NAME 31.Nm apic 32.Nd Advanced Programmable Interrupt Controller (APIC) driver 33.Sh SYNOPSIS 34This driver is a mandatory part of amd64 kernel. 35To compile this driver into i386 or pc98 kernel, 36place the following line in your 37kernel configuration file: 38.Bd -ragged -offset indent 39.Cd "device apic" 40.Ed 41.Pp 42The following tunable is settable from the 43.Xr loader 8 : 44.Bl -ohang 45.It Va hint.apic. Ns Ar X Ns Va .clock 46controls event timers functionality support. Setting to 0, disables it. 47Default value is 1. 48.It Va hint.apic. Ns Ar X Ns Va .disabled 49Set this to 1 to disable APIC support, falling back to the legacy PIC. 50.El 51.Sh DESCRIPTION 52There are two components in the Intel APIC system, the local APIC (LAPIC) 53and the I/O APIC. 54There is one local APIC in each CPU in the system. 55There is typically one I/O APIC for each peripheral bus in the system. 56.Pp 57Local APICs manage all external interrupts for a specific processor. 58In addition, they are able to accept and generate inter-processor interrupts 59(IPIs). 60.Pp 61I/O APICs contain a redirection table, which is used to route the interrupts 62they receive from peripheral buses to one or more local APICs. 63.Pp 64Each local APIC includes one 32-bit programmable timer. 65This driver uses them to supply kernel with one event timer named "LAPIC". 66Event timer provided by the driver supports both one-shot an periodic modes. 67Because of local APIC nature it is per-CPU. 68The timer frequency is not reported by the platform and so automatically 69measured by the driver on the first use. 70Depending on CPU model this timer may stop in C3 and deeper CPU sleep states. 71Driver automatically adjusts event timer priority and reports it to prevent 72entering dangerous sleep states when it is used. 73.Sh SEE ALSO 74.Xr atrtc 4 , 75.Xr attimer 4 , 76.Xr eventtimers 4 , 77.Xr hpet 4 78