diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-06 13:49:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-06 14:05:58 +0200 |
commit | 93d98d49769de22695f8cb4c96c5ad6f7ac39d83 (patch) | |
tree | 416a0551a39e61ca79b10a07750898f050e220c8 /Kernel/Interrupts | |
parent | a1d7ebf85adca1550b5d61c8b7ab7fe95217e0e2 (diff) | |
download | serenity-93d98d49769de22695f8cb4c96c5ad6f7ac39d83.zip |
Kernel: Move Kernel/Memory/ code into Kernel::Memory namespace
Diffstat (limited to 'Kernel/Interrupts')
-rw-r--r-- | Kernel/Interrupts/APIC.cpp | 10 | ||||
-rw-r--r-- | Kernel/Interrupts/APIC.h | 2 | ||||
-rw-r--r-- | Kernel/Interrupts/IOAPIC.cpp | 2 | ||||
-rw-r--r-- | Kernel/Interrupts/IOAPIC.h | 2 | ||||
-rw-r--r-- | Kernel/Interrupts/InterruptManagement.cpp | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp index 714c85791e..cd7f04f068 100644 --- a/Kernel/Interrupts/APIC.cpp +++ b/Kernel/Interrupts/APIC.cpp @@ -228,7 +228,7 @@ UNMAP_AFTER_INIT bool APIC::init_bsp() dbgln_if(APIC_DEBUG, "Initializing APIC, base: {}", apic_base); set_base(apic_base); - m_apic_base = MM.allocate_kernel_region(apic_base.page_base(), PAGE_SIZE, {}, Region::Access::Read | Region::Access::Write); + m_apic_base = MM.allocate_kernel_region(apic_base.page_base(), PAGE_SIZE, {}, Memory::Region::Access::Read | Memory::Region::Access::Write); if (!m_apic_base) { dbgln("APIC: Failed to allocate memory for APIC base"); return false; @@ -245,7 +245,7 @@ UNMAP_AFTER_INIT bool APIC::init_bsp() return false; } - auto madt = map_typed<ACPI::Structures::MADT>(madt_address); + auto madt = Memory::map_typed<ACPI::Structures::MADT>(madt_address); size_t entry_index = 0; size_t entries_length = madt->h.length - sizeof(ACPI::Structures::MADT); auto* madt_entry = madt->entries; @@ -283,13 +283,13 @@ UNMAP_AFTER_INIT void APIC::do_boot_aps() // Also account for the data appended to: // * aps_to_enable u32 values for ap_cpu_init_stacks // * aps_to_enable u32 values for ap_cpu_init_processor_info_array - auto apic_startup_region = MM.allocate_kernel_region_identity(PhysicalAddress(0x8000), page_round_up(apic_ap_start_size + (2 * aps_to_enable * sizeof(u32))), {}, Region::Access::Read | Region::Access::Write | Region::Access::Execute); + auto apic_startup_region = MM.allocate_kernel_region_identity(PhysicalAddress(0x8000), Memory::page_round_up(apic_ap_start_size + (2 * aps_to_enable * sizeof(u32))), {}, Memory::Region::Access::Read | Memory::Region::Access::Write | Memory::Region::Access::Execute); memcpy(apic_startup_region->vaddr().as_ptr(), reinterpret_cast<const void*>(apic_ap_start), apic_ap_start_size); // Allocate enough stacks for all APs - Vector<OwnPtr<Region>> apic_ap_stacks; + Vector<OwnPtr<Memory::Region>> apic_ap_stacks; for (u32 i = 0; i < aps_to_enable; i++) { - auto stack_region = MM.allocate_kernel_region(Thread::default_kernel_stack_size, {}, Region::Access::Read | Region::Access::Write, AllocationStrategy::AllocateNow); + auto stack_region = MM.allocate_kernel_region(Thread::default_kernel_stack_size, {}, Memory::Region::Access::Read | Memory::Region::Access::Write, AllocationStrategy::AllocateNow); if (!stack_region) { dbgln("APIC: Failed to allocate stack for AP #{}", i); return; diff --git a/Kernel/Interrupts/APIC.h b/Kernel/Interrupts/APIC.h index 507dd8e0b2..e59ef33564 100644 --- a/Kernel/Interrupts/APIC.h +++ b/Kernel/Interrupts/APIC.h @@ -89,7 +89,7 @@ private: u32 high() const { return m_high; } }; - OwnPtr<Region> m_apic_base; + OwnPtr<Memory::Region> m_apic_base; Vector<OwnPtr<Processor>> m_ap_processor_info; Vector<Thread*> m_ap_idle_threads; Atomic<u8> m_apic_ap_count { 0 }; diff --git a/Kernel/Interrupts/IOAPIC.cpp b/Kernel/Interrupts/IOAPIC.cpp index 1bdf548515..f90433e068 100644 --- a/Kernel/Interrupts/IOAPIC.cpp +++ b/Kernel/Interrupts/IOAPIC.cpp @@ -25,7 +25,7 @@ enum DeliveryMode { UNMAP_AFTER_INIT IOAPIC::IOAPIC(PhysicalAddress address, u32 gsi_base) : m_address(address) - , m_regs(map_typed_writable<ioapic_mmio_regs>(m_address)) + , m_regs(Memory::map_typed_writable<ioapic_mmio_regs>(m_address)) , m_gsi_base(gsi_base) , m_id((read_register(0x0) >> 24) & 0xFF) , m_version(read_register(0x1) & 0xFF) diff --git a/Kernel/Interrupts/IOAPIC.h b/Kernel/Interrupts/IOAPIC.h index 1e71e78a32..4977668664 100644 --- a/Kernel/Interrupts/IOAPIC.h +++ b/Kernel/Interrupts/IOAPIC.h @@ -78,7 +78,7 @@ private: void isa_identity_map(int index); PhysicalAddress m_address; - mutable TypedMapping<ioapic_mmio_regs> m_regs; + mutable Memory::TypedMapping<ioapic_mmio_regs> m_regs; u32 m_gsi_base; u8 m_id; u8 m_version; diff --git a/Kernel/Interrupts/InterruptManagement.cpp b/Kernel/Interrupts/InterruptManagement.cpp index 0101e1fd6e..d1bc0e8293 100644 --- a/Kernel/Interrupts/InterruptManagement.cpp +++ b/Kernel/Interrupts/InterruptManagement.cpp @@ -183,7 +183,7 @@ UNMAP_AFTER_INIT void InterruptManagement::switch_to_ioapic_mode() UNMAP_AFTER_INIT void InterruptManagement::locate_apic_data() { VERIFY(!m_madt.is_null()); - auto madt = map_typed<ACPI::Structures::MADT>(m_madt); + auto madt = Memory::map_typed<ACPI::Structures::MADT>(m_madt); int irq_controller_count = 0; if (madt->flags & PCAT_COMPAT_FLAG) { |