From 7cd583b49ab304c1a94bc8e9c2be06e7634dc2bf Mon Sep 17 00:00:00 2001 From: mav Date: Tue, 20 Dec 2011 13:49:52 +0000 Subject: Add apic(4) man page, now mostly to cover its event timer functionality. --- share/man/man4/Makefile | 2 ++ share/man/man4/apic.4 | 78 ++++++++++++++++++++++++++++++++++++++++++++ share/man/man4/atrtc.4 | 5 +-- share/man/man4/attimer.4 | 5 +-- share/man/man4/eventtimers.4 | 1 + share/man/man4/hpet.4 | 1 + 6 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 share/man/man4/apic.4 diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 69e9a7c..4c93cfc 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -38,6 +38,7 @@ MAN= aac.4 \ ${_amdtemp.4} \ amr.4 \ an.4 \ + ${_apic.4} \ arcmsr.4 \ ${_asmc.4} \ asr.4 \ @@ -673,6 +674,7 @@ _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 _aesni.4= aesni.4 +_apic.4= apic.4 _atrtc.4= atrtc.4 _attimer.4= attimer.4 _aibs.4= aibs.4 diff --git a/share/man/man4/apic.4 b/share/man/man4/apic.4 new file mode 100644 index 0000000..89a869d --- /dev/null +++ b/share/man/man4/apic.4 @@ -0,0 +1,78 @@ +.\" Copyright (c) 2011 Alexander Motin +.\" 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. +To compile this driver into i386 or pc98 kernel, +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 +controls event timers functionality support. Setting to 0, disables it. +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. +There is one LAPIC in each CPU in the system. +There is typically one I/O APIC for each peripheral bus in the system. +.Pp +LAPICs manage all external and interrupts for specific processor in an +SMP system. +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 +Each LAPIC includes one 32-bit programable timer. +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. +Because of LAPIC nature it is per-CPU. +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 diff --git a/share/man/man4/atrtc.4 b/share/man/man4/atrtc.4 index 2a75d03..0b0dd8f 100644 --- a/share/man/man4/atrtc.4 +++ b/share/man/man4/atrtc.4 @@ -51,6 +51,7 @@ divisors. .Pp Event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO +.Xr apic 4 , .Xr attimer 4 , -.Xr hpet 4 , -.Xr eventtimers 4 +.Xr eventtimers 4 , +.Xr hpet 4 diff --git a/share/man/man4/attimer.4 b/share/man/man4/attimer.4 index 6dd4ee2..78d40d4 100644 --- a/share/man/man4/attimer.4 +++ b/share/man/man4/attimer.4 @@ -70,6 +70,7 @@ functionality is disabled. .Pp Event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO +.Xr apic 4 , .Xr atrtc 4 , -.Xr hpet 4 , -.Xr eventtimers 4 +.Xr eventtimers 4 , +.Xr hpet 4 diff --git a/share/man/man4/eventtimers.4 b/share/man/man4/eventtimers.4 index c74c3c4..e29d32f8 100644 --- a/share/man/man4/eventtimers.4 +++ b/share/man/man4/eventtimers.4 @@ -145,6 +145,7 @@ and runs in periodic mode, this option has no effect - all interrupts are always generating. .El .Sh SEE ALSO +.Xr apic 4 , .Xr atrtc 4 , .Xr attimer 4 , .Xr hpet 4 , diff --git a/share/man/man4/hpet.4 b/share/man/man4/hpet.4 index bcfea1c..092996c 100644 --- a/share/man/man4/hpet.4 +++ b/share/man/man4/hpet.4 @@ -94,6 +94,7 @@ group is bound to specific CPU core. This is possible only when each of these comparators has own unsharable IRQ. .Sh SEE ALSO .Xr acpi 4 , +.Xr apic 4 , .Xr atrtc 4 , .Xr attimer 4 , .Xr eventtimers 4 -- cgit v1.1