我在计算机上启动Ubuntu并将noapic和noacpi添加到vmlinuz引导选项时遇到了问题。
我知道noapic是禁用中断重映射,并且noacpi与电源配置有关,但是它们实际上在Linux内核中做什么?他们会跳过特定模块的加载吗?
答案 0 :(得分:1)
根据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.
从编程角度来看,noapic在 setup_disableapic of /arch/x86/kernel/apic/apic.c中将变量disable_apic设置为1,这导致apic_intr_mode_select
返回APIC_PIC,这导致apic_intr_mode_init函数使PIC处于PIC模式(8259)并且没有default_setup_apic_routing
被调用。
然后pci=noacpi
调用https://elixir.bootlin.com/linux/v4.19/source/arch/x86/kernel/acpi/boot.c#L1689中的parse_pci(char *arg)
,调用acpi_disable_pci,将acpi_pci_disabled
设置为1,并调用acpi_noirq_set
进行指定操作根据文档。
有关其他背景信息,请参见以下资源What are the "acpi" and "noapic" kernel boot options? Redhat Knowledge Base和IRQ, ACPI and APIC and the Linux kernel