1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 01:25:07 +00:00

Kernel: Create support for PCI ECAM

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.
This commit is contained in:
Liav A 2019-12-31 13:04:30 +02:00 committed by Andreas Kling
parent d85874be4b
commit e5ffa960d7
20 changed files with 878 additions and 16 deletions

View file

@ -290,10 +290,11 @@ RefPtr<GWidget> build_pci_devices_tab()
pci_fields.empend(
"Address", TextAlignment::CenterLeft,
[](const JsonObject& object) {
auto seg = object.get("seg").to_u32();
auto bus = object.get("bus").to_u32();
auto slot = object.get("slot").to_u32();
auto function = object.get("function").to_u32();
return String::format("%02x:%02x.%d", bus, slot, function);
return String::format("%04x:%02x:%02x.%d", seg, bus, slot, function);
});
pci_fields.empend(
"Class", TextAlignment::CenterLeft,