mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
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.
This commit is contained in:
parent
dec27e5e6f
commit
bc107d0b33
27 changed files with 1236 additions and 627 deletions
|
@ -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];
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue