summaryrefslogtreecommitdiff
path: root/kernel/firmware
diff options
context:
space:
mode:
authorArseney300 <Arseney300@gmail.com>2026-04-11 17:48:52 +0700
committerArseney300 <Arseney300@gmail.com>2026-04-11 17:48:52 +0700
commit496246c92dabe6757480147016490ea6ae43bb66 (patch)
treecb922a0b1569410db44f6da17862b7e949df9fad /kernel/firmware
parent2f95320e0859029f520d46f777591751dcd39634 (diff)
bastion: add Kernel, Processor, AcpiTables, DeviceTree classesHEADmaster
Kernel: main singleton object, that provide access to core kernel entities Processor: empty class, that will be used later for per-CPU entities AcpiTables: class for acpi access (can be obtained through the kernel object) DeviceTree: class for dt access (can be obtained through the kernel object)
Diffstat (limited to 'kernel/firmware')
-rw-r--r--kernel/firmware/acpi/acpi_tables.cpp14
-rw-r--r--kernel/firmware/dt/device_tree.cpp15
2 files changed, 29 insertions, 0 deletions
diff --git a/kernel/firmware/acpi/acpi_tables.cpp b/kernel/firmware/acpi/acpi_tables.cpp
new file mode 100644
index 0000000..c19d124
--- /dev/null
+++ b/kernel/firmware/acpi/acpi_tables.cpp
@@ -0,0 +1,14 @@
+// ============================================================================
+// firmware/acpi/acpi_tables.cpp - ACPI table management implementation
+// ============================================================================
+
+#include <kernel/firmware/acpi.h>
+
+//TODO: move it to constructor, when i will have heap
+void AcpiTables::Init(const PhysAddr& addr) {
+ rsdp_address = addr;
+}
+
+PhysAddr AcpiTables::GetRsdpAddress() const {
+ return rsdp_address;
+}
diff --git a/kernel/firmware/dt/device_tree.cpp b/kernel/firmware/dt/device_tree.cpp
new file mode 100644
index 0000000..35f27fa
--- /dev/null
+++ b/kernel/firmware/dt/device_tree.cpp
@@ -0,0 +1,15 @@
+// ============================================================================
+// firmware/dt/device_tree.cpp - Device Tree management implementation
+// ============================================================================
+
+#include <kernel/firmware/dt.h>
+#include <boot/boot_info.h>
+
+//TODO: move it to constructor, when i will have heap
+void DeviceTree::Init(const PhysAddr& addr) {
+ fdt_address = addr;
+}
+
+PhysAddr DeviceTree::GetFdtAddress() const {
+ return fdt_address;
+}