aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/src
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-04-08 17:17:11 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-04-08 17:17:11 +0200
commitaa208226f992523865328d4612ae4a7679f57a04 (patch)
tree41981f9b72f695ffc2848bfb9e13b1846c1ebe69 /arch/x86_64/src
parent1ecc0c223a1bacfa1aee183a3573f57c265318df (diff)
downloadteachos-aa208226f992523865328d4612ae4a7679f57a04.tar.xz
teachos-aa208226f992523865328d4612ae4a7679f57a04.zip
kapi: return region pair for MMIO allocation
Diffstat (limited to 'arch/x86_64/src')
-rw-r--r--arch/x86_64/src/devices/local_apic.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86_64/src/devices/local_apic.cpp b/arch/x86_64/src/devices/local_apic.cpp
index 54d87a6..4a81de8 100644
--- a/arch/x86_64/src/devices/local_apic.cpp
+++ b/arch/x86_64/src/devices/local_apic.cpp
@@ -97,7 +97,7 @@ namespace arch::devices
is_mapped = true;
}
- m_virtual_base = shared_virtual_base;
+ m_mapped_region = shared_virtual_base;
if (m_is_bsp)
{
@@ -108,12 +108,12 @@ namespace arch::devices
write_register(registers::spurious_interrupt_vector, lapic_enable_bit | spurious_interrupt_vector);
- kstd::println("[x86_64:DEV] LAPIC initialized. version: {#x} | max_lvt_entry: {} | eoi_suppresion: {:s}",
+ kstd::println("[x86_64:DEV] LAPIC initialized. version: {#x} | max_lvt_entry: {} | eoi_suppression: {:s}",
m_version, m_highest_lvt_entry_index, m_supports_eoi_broadcast_suppression);
}
else
{
- kstd::println("[x86_64:DEV] LAPIC {} is not on the BSP, deferring intialization.", m_hardware_id);
+ kstd::println("[x86_64:DEV] LAPIC {} is not on the BSP, deferring initialization.", m_hardware_id);
}
return true;
@@ -121,13 +121,13 @@ namespace arch::devices
auto local_apic::read_register(registers id) const -> std::uint32_t
{
- auto reg = static_cast<std::uint32_t volatile *>(m_virtual_base + std::to_underlying(id));
+ auto reg = static_cast<std::uint32_t volatile *>(m_mapped_region.first + std::to_underlying(id));
return *reg;
}
auto local_apic::write_register(registers id, std::uint32_t value) -> void
{
- auto reg = static_cast<std::uint32_t volatile *>(m_virtual_base + std::to_underlying(id));
+ auto reg = static_cast<std::uint32_t volatile *>(m_mapped_region.first + std::to_underlying(id));
*reg = value;
}