diff options
Diffstat (limited to 'arch/x86_64')
| -rw-r--r-- | arch/x86_64/kapi/cpu.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86_64/kapi/cpu.cpp b/arch/x86_64/kapi/cpu.cpp index c51e08b3..787a230e 100644 --- a/arch/x86_64/kapi/cpu.cpp +++ b/arch/x86_64/kapi/cpu.cpp @@ -66,7 +66,7 @@ namespace kapi::cpu }) | std::views::filter([](auto const & entry) { return static_cast<bool>(entry.flags() & candidate_flags); }); auto bsp_found = false; - auto core_count = 0uz; + auto core_index = 0uz; auto local_apic_address = memory::physical_address{madt->local_interrupt_controller_address()}; auto cpu_bus = kstd::make_unique<devices::cpu>(cpu_major, 0); @@ -75,17 +75,17 @@ namespace kapi::cpu auto is_bsp = !bsp_found; bsp_found = true; auto core = - kstd::make_unique<devices::cpu::core>(core_major, core_count, core_count, apic.processor_id(), is_bsp); - core->add_child(kstd::make_unique<arch::devices::local_apic>(interrupt_controller_major, core_count, core_count, + kstd::make_unique<devices::cpu::core>(core_major, core_index, core_index, apic.processor_id(), is_bsp); + core->add_child(kstd::make_unique<arch::devices::local_apic>(interrupt_controller_major, core_index, core_index, apic.id(), local_apic_address, is_bsp)); cpu_bus->add_child(std::move(core)); - ++core_count; + ++core_index; } devices::get_root_bus().add_child(std::move(cpu_bus)); - kstd::println("[x86_64:PLT] Found {} CPU cores", core_count); - return core_count > 0; + kstd::println("[x86_64:PLT] Found {} CPU cores", core_index); + return core_index > 0; } } // namespace kapi::cpu |
