APIC mode

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.

To use the APIC mode on most hardware 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 :

References

IO APIC Specification

updated IO APIC Specification

Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3A (local APIC)