Advanced Programmable Interrupt Controller: Difference between revisions

Content deleted Content added
17
Tag: extraneous markup
Line 17:
In a multiprocessor 486 system, each CPU had to be paired with its own 82489DX; additionally a supplementary 82489DX had to be used as I/O APIC. The 82489DX could not emulate the 8259A (XT-PIC) so these also had to be included as physical chips for backwards compatibility.<ref>Intel MultiProcessor Specification, version 1.4, page 5-3, May 1997</ref> The 82489DX was a packaged as a 132-pin [[PQFP]].<ref name="Ram2001"/>
 
≥≥≥≥≥≥≥≥≥ ,kk,l.79655==Integrated local APICs==
Local APICs (LAPICs) manage all external interrupts for some specific processor in an SMP system. In addition, they are able to accept and generate [[inter-processor interrupt]]s (IPIs) between LAPICs. LAPICs may support up to 224 usable [[interrupt]] vectors from an I/O APIC. Vector numbers 0 to 31, out of 0 to 255, are reserved for exception handling by x86 processors.
 
All Intel processors starting with the P5 microarchitecture ([[P54C]]) have a built-in local APIC.<ref name="Mueller2011" /><ref name="timer" /> However, if the local APIC is disabled in a P5 processor, it cannot be re-enabled by software; this limitation no longer exists in the [[P6 (microarchitecture)|P6 processors]] and later ones.<ref name="timer" /> In single-processor systems, the major advantage of the local APIC is that [[Peripheral Component Interconnect|PCI]] cards no longer need to have their interrupts mapped to ISA interrupts, but can use virtual PCI IRQs above 15, resulting in fewer conflicts and better performance.<ref name="Mueller2011" />t51461+64515546633643646266462346+67616645259689665666656+65655665658336+66+3666+33+6+
6+6+++66+656366+5++63++69
 
In the Microsoft family of operating systems, [[Windows XP]] was the first to properly make use of virtual [[Interrupt request (PC architecture)|IRQ]]s provided by the local APIC, with some partial support present in [[Windows 2000]].<ref name="Mueller2011">{{cite book|author=Scott M. Mueller|title=Upgrading and Repairing PCs|year=2011|publisher=Que Publishing|isbn=978-0-13-268218-3|page=242|edition=20th}}</ref> In Windows 2000, the spreading of PCI card interrupts to virtual IRQ happens only if the machine also has an I/O APIC. Microsoft blamed their Windows 2000 implementation on information they had received from Intel supposedly promising that all future systems would contain an I/O APIC as well, something that in retrospect did not happen.<ref name="up">{{cite web|url=http://msdn.microsoft.com/en-us/windows/hardware/gg462964.aspx|title=Windows Hardware Dev Center|website=msdn.microsoft.com}}</ref> (A Microsoft document from that era even claimed that "without an I/O APIC in the system, the local APICs are useless. In such a situation, Windows 2000 has to revert to using the 8259 PIC."<ref>{{cite web|url=http://www.microsoft.com/whdc/archive/io-apic.mspx|title=Content not found|website=www.microsoft.com}}</ref>) The sudden widespread use of the local APIC with Windows XP did expose a number of bugs in various BIOS implementations. In particular, Microsoft was forced to retain the PCI IRQ stacking behavior for any machine with a [[CardBus]] controller (and without an I/O APIC).<ref name="up"/>
 
 
7but can use virtual PCI IRQs above 15, resulting in fewer conflicts and better performance.<ref name="Mueller2011" />
 
#REDIRECT [[
#REDIRECT [[Target page name]]
#REDIRECT79565556
]]
]]
]]
]]
In the Microsoft family of operating systems, [[Windowsows XP]] was the first to properly make use of virtual [[Interrupt request (PC architecture)|IRQ]]s provided by the local APIC, with some partial support present in [[Windows 2000]].<ref name="Mueller2011">{{cite book|author=Scott M. Mueller|title=Upgrading and Repairing PCs|year=2011|publisher=Que Publishing|isbn=978-0-13-268218-3|page=242|edition=20th}}</ref> In Windows 2000, the spreading of PCI card interrupts to virtual IRQ happens only if the machine also has an I/O APIC. Microsoft blamed their Windows 2000 implementation on information they had received from Intel supposedly promising that all future systems would contain an I/O APIC as well, something that in retrospect did not happen.<ref name="up">{{cite web|url=http://msdn.microsoft.com/en-us/windows/hardware/gg462964.aspx|title=Windows Hardware Dev Center|website=msdn.microsoft.com}}</ref> (A Microsoft document from that era even claimed that "without an I/O APIC in the system, the local APICs are useless. In such a situation, Windows 2000 has to revert to using the 8259 PIC."<ref>{{cite web|url=http://www.microsoft.com/whdc/archive/io-apic.mspx|title=Content not found|website=www.microsoft.com}}</ref>) The sudden widespread use of the local APIC with Windows XP did expose a number of bugs in various BIOS implementations. In particular, Microsoft was forced to retain the PCI IRQ stacking behavior for any machine with a [[CardBus]] controller (and without an I/O APIC).<ref name="up"/>
7826633oim,ookö''Italic text''
The [[Message Signaled Interrupts]] (MSI) feature of the PCI 2.2 and later specifications cannot be used without the local APIC being enabled.<ref name="up"/> Use of MSI obviates the need for an I/O APIC. Additionally, up to 224 interrupts are supported in MSI mode, and IRQ sharing is not allowed.<ref name="msi"/>
 
Line 29 ⟶ 41:
Another advantage of the local APIC is that it also provides a high-resolution (on the order of one [[microsecond]] or better) timer that can be used in both interval and one-off mode.<ref name="timer">Uwe Walter, Vincent Oberle [http://telematics.tm.kit.edu/publications/Files/61/walter_ibm_linux_challenge.pdf μ-second precision timer support for the Linux kernel]</ref>
 
The APIC timer had its initial acceptance woes. A Microsoft document from 2002 (which advocated for the adoption of [[High Precision Event Timer]] instead) criticized the LAPIC timer for having "poor resolution" and stating that "the clocks silicon is sometimes very buggy".<Ref>[http://msdn.microsoft.com/en-us/library/windows/hardware/gg463347.aspx Guidelines For Providing Multimedia Timer Support], September 20, 2002</ref> Nevertheless, the APIC timer is used for example by [[Windows 7]] when [[Profiling (computer programming)|profiling]] is enabled, and by [[Windows 8]] in all circumstances. (Before Windows 8 claimed exclusive rights to this timer, it was also used by some programs like [[CPU-Z]].) Under Microsoft Windows the APIC timer is not a shareable resource.<ref>[http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/5d075378-a45f-433b-a3f7-73f974ec962f/windows-8-and-apic-timer?forum=wdk Windows 8 and APIC timer] {{webarchive |url=https://web.archive.org/web/20140222070735/http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/5d075378-a45f-433b-a3f7-73f974ec962f/windows-8-and-apic-timer?forum=wdk |date=February 22, 2014 }}</ref>
 
The aperiodic interrupts offered by the APIC timer are used by the [[Linux kernel]] from 2.6.18 onwards to implement its [[tickless kernel]] feature; the legacy [[8253]] [[Programmable Interval Timer]] is no longer used by tickless kernels.<ref>{{cite web|url=http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005802|title=VMware Knowledge Base|website=kb.vmware.com}}</ref> A [[VMware]] document notes that "software does not have a reliable way to determine its frequency. Generally, the only way to determine the local APIC timer’s frequency is to measure it using the PIT or CMOS timer, which yields only an approximate result."<ref name="vmware">[http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf Timekeeping in VMware Virtual Machines (for VMware vSphere 5.0, Workstation 8.0, Fusion 4.0)], page 8</ref>