mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +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:
parent
d85874be4b
commit
e5ffa960d7
20 changed files with 878 additions and 16 deletions
|
@ -24,7 +24,7 @@ int main(int argc, char** argv)
|
|||
auto json = JsonValue::from_string(file_contents).as_array();
|
||||
json.for_each([db](auto& value) {
|
||||
auto dev = value.as_object();
|
||||
|
||||
auto seg = dev.get("seg").to_u32();
|
||||
auto bus = dev.get("bus").to_u32();
|
||||
auto slot = dev.get("slot").to_u32();
|
||||
auto function = dev.get("function").to_u32();
|
||||
|
@ -48,8 +48,8 @@ int main(int argc, char** argv)
|
|||
if (class_ptr != "")
|
||||
class_name = class_ptr;
|
||||
|
||||
printf("%02x:%02x.%d %s: %s %s (rev %02x)\n",
|
||||
bus, slot, function,
|
||||
printf("%04x:%02x:%02x.%d %s: %s %s (rev %02x)\n",
|
||||
seg, bus, slot, function,
|
||||
class_name.characters(), vendor_name.characters(),
|
||||
device_name.characters(), revision_id);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue