xref: /freebsd/share/man/man4/apic.4 (revision e0c4386e)
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.Dd June 19, 2020
26.Dt APIC 4
27.Os
28.Sh NAME
29.Nm apic
30.Nd Advanced Programmable Interrupt Controller (APIC) driver
31.Sh SYNOPSIS
32This driver is a mandatory part of amd64 kernel.
33To compile this driver into i386 kernel,
34place the following line in your
35kernel configuration file:
36.Bd -ragged -offset indent
37.Cd "device apic"
38.Ed
39.Pp
40The following tunables are settable from the
41.Xr loader 8 :
42.Bl -ohang
43.It Va hint.apic. Ns Ar X Ns Va .clock
44controls event timers functionality support.
45Setting to 0, disables it.
46Default value is 1.
47.It Va hint.apic. Ns Ar X Ns Va .disabled
48Set this to 1 to disable APIC support, falling back to the legacy PIC.
49.El
50.Sh DESCRIPTION
51There are two components in the Intel APIC system, the local APIC (LAPIC)
52and the I/O APIC.
53There is one local APIC in each CPU in the system.
54There is typically one I/O APIC for each peripheral bus in the system.
55.Pp
56Local APICs manage all external interrupts for a specific processor.
57In addition, they are able to accept and generate inter-processor interrupts
58(IPIs).
59.Pp
60I/O APICs contain a redirection table, which is used to route the interrupts
61they receive from peripheral buses to one or more local APICs.
62.Pp
63Each local APIC includes one 32-bit programmable timer.
64This driver uses them to supply kernel with one event timer named "LAPIC".
65Event timer provided by the driver supports both one-shot and periodic modes.
66Because of local APIC nature it is per-CPU.
67The timer frequency is not reported by the platform and so automatically
68measured by the driver on the first use.
69Depending on CPU model this timer may stop in C3 and deeper CPU sleep states.
70Driver automatically adjusts event timer priority and reports it to prevent
71entering dangerous sleep states when it is used.
72.Sh SEE ALSO
73.Xr atrtc 4 ,
74.Xr attimer 4 ,
75.Xr eventtimers 4 ,
76.Xr hpet 4
77