1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:47:35 +00:00

Kernel: Change PCI access commandline option to also represent no access

This change allow the user to request the kernel to not use any PCI
resources/devices at all.

Also, don't try to initialize devices that rely on PCI if disabled.
This commit is contained in:
Liav A 2022-01-21 16:09:05 +02:00 committed by Andreas Kling
parent 6bf59cbb1b
commit f6e635938f
5 changed files with 25 additions and 8 deletions

View file

@ -299,8 +299,10 @@ void init_stage2(void*)
}
// Initialize the PCI Bus as early as possible, for early boot (PCI based) serial logging
PCI::initialize();
PCISerialDevice::detect();
if (!kernel_command_line().is_pci_disabled()) {
PCI::initialize();
PCISerialDevice::detect();
}
VirtualFileSystem::initialize();
@ -321,10 +323,14 @@ void init_stage2(void*)
auto boot_profiling = kernel_command_line().is_boot_profiling_enabled();
USB::USBManagement::initialize();
if (!kernel_command_line().is_pci_disabled()) {
USB::USBManagement::initialize();
}
FirmwareSysFSDirectory::initialize();
VirtIO::detect();
if (!kernel_command_line().is_pci_disabled()) {
VirtIO::detect();
}
NetworkingManagement::the().initialize();
Syscall::initialize();