xref: /freebsd/share/man/man4/apic.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
173889c80SAlexander Motin.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
273889c80SAlexander Motin.\" All rights reserved.
373889c80SAlexander Motin.\"
473889c80SAlexander Motin.\" Redistribution and use in source and binary forms, with or without
573889c80SAlexander Motin.\" modification, are permitted provided that the following conditions
673889c80SAlexander Motin.\" are met:
773889c80SAlexander Motin.\" 1. Redistributions of source code must retain the above copyright
873889c80SAlexander Motin.\"    notice, this list of conditions and the following disclaimer.
973889c80SAlexander Motin.\" 2. Redistributions in binary form must reproduce the above copyright
1073889c80SAlexander Motin.\"    notice, this list of conditions and the following disclaimer in the
1173889c80SAlexander Motin.\"    documentation and/or other materials provided with the distribution.
1273889c80SAlexander Motin.\"
1373889c80SAlexander Motin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1473889c80SAlexander Motin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1573889c80SAlexander Motin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1673889c80SAlexander Motin.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1773889c80SAlexander Motin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1873889c80SAlexander Motin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1973889c80SAlexander Motin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2073889c80SAlexander Motin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2173889c80SAlexander Motin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2273889c80SAlexander Motin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2373889c80SAlexander Motin.\" SUCH DAMAGE.
2473889c80SAlexander Motin.\"
25135a5514STom Jones.Dd June 19, 2020
2673889c80SAlexander Motin.Dt APIC 4
2773889c80SAlexander Motin.Os
2873889c80SAlexander Motin.Sh NAME
2973889c80SAlexander Motin.Nm apic
3073889c80SAlexander Motin.Nd Advanced Programmable Interrupt Controller (APIC) driver
3173889c80SAlexander Motin.Sh SYNOPSIS
3273889c80SAlexander MotinThis driver is a mandatory part of amd64 kernel.
332b375b4eSYoshihiro TakahashiTo compile this driver into i386 kernel,
3473889c80SAlexander Motinplace the following line in your
3573889c80SAlexander Motinkernel configuration file:
3673889c80SAlexander Motin.Bd -ragged -offset indent
3773889c80SAlexander Motin.Cd "device apic"
3873889c80SAlexander Motin.Ed
3973889c80SAlexander Motin.Pp
40*aa798fc2SMateusz PiotrowskiThe following tunables are settable from the
4173889c80SAlexander Motin.Xr loader 8 :
4273889c80SAlexander Motin.Bl -ohang
4373889c80SAlexander Motin.It Va hint.apic. Ns Ar X Ns Va .clock
4425972509SEdward Tomasz Napieralacontrols event timers functionality support.
4525972509SEdward Tomasz NapieralaSetting to 0, disables it.
4673889c80SAlexander MotinDefault value is 1.
4773889c80SAlexander Motin.It Va hint.apic. Ns Ar X Ns Va .disabled
4873889c80SAlexander MotinSet this to 1 to disable APIC support, falling back to the legacy PIC.
4973889c80SAlexander Motin.El
5073889c80SAlexander Motin.Sh DESCRIPTION
5173889c80SAlexander MotinThere are two components in the Intel APIC system, the local APIC (LAPIC)
5273889c80SAlexander Motinand the I/O APIC.
538f72e930SAlexander MotinThere is one local APIC in each CPU in the system.
5473889c80SAlexander MotinThere is typically one I/O APIC for each peripheral bus in the system.
5573889c80SAlexander Motin.Pp
568f72e930SAlexander MotinLocal APICs manage all external interrupts for a specific processor.
5773889c80SAlexander MotinIn addition, they are able to accept and generate inter-processor interrupts
5873889c80SAlexander Motin(IPIs).
5973889c80SAlexander Motin.Pp
6073889c80SAlexander MotinI/O APICs contain a redirection table, which is used to route the interrupts
6173889c80SAlexander Motinthey receive from peripheral buses to one or more local APICs.
6273889c80SAlexander Motin.Pp
6389486220SUlrich SpörleinEach local APIC includes one 32-bit programmable timer.
6473889c80SAlexander MotinThis driver uses them to supply kernel with one event timer named "LAPIC".
65135a5514STom JonesEvent timer provided by the driver supports both one-shot and periodic modes.
668f72e930SAlexander MotinBecause of local APIC nature it is per-CPU.
6773889c80SAlexander MotinThe timer frequency is not reported by the platform and so automatically
6873889c80SAlexander Motinmeasured by the driver on the first use.
6973889c80SAlexander MotinDepending on CPU model this timer may stop in C3 and deeper CPU sleep states.
7073889c80SAlexander MotinDriver automatically adjusts event timer priority and reports it to prevent
7173889c80SAlexander Motinentering dangerous sleep states when it is used.
7273889c80SAlexander Motin.Sh SEE ALSO
7373889c80SAlexander Motin.Xr atrtc 4 ,
7473889c80SAlexander Motin.Xr attimer 4 ,
7573889c80SAlexander Motin.Xr eventtimers 4 ,
7673889c80SAlexander Motin.Xr hpet 4
77