diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-11-16 17:41:05 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-11-22 14:20:36 +0100 |
| commit | 05115c3961d316fd52409a753a88dd573cab4860 (patch) | |
| tree | bcd4f4da7920841ff072ca73f08471d031231a80 /kernel/kapi/devices/interface_registry.tests.cpp | |
| parent | 0dfdb6c4f4aa428d6e1951958edafd82b87a0af8 (diff) | |
| download | kernel-05115c3961d316fd52409a753a88dd573cab4860.tar.xz kernel-05115c3961d316fd52409a753a88dd573cab4860.zip | |
kernel/devices: introduce PCI function_info
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.
Diffstat (limited to 'kernel/kapi/devices/interface_registry.tests.cpp')
0 files changed, 0 insertions, 0 deletions
