User Tools

Site Tools


usersguide:apic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

usersguide:apic [2014/11/12 07:47]
lionelsambuc created
usersguide:apic [2016/11/13 05:12] (current)
rlfnb reflect current state
Line 1: Line 1:
-<div round info> 
-**Stale page** 
- 
-The contents of this page must be revised to reflect the current state of MINIX3. 
-</​div>​ 
- 
- 
 ===== APIC mode ===== ===== APIC mode =====
-[[http://​en.wikipedia.org/​wiki/​Advanced_Programmable_Interrupt_Controller|APIC]] is a successor to the legacy PIC. The main advantage ​is that together with IO APIC controllers it enables ​the system to use much more IRQ lines than the 16 legacy (E)ISA IRQs and thus possible much less IRQ sharing. Using local APICs is a requirement for multi-processor systems.+[[http://​en.wikipedia.org/​wiki/​Advanced_Programmable_Interrupt_Controller|APIC]] is a successor to the legacy PIC. We have to differ between local APIC, which is a kind of drop-in replacement for PIC and I/O APIC, which is necessary for SMP. The main advantage ​of local APIC is to enable ​the system to use much more IRQ lines than the 16 legacy (E)ISA IRQs and thus possible much less IRQ sharing. ​
  
 The local APIC code is always compiled in the MINIX kernel, however the default mode is PIC. The main reason is that in contrast to real hardware, when running Minix in a virtual machine the timing of the local APIC timer is difficult to configure right and the timer ticks much faster than it should. It is **//not//** a problem when Minix runs on real hardware. To turn the APIC mode on the **no_apic** variable must be set to **0** in the boot monitor. Although the no_ part may look confusing APIC is meant to become the default mode in Minix as soon as the timing issue in VMs is resolved and setting this variable should turn APIC off on old systems. The local APIC code is always compiled in the MINIX kernel, however the default mode is PIC. The main reason is that in contrast to real hardware, when running Minix in a virtual machine the timing of the local APIC timer is difficult to configure right and the timer ticks much faster than it should. It is **//not//** a problem when Minix runs on real hardware. To turn the APIC mode on the **no_apic** variable must be set to **0** in the boot monitor. Although the no_ part may look confusing APIC is meant to become the default mode in Minix as soon as the timing issue in VMs is resolved and setting this variable should turn APIC off on old systems.
  
-To use the APIC mode on most hardware [[:​acpi|ACPI]] driver is required as only through ACPI can we figure out how the interrupts are routed in the system. This is not an issue in systems like KVM which use only legacy interrupts. ​The ACPI driver is not part of the default image as it can only be compiled with a compiler that provides native 64bit integers. Use CC=gcc to compile such an image+To use the APIC mode on most hardware [[:​acpi|ACPI]] driver is required ​(**acpi=yes** in the boot monitor) ​as only through ACPI can we figure out how the interrupts are routed in the system. This is not an issue in systems like KVM which use only legacy interrupts. ​
  
 === Known issues : === === Known issues : ===
Line 17: Line 10:
   * PCI does not reset the interrupt-line-registers (ILR) of devices back to the legacy mode when shutting down, thus when rebooted without APIC mode the PCI devices will try to register IRQ > 15 which won't work   * PCI does not reset the interrupt-line-registers (ILR) of devices back to the legacy mode when shutting down, thus when rebooted without APIC mode the PCI devices will try to register IRQ > 15 which won't work
   * immediate reboot through boot monitor does not work, for some reason the interrupt controllers are not in like-after-boot state and Minix crashes. Otoh this brings the interrupt controllers to a "​good"​ state and next reboot works   * immediate reboot through boot monitor does not work, for some reason the interrupt controllers are not in like-after-boot state and Minix crashes. Otoh this brings the interrupt controllers to a "​good"​ state and next reboot works
 +  * local APIC seems to be broken ([[https://​github.com/​Stichting-MINIX-Research-Foundation/​minix/​issues/​181]])
 +
 +=== References ===
 +
 +[[http://​www.intel.com/​design/​chipsets/​datashts/​29056601.pdf| IO APIC Specification]]
 +
 +[[http://​www.intel.com/​design/​chipsets/​specupdt/​29071001.pdf|updated IO APIC Specification]]
 +
 +[[https://​software.intel.com/​sites/​default/​files/​managed/​7c/​f1/​253668-sdm-vol-3a.pdf|Intel® 64 and IA-32 Architectures Software Developer'​s Manual Volume 3A (local APIC)]]
usersguide/apic.txt · Last modified: 2016/11/13 05:12 by rlfnb