User Tools

Site Tools


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 :

  • APIC timer ticks too fast in virtual-machines. Set apic_timer_x=N in boot monitor to slow it down N timer. The recommended value is ~10, try out what is the best match for your configuration.
  • 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


usersguide/apic.txt · Last modified: 2016/11/13 11:12 by rlfnb