aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kapi/devices/pci_express.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-11-13 08:06:55 +0100
committerFelix Morgner <felix.morgner@ost.ch>2026-11-22 14:20:35 +0100
commit3ee3b357cc8ba6ef59cb045bcaa050c4cb9d698d (patch)
treef9fa62da542bdaad9c807531cd302d3f14df5a73 /arch/x86_64/kapi/devices/pci_express.cpp
parentc0e5d076cfdeddde0a83197e2ebcee2df17934f8 (diff)
downloadkernel-3ee3b357cc8ba6ef59cb045bcaa050c4cb9d698d.tar.xz
kernel-3ee3b357cc8ba6ef59cb045bcaa050c4cb9d698d.zip
x86_64/pcie: fix bus group number
Diffstat (limited to 'arch/x86_64/kapi/devices/pci_express.cpp')
-rw-r--r--arch/x86_64/kapi/devices/pci_express.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/kapi/devices/pci_express.cpp b/arch/x86_64/kapi/devices/pci_express.cpp
index 2fac3185..a88931b9 100644
--- a/arch/x86_64/kapi/devices/pci_express.cpp
+++ b/arch/x86_64/kapi/devices/pci_express.cpp
@@ -23,11 +23,11 @@ namespace kapi::devices
return {};
}
- return kstd::vector{kstd::from_range, *mcfg_table | std::views::transform([number = 0](auto & entry) mutable {
+ return kstd::vector{kstd::from_range, *mcfg_table | std::views::transform([](auto & entry) {
auto base_address = memory::physical_address{entry.base_address()};
auto bus_count =
static_cast<std::size_t>(entry.end_bus_number() - entry.start_bus_number() + 1);
- auto group_number = static_cast<std::uint16_t>(number++);
+ auto group_number = static_cast<std::uint16_t>(entry.segment_group_number());
return pcie_segment_descriptor{.base_address = base_address,
.group_number = group_number,