3

I had issues booting Ubuntu on a machine and adding noapic and noacpi to vmlinuz boot option solved the issue.

I am aware of noapic is to disable interrupt remap and noacpi is related to power config, but what do they actually do in linux kernel? Do they skip loading specific modules?

1 Answer 1

4

As per Linux Admin Guide Kernel Parameters documentation,

noapic          [SMP,APIC] Tells the kernel to not make use of any
                IOAPICs that may be present in the system.
pci=noacpi      [X86] Do not use ACPI for IRQ routing
            or for PCI scanning.

From a programmatic perspective noapic sets the variable disable_apic to 1 in setup_disableapic of /arch/x86/kernel/apic/apic.c which results in apic_intr_mode_select returning APIC_PIC, which results in the apic_intr_mode_init function leaving the PIC in PIC mode(8259) and in default_setup_apic_routing not being called.

And pci=noacpi calls results in parse_pci(char *arg) in https://elixir.bootlin.com/linux/v4.19/source/arch/x86/kernel/acpi/boot.c#L1689, calling acpi_disable_pci which sets acpi_pci_disabled to 1 and calls acpi_noirq_set to do as specified by the documentation.

For additional background information, see the following resources What are the "acpi" and "noapic" kernel boot options? Redhat Knowledge Base and IRQ, ACPI and APIC and the Linux kernel

1
  • Very interesting. Could you elaborate on the side effects of using noapic? The linked documents do explain a bit, but not much more than "Disabling APIC removes the ability to make use of IRQ sharing or device IRQ remapping."
    – djvg
    Commented Nov 14, 2020 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.