mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
Kernel/PCI: Unify disable checks under PCI::Access::is_disabled method
To declare that we don't have a PCI bus in the system we do two things: 1. Probe IO ports before enabling access - In case we are using the QEMU ISA-PC machine type, IO probing results in floating bus condition (returning 0xFF values), thus, we know we don't have PCI bus on the system. 2. Allow the user to specify to not use the PCI bus at all in the kernel commandline.
This commit is contained in:
parent
f6e635938f
commit
2272d93215
5 changed files with 22 additions and 6 deletions
|
@ -299,8 +299,8 @@ void init_stage2(void*)
|
|||
}
|
||||
|
||||
// Initialize the PCI Bus as early as possible, for early boot (PCI based) serial logging
|
||||
if (!kernel_command_line().is_pci_disabled()) {
|
||||
PCI::initialize();
|
||||
PCI::initialize();
|
||||
if (!PCI::Access::is_disabled()) {
|
||||
PCISerialDevice::detect();
|
||||
}
|
||||
|
||||
|
@ -323,12 +323,12 @@ void init_stage2(void*)
|
|||
|
||||
auto boot_profiling = kernel_command_line().is_boot_profiling_enabled();
|
||||
|
||||
if (!kernel_command_line().is_pci_disabled()) {
|
||||
if (!PCI::Access::is_disabled()) {
|
||||
USB::USBManagement::initialize();
|
||||
}
|
||||
FirmwareSysFSDirectory::initialize();
|
||||
|
||||
if (!kernel_command_line().is_pci_disabled()) {
|
||||
if (!PCI::Access::is_disabled()) {
|
||||
VirtIO::detect();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue