aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-04-06 19:04:40 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-04-06 19:04:40 +0200
commitfe26083101537df306153e7bea7c291a041897f7 (patch)
tree0f26687fb172fc1852e9c4d58c351a76e9ceb50c /arch/x86_64/include
parent2a3575a267dede6a364386c0bd6edcff92421f0d (diff)
parentd5c2e101d62f6b4b69c45c127e7a729d246da566 (diff)
downloadteachos-fe26083101537df306153e7bea7c291a041897f7.tar.xz
teachos-fe26083101537df306153e7bea7c291a041897f7.zip
Merge branch 'fmorgner/develop-BA-FS26/apci' into develop-BA-FS26
This patchset introduces basic support for ACPI. Currently, the only user of that support is the CPU discovery subsystem. It uses the processed ACPI information to initialize CPU core devices and their associated local APICs.
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/devices/init.hpp12
-rw-r--r--arch/x86_64/include/arch/devices/local_apic.hpp26
2 files changed, 38 insertions, 0 deletions
diff --git a/arch/x86_64/include/arch/devices/init.hpp b/arch/x86_64/include/arch/devices/init.hpp
new file mode 100644
index 0000000..c5fbf37
--- /dev/null
+++ b/arch/x86_64/include/arch/devices/init.hpp
@@ -0,0 +1,12 @@
+#ifndef TEACHOS_ARCH_X86_64_DEVICES_INIT_HPP
+#define TEACHOS_ARCH_X86_64_DEVICES_INIT_HPP
+
+namespace arch::devices
+{
+
+ auto init_acpi_devices() -> void;
+ auto init_legacy_devices() -> void;
+
+} // namespace arch::devices
+
+#endif \ No newline at end of file
diff --git a/arch/x86_64/include/arch/devices/local_apic.hpp b/arch/x86_64/include/arch/devices/local_apic.hpp
new file mode 100644
index 0000000..71e9758
--- /dev/null
+++ b/arch/x86_64/include/arch/devices/local_apic.hpp
@@ -0,0 +1,26 @@
+#ifndef TEACHOS_ARCH_X86_64_DEVICES_LOCAL_APIC_HPP
+#define TEACHOS_ARCH_X86_64_DEVICES_LOCAL_APIC_HPP
+
+#include "kapi/devices/device.hpp"
+#include "kapi/memory.hpp"
+
+#include <cstddef>
+#include <cstdint>
+
+namespace arch::devices
+{
+
+ struct local_apic : kapi::devices::device
+ {
+ local_apic(std::size_t major, std::size_t minor, std::uint64_t hardware_id, kapi::memory::physical_address base);
+
+ auto init() -> bool override;
+
+ private:
+ std::uint64_t m_hardware_id{};
+ kapi::memory::physical_address m_base{};
+ };
+
+} // namespace arch::devices
+
+#endif \ No newline at end of file