xref: /freebsd/share/man/man4/apic.4 (revision 2e4311906d8c8dc7a7c726345268253bca6d4acc)
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 June 19, 2020
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 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 tunables are 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.
47Setting to 0, disables it.
48Default value is 1.
49.It Va hint.apic. Ns Ar X Ns Va .disabled
50Set this to 1 to disable APIC support, falling back to the legacy PIC.
51.El
52.Sh DESCRIPTION
53There are two components in the Intel APIC system, the local APIC (LAPIC)
54and the I/O APIC.
55There is one local APIC in each CPU in the system.
56There is typically one I/O APIC for each peripheral bus in the system.
57.Pp
58Local APICs manage all external interrupts for a specific processor.
59In addition, they are able to accept and generate inter-processor interrupts
60(IPIs).
61.Pp
62I/O APICs contain a redirection table, which is used to route the interrupts
63they receive from peripheral buses to one or more local APICs.
64.Pp
65Each local APIC includes one 32-bit programmable timer.
66This driver uses them to supply kernel with one event timer named "LAPIC".
67Event timer provided by the driver supports both one-shot and periodic modes.
68Because of local APIC nature it is per-CPU.
69The timer frequency is not reported by the platform and so automatically
70measured by the driver on the first use.
71Depending on CPU model this timer may stop in C3 and deeper CPU sleep states.
72Driver automatically adjusts event timer priority and reports it to prevent
73entering dangerous sleep states when it is used.
74.Sh SEE ALSO
75.Xr atrtc 4 ,
76.Xr attimer 4 ,
77.Xr eventtimers 4 ,
78.Xr hpet 4
79