diff options
Diffstat (limited to 'kernel/kapi/devices.cpp')
| -rw-r--r-- | kernel/kapi/devices.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/kapi/devices.cpp b/kernel/kapi/devices.cpp index 031f2c9..b2911b0 100644 --- a/kernel/kapi/devices.cpp +++ b/kernel/kapi/devices.cpp @@ -1,7 +1,9 @@ #include "kapi/devices.hpp" +#include "kapi/acpi.hpp" #include "kapi/system.hpp" +#include "kernel/devices/cpu.hpp" #include "kernel/devices/root_bus.hpp" #include <kstd/flat_map> @@ -35,6 +37,14 @@ namespace kapi::devices auto & bus = root_bus.emplace(); register_device(bus); bus.init(); + + auto madt = kapi::acpi::get_table("APIC"); + if (madt) + { + auto cpu_major = allocate_major_number(); + auto cpu = kstd::make_unique<kernel::devices::cpu>(cpu_major); + bus.add_child(std::move(cpu)); + } } auto get_root_bus() -> bus & |
