2011-12-20 13:49:52 +00:00
|
|
|
.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
|
|
|
|
.\" 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.
|
|
|
|
.\" 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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$
|
|
|
|
.\"
|
|
|
|
.Dd December 20, 2011
|
|
|
|
.Dt APIC 4
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm apic
|
|
|
|
.Nd Advanced Programmable Interrupt Controller (APIC) driver
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
This driver is a mandatory part of amd64 kernel.
|
2017-01-28 02:22:15 +00:00
|
|
|
To compile this driver into i386 kernel,
|
2011-12-20 13:49:52 +00:00
|
|
|
place the following line in your
|
|
|
|
kernel configuration file:
|
|
|
|
.Bd -ragged -offset indent
|
|
|
|
.Cd "device apic"
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The following tunable is settable from the
|
|
|
|
.Xr loader 8 :
|
|
|
|
.Bl -ohang
|
|
|
|
.It Va hint.apic. Ns Ar X Ns Va .clock
|
2016-06-08 08:50:35 +00:00
|
|
|
controls event timers functionality support.
|
|
|
|
Setting to 0, disables it.
|
2011-12-20 13:49:52 +00:00
|
|
|
Default value is 1.
|
|
|
|
.It Va hint.apic. Ns Ar X Ns Va .disabled
|
|
|
|
Set this to 1 to disable APIC support, falling back to the legacy PIC.
|
|
|
|
.El
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
There are two components in the Intel APIC system, the local APIC (LAPIC)
|
|
|
|
and the I/O APIC.
|
2011-12-20 15:19:33 +00:00
|
|
|
There is one local APIC in each CPU in the system.
|
2011-12-20 13:49:52 +00:00
|
|
|
There is typically one I/O APIC for each peripheral bus in the system.
|
|
|
|
.Pp
|
2011-12-20 15:19:33 +00:00
|
|
|
Local APICs manage all external interrupts for a specific processor.
|
2011-12-20 13:49:52 +00:00
|
|
|
In addition, they are able to accept and generate inter-processor interrupts
|
|
|
|
(IPIs).
|
|
|
|
.Pp
|
|
|
|
I/O APICs contain a redirection table, which is used to route the interrupts
|
|
|
|
they receive from peripheral buses to one or more local APICs.
|
|
|
|
.Pp
|
2012-01-05 21:43:33 +00:00
|
|
|
Each local APIC includes one 32-bit programmable timer.
|
2011-12-20 13:49:52 +00:00
|
|
|
This driver uses them to supply kernel with one event timer named "LAPIC".
|
|
|
|
Event timer provided by the driver supports both one-shot an periodic modes.
|
2011-12-20 15:19:33 +00:00
|
|
|
Because of local APIC nature it is per-CPU.
|
2011-12-20 13:49:52 +00:00
|
|
|
The timer frequency is not reported by the platform and so automatically
|
|
|
|
measured by the driver on the first use.
|
|
|
|
Depending on CPU model this timer may stop in C3 and deeper CPU sleep states.
|
|
|
|
Driver automatically adjusts event timer priority and reports it to prevent
|
|
|
|
entering dangerous sleep states when it is used.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr atrtc 4 ,
|
|
|
|
.Xr attimer 4 ,
|
|
|
|
.Xr eventtimers 4 ,
|
|
|
|
.Xr hpet 4
|