From 05115c3961d316fd52409a753a88dd573cab4860 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 16 Nov 2026 17:41:05 +0100 Subject: 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. --- cspell.json | 1 + 1 file changed, 1 insertion(+) (limited to 'cspell.json') diff --git a/cspell.json b/cspell.json index d921938e..6f37d13e 100644 --- a/cspell.json +++ b/cspell.json @@ -7,6 +7,7 @@ "acpi", "APIC", "bugprone", + "cardbus", "Constexpr", "cppcoreguidelines", "cpuid", -- cgit v1.2.3