mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:17:35 +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
|
@ -11,6 +11,7 @@
|
|||
#include <Kernel/Bus/PCI/Access.h>
|
||||
#include <Kernel/Bus/PCI/Controller/HostBridge.h>
|
||||
#include <Kernel/Bus/PCI/Controller/MemoryBackedHostBridge.h>
|
||||
#include <Kernel/Bus/PCI/Initializer.h>
|
||||
#include <Kernel/Debug.h>
|
||||
#include <Kernel/Firmware/ACPI/Definitions.h>
|
||||
#include <Kernel/Memory/MemoryManager.h>
|
||||
|
@ -37,6 +38,11 @@ bool Access::is_initialized()
|
|||
return (s_access != nullptr);
|
||||
}
|
||||
|
||||
bool Access::is_disabled()
|
||||
{
|
||||
return g_pci_access_is_disabled_from_commandline || g_pci_access_io_probe_failed;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT bool Access::find_and_register_pci_host_bridges_from_acpi_mcfg_table(PhysicalAddress mcfg_table)
|
||||
{
|
||||
u32 length = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue