From 7d241968ff4feb83bc23636df3a7ddb80f4bb4a9 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 24 Jul 2026 00:55:57 +0200 Subject: kapi/device: remove init() --- arch/x86_64/arch/devices/legacy_pit.cpp | 5 ----- arch/x86_64/arch/devices/legacy_pit.hpp | 3 --- arch/x86_64/arch/devices/local_apic.cpp | 7 +------ arch/x86_64/arch/devices/local_apic.hpp | 2 -- 4 files changed, 1 insertion(+), 16 deletions(-) (limited to 'arch/x86_64') 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: -- cgit v1.2.3