diff options
Diffstat (limited to 'Kernel/VM/PageDirectory.cpp')
-rw-r--r-- | Kernel/VM/PageDirectory.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Kernel/VM/PageDirectory.cpp b/Kernel/VM/PageDirectory.cpp index 3533d6cfa9..9cc949857a 100644 --- a/Kernel/VM/PageDirectory.cpp +++ b/Kernel/VM/PageDirectory.cpp @@ -57,3 +57,11 @@ void PageDirectory::flush(VirtualAddress vaddr) if (this == &MM.kernel_page_directory() || ¤t->process().page_directory() == this) MM.flush_tlb(vaddr); } + +void PageDirectory::update_kernel_mappings() +{ + // This ensures that the kernel virtual address space is up-to-date in this page directory. + // This may be necessary to avoid triple faulting when entering a process's paging scope + // whose mappings are out-of-date. + memcpy(entries() + 768, MM.kernel_page_directory().entries() + 768, sizeof(PageDirectoryEntry) * 256); +} |