aboutsummaryrefslogtreecommitdiff
path: root/kernel/kapi/cpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kapi/cpu.cpp')
-rw-r--r--kernel/kapi/cpu.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/kapi/cpu.cpp b/kernel/kapi/cpu.cpp
index 13de584..d632628 100644
--- a/kernel/kapi/cpu.cpp
+++ b/kernel/kapi/cpu.cpp
@@ -1,9 +1,17 @@
#include "kapi/cpu.hpp"
+#include "kapi/devices.hpp"
#include "kapi/system.hpp"
+#include "kernel/devices/cpu.hpp"
+
+#include <kstd/memory>
#include <kstd/print>
+#include <cstddef>
+#include <cstdint>
+#include <utility>
+
namespace kapi::cpu
{
@@ -32,4 +40,15 @@ namespace kapi::cpu
}
}
+ auto core_detected(kapi::devices::bus & bus, std::size_t major, std::size_t minor, std::uint64_t hardware_id,
+ bool is_bsp, kstd::unique_ptr<devices::device> core_interrupt_controller) -> bool
+ {
+ auto core = kstd::make_unique<kernel::devices::cpu::core>(major, minor, hardware_id, is_bsp);
+
+ core->add_child(std::move(core_interrupt_controller));
+ bus.add_child(std::move(core));
+
+ return true;
+ }
+
} // namespace kapi::cpu \ No newline at end of file