aboutsummaryrefslogtreecommitdiff
path: root/cspell.json
AgeCommit message (Collapse)AuthorFilesLines
24 hourskernel/devices: extract bus scanning implementationfmorgner/pcie-scanFelix Morgner1-0/+2
This change extracts the PCI bus scanning logic, which previously was hidden inside an anonymous namespace, into a dedicated function. This allows for the implementation to be tested independently.
24 hourskernel/devices: introduce PCI function_infoFelix Morgner1-0/+1
Besides address information, each PCI function also has associated metadata. The function_info type carries the standard metadata for a PCI function: vendor and device IDs, the class code 3-tuple, and the header type. A bus scan reads those values when enumerating the PCI ECAM data, and returns it. The header type of the is stored in its raw form, encoding both the type of the PCI function header, as well as the multi-function flag. function_info provides two functions (type() and is_multifunction()) to extract those pieces of information from the raw header type value. In addition to the type extraction function, this change introduces an enumeration type (kernel::devices::pci::header_type) representing the standardized type values for PCI function headers. Unknown function types are presented as opaque values. Unit tests for derived attributes of a PCI function are provided.
24 hourskernel/devices: introduce PCI ecam_segment abstractionFelix Morgner1-0/+1
Previously, ECAM access was implemented "in-place" inside the PCI scan function. This meant that any checks were ad-hoc and not easily reusable or testable. Therefore, this change introduces a dedicated, reusable abstraction for ECAM segment access. It validates segment descriptors received from the platform and ensures no out-of-bounds buses are accessed at runtime. Construction of an ecam_segment will always succeed. If the firmware or platform data does not describe a valid segment, the ecam_segment will behave as if it had a size of zero, with a kernel log indicating the invalid segment. Attempting to map a bus that is out-of-bounds for a given ecam_segment will return a runtime error. If the system's MMIO space is insufficient to accommodate the mapping of a valid bus in an ecam_segment, a runtime error will be returned. Furthermore, this change introduces the kernel::devices::pci namespace. PCI initialization and scanning functionality, previously hosted in kernel/kernel/devices/pci_express.{cpp,hpp}, has been relocated and renamed to kernel/kernel/devices/pci/init.{cpp,hpp}. The initialization function of the PCI subsystem has been renamed from kernel::devices::init_pci_express_devices to kernel::devices::pci::init. The observable behavior of the PCI scan remains unchanged. Tests have been added to validate the behavior of ecam_segment against its contract.
11 dayskstd: add Catch2 string makers for printable test outputmanuel1-0/+1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-08-20chore: normalize comment format in archFelix Morgner1-0/+4
2026-07-24kernel: restructure devices and driversFelix Morgner1-0/+1
2026-07-23kernel: port ram disk to new driver architectureFelix Morgner1-0/+1
2026-06-15build: configure naming rule checksFelix Morgner1-1/+3
2026-06-15ide: move cspell words to cspell.jsonFelix Morgner1-0/+51