mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
e5ffa960d7
The new PCI subsystem is initialized during runtime. PCI::Initializer is supposed to be called during early boot, to perform a few tests, and initialize the proper configuration space access mechanism. Kernel boot parameters can be specified by a user to determine what tests will occur, to aid debugging on problematic machines. After that, PCI::Initializer should be dismissed. PCI::IOAccess is a class that is derived from PCI::Access class and implements PCI configuration space access mechanism via x86 IO ports. PCI::MMIOAccess is a class that is derived from PCI::Access and implements PCI configurtaion space access mechanism via memory access. The new PCI subsystem also supports determination of IO/MMIO space needed by a device by checking a given BAR. In addition, Every device or component that use the PCI subsystem has changed to match the last changes.
22 lines
No EOL
574 B
C++
22 lines
No EOL
574 B
C++
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
#include <Kernel/ACPI/Definitions.h>
|
|
#include <Kernel/PCI/Definitions.h>
|
|
|
|
class PCI::Initializer {
|
|
public:
|
|
static PCI::Initializer& the();
|
|
void initialize_pci_mmio_access(ACPI_RAW::MCFG& mcfg);
|
|
void initialize_pci_io_access();
|
|
void test_and_initialize(bool disable_pci_mmio, bool pci_force_probing);
|
|
static void dismiss();
|
|
|
|
private:
|
|
~Initializer();
|
|
Initializer();
|
|
bool test_acpi();
|
|
bool test_pci_io(bool pci_force_probing);
|
|
bool test_pci_mmio();
|
|
void initialize_pci_mmio_access_after_test();
|
|
}; |