summaryrefslogtreecommitdiff
path: root/Kernel/VM/MemoryManager.h
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-07-06 07:27:22 -0600
committerAndreas Kling <kling@serenityos.org>2020-07-06 17:07:44 +0200
commitbc107d0b3311677de7bc084cbb75c21b166c8ad5 (patch)
tree586d1cfa189d72309f978122e15d112539feef61 /Kernel/VM/MemoryManager.h
parentdec27e5e6fad25fedd9203087b8107242369dd2b (diff)
downloadserenity-bc107d0b3311677de7bc084cbb75c21b166c8ad5.zip
Kernel: Add SMP IPI support
We can now properly initialize all processors without crashing by sending SMP IPI messages to synchronize memory between processors. We now initialize the APs once we have the scheduler running. This is so that we can process IPI messages from the other cores. Also rework interrupt handling a bit so that it's more of a 1:1 mapping. We need to allocate non-sharable interrupts for IPIs. This also fixes the occasional hang/crash because all CPUs now synchronize memory with each other.
Diffstat (limited to 'Kernel/VM/MemoryManager.h')
-rw-r--r--Kernel/VM/MemoryManager.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/VM/MemoryManager.h b/Kernel/VM/MemoryManager.h
index f176424182..a3dd4a92be 100644
--- a/Kernel/VM/MemoryManager.h
+++ b/Kernel/VM/MemoryManager.h
@@ -72,6 +72,8 @@ struct MemoryManagerData {
u32 m_quickmap_prev_flags;
};
+extern RecursiveSpinLock s_mm_lock;
+
class MemoryManager {
AK_MAKE_ETERNAL
friend class PageDirectory;
@@ -176,8 +178,8 @@ private:
void detect_cpu_features();
void protect_kernel_image();
void parse_memory_map();
- void flush_entire_tlb();
- void flush_tlb(VirtualAddress);
+ static void flush_tlb_local(VirtualAddress, size_t page_count = 1);
+ static void flush_tlb(VirtualAddress, size_t page_count = 1);
static Region* user_region_from_vaddr(Process&, VirtualAddress);
static Region* kernel_region_from_vaddr(VirtualAddress);
@@ -212,8 +214,6 @@ private:
InlineLinkedList<VMObject> m_vmobjects;
- static RecursiveSpinLock s_lock;
-
RefPtr<PhysicalPage> m_low_pseudo_identity_mapping_pages[4];
};