diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-11-26 17:33:28 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-11-26 17:33:28 +0100 |
| commit | d3b886490569b22794c10cc8493121cfd151f271 (patch) | |
| tree | 605b3ed9d35ffdc5986e26ae7c9ea4ff8bf61816 /kernel/kapi/filesystem.cpp | |
| parent | 64add5ecf8e0f9a5db5f5f6eb1a90de547b5e004 (diff) | |
| download | kernel-d3b886490569b22794c10cc8493121cfd151f271.tar.xz kernel-d3b886490569b22794c10cc8493121cfd151f271.zip | |
kernel/devices: add PCI bridge device support
This change adds support for PCI-to-PCI bridge devices. The pci::bridge
class is derived from kapi::devices::bus, because PCI-to-PCI bridges are
hardware devices that connect two PCI buses together. The bridge class
is located in the devices::pci namespace, because it depends on both
ecam_segment and function_info, both of which are defined in the same
namespace. No type of function in the kernel::bus namespace hierarchy
may depend on any type or function of the kernel::device namespace
hierarchy. Because a PCI-to-PCI bridge is a PCI function, the bridge
class also provides the bus::pci::signature and
bus::pci::configuration_access through function_access.
Since the bridge device is a kapi::devices::bus, this change also
introduces the TU-local bridge_protocol class, derived from
kernel::bus::pci::protocol. It inherits the driver matching logic from
the base class. Its enumerate function is a no-op, because the
host-bridge will be responsible for enumerating all buses of its
segment. This means that the bridge itself does not need to enumerate
its own children, since they will be attached to the bridge by the
host-bridge bus enumeration process.
This change includes tests that exercise the device attachment and
driver matching contract.
Diffstat (limited to 'kernel/kapi/filesystem.cpp')
0 files changed, 0 insertions, 0 deletions
