aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-07-24 00:55:57 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-07-24 00:55:57 +0200
commit7d241968ff4feb83bc23636df3a7ddb80f4bb4a9 (patch)
tree82ebfa2184ffa00b4bccb1a6ba77cf82a54ee251 /arch
parentb334a8494bef50c5b90adc1f101464fc8c4c971a (diff)
downloadkernel-7d241968ff4feb83bc23636df3a7ddb80f4bb4a9.tar.xz
kernel-7d241968ff4feb83bc23636df3a7ddb80f4bb4a9.zip
kapi/device: remove init()
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/arch/devices/legacy_pit.cpp5
-rw-r--r--arch/x86_64/arch/devices/legacy_pit.hpp3
-rw-r--r--arch/x86_64/arch/devices/local_apic.cpp7
-rw-r--r--arch/x86_64/arch/devices/local_apic.hpp2
4 files changed, 1 insertions, 16 deletions
diff --git a/arch/x86_64/arch/devices/legacy_pit.cpp b/arch/x86_64/arch/devices/legacy_pit.cpp
index 5e968a6b..b2a30ef9 100644
--- a/arch/x86_64/arch/devices/legacy_pit.cpp
+++ b/arch/x86_64/arch/devices/legacy_pit.cpp
@@ -42,11 +42,6 @@ namespace arch::devices
return "pit";
}
- auto pit_device::init() -> bool
- {
- return true;
- }
-
auto pit_device::query_interface(kapi::devices::interface interface) -> void *
{
if (interface == arch::bus::isa_identification::id)
diff --git a/arch/x86_64/arch/devices/legacy_pit.hpp b/arch/x86_64/arch/devices/legacy_pit.hpp
index 1bb41e2b..f0a18ecb 100644
--- a/arch/x86_64/arch/devices/legacy_pit.hpp
+++ b/arch/x86_64/arch/devices/legacy_pit.hpp
@@ -22,9 +22,6 @@ namespace arch::devices
{
pit_device();
- // TODO: remove
- auto init() -> bool override;
-
//! Get the synthetic ISA identifier for this device.
//!
//! @return the string "pit"
diff --git a/arch/x86_64/arch/devices/local_apic.cpp b/arch/x86_64/arch/devices/local_apic.cpp
index e7108f8f..2b32c864 100644
--- a/arch/x86_64/arch/devices/local_apic.cpp
+++ b/arch/x86_64/arch/devices/local_apic.cpp
@@ -82,9 +82,6 @@ namespace arch::devices
, m_hardware_id{hardware_id}
, m_base{base}
, m_is_bsp{is_bsp}
- {}
-
- auto local_apic::init() -> bool
{
auto static shared_virtual_base = kapi::memory::allocate_mmio_region(1);
auto static is_mapped = false;
@@ -94,7 +91,7 @@ namespace arch::devices
if (!kapi::memory::map_mmio_region(shared_virtual_base, m_base, kapi::memory::page_mapper::flags::writable))
{
kstd::println("[x86_64:DEV] LAPIC {} MMIO mapping failed!", m_hardware_id);
- return false;
+ return;
}
is_mapped = true;
}
@@ -117,8 +114,6 @@ namespace arch::devices
{
kstd::println("[x86_64:DEV] LAPIC {} is not on the BSP, deferring initialization.", m_hardware_id);
}
-
- return true;
}
auto local_apic::core_index() const noexcept -> std::uint64_t
diff --git a/arch/x86_64/arch/devices/local_apic.hpp b/arch/x86_64/arch/devices/local_apic.hpp
index 4b82050b..61fc99be 100644
--- a/arch/x86_64/arch/devices/local_apic.hpp
+++ b/arch/x86_64/arch/devices/local_apic.hpp
@@ -14,8 +14,6 @@ namespace arch::devices
{
local_apic(std::uint64_t core_index, std::uint64_t hardware_id, kapi::memory::physical_address base, bool is_bsp);
- auto init() -> bool override;
-
[[nodiscard]] auto core_index() const noexcept -> std::uint64_t;
private: