blob: 7638cf9f41380662a2f1591f116eb1b2f2cf4cc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "kapi/platform.hpp"
#include "kapi/devices.hpp"
#include "kernel/devices/cpu.hpp"
#include <kstd/memory>
#include <cstddef>
#include <cstdint>
#include <utility>
namespace kapi::platform
{
auto cpu_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::platform
|