aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-07-23 01:38:56 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-07-23 01:38:56 +0200
commit526709a1e86d55dd88e2dbdbc471795efce9046b (patch)
tree04d9de462f506f983d3a991179eccfd68300cc14 /arch/x86_64/kapi
parent0361a4912affe1594def1aa24e387fe5440afaee (diff)
downloadkernel-526709a1e86d55dd88e2dbdbc471795efce9046b.tar.xz
kernel-526709a1e86d55dd88e2dbdbc471795efce9046b.zip
kapi: bootstrap owning device tree
Diffstat (limited to 'arch/x86_64/kapi')
-rw-r--r--arch/x86_64/kapi/cpu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86_64/kapi/cpu.cpp b/arch/x86_64/kapi/cpu.cpp
index bd86f0fa..c45703e5 100644
--- a/arch/x86_64/kapi/cpu.cpp
+++ b/arch/x86_64/kapi/cpu.cpp
@@ -64,19 +64,19 @@ namespace kapi::cpu
auto bsp_found = false;
auto core_index = 0uz;
auto local_apic_address = memory::physical_address{madt->local_interrupt_controller_address()};
- auto cpu_bus = kstd::make_unique<devices::cpu>();
+ auto cpu_bus = kstd::make_shared<devices::cpu>();
for (auto const & apic : lapic_entries)
{
auto is_bsp = !bsp_found;
bsp_found = true;
- auto core = kstd::make_unique<devices::cpu::core>(core_index, apic.processor_id(), is_bsp);
- core->add_child(kstd::make_unique<arch::devices::local_apic>(core_index, apic.id(), local_apic_address, is_bsp));
+ auto core = kstd::make_shared<devices::cpu::core>(core_index, apic.processor_id(), is_bsp);
+ core->add_child(kstd::make_shared<arch::devices::local_apic>(core_index, apic.id(), local_apic_address, is_bsp));
cpu_bus->add_child(std::move(core));
++core_index;
}
- devices::get_root_bus().add_child(std::move(cpu_bus));
+ devices::get_root_bus()->add_child(std::move(cpu_bus));
kstd::println("[x86_64:PLT] Found {} CPU cores", core_index);
return core_index > 0;