From 04a2ef0f6a10f9f94409f816cbd958168a5244cc Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 24 Nov 2026 16:44:54 +0100 Subject: kernel/devices: add a PCI function accessor type This change adds a type to identify and access PCI functions as part of the future PCI device tree support. A function_access object implements the pci_signature interface so future PCI devices can return a pointer to it in response to facet queries. Additionally, the accessor type implements the map_config function to map the associated function's configuration space, so drivers can gain access to a device's function-specific registers. Additionally, this change includes a test suite to verify the correct behavior of the accessor type, including corner cases such as functions outside the valid MMIO range. --- kernel/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'kernel/CMakeLists.txt') diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt index e8ba16eb..9feab671 100644 --- a/kernel/CMakeLists.txt +++ b/kernel/CMakeLists.txt @@ -44,6 +44,7 @@ target_sources("kernel_lib" PRIVATE "kernel/devices/block_device_utils.cpp" "kernel/devices/init.cpp" "kernel/devices/pci/ecam_segment.cpp" + "kernel/devices/pci/function_access.cpp" "kernel/devices/pci/init.cpp" "kernel/devices/pci/scan.cpp" "kernel/devices/pseudo.cpp" -- cgit v1.2.3