summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kernel/VM/MemoryManager.cpp15
-rw-r--r--Kernel/VM/MemoryManager.h1
2 files changed, 0 insertions, 16 deletions
diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp
index 491b8fa080..f010faddb9 100644
--- a/Kernel/VM/MemoryManager.cpp
+++ b/Kernel/VM/MemoryManager.cpp
@@ -161,21 +161,6 @@ RefPtr<PhysicalPage> MemoryManager::allocate_page_table(PageDirectory& page_dire
return physical_page;
}
-void MemoryManager::remove_identity_mapping(PageDirectory& page_directory, VirtualAddress vaddr, size_t size)
-{
- InterruptDisabler disabler;
- // FIXME: ASSERT(vaddr is 4KB aligned);
- for (u32 offset = 0; offset < size; offset += PAGE_SIZE) {
- auto pte_address = vaddr.offset(offset);
- auto& pte = ensure_pte(page_directory, pte_address);
- pte.set_physical_page_base(0);
- pte.set_user_allowed(false);
- pte.set_present(true);
- pte.set_writable(true);
- flush_tlb(pte_address);
- }
-}
-
PageTableEntry& MemoryManager::ensure_pte(PageDirectory& page_directory, VirtualAddress vaddr)
{
ASSERT_INTERRUPTS_DISABLED();
diff --git a/Kernel/VM/MemoryManager.h b/Kernel/VM/MemoryManager.h
index 55c730520c..836ba02c20 100644
--- a/Kernel/VM/MemoryManager.h
+++ b/Kernel/VM/MemoryManager.h
@@ -100,7 +100,6 @@ private:
void map_protected(VirtualAddress, size_t length);
void create_identity_mapping(PageDirectory&, VirtualAddress, size_t length);
- void remove_identity_mapping(PageDirectory&, VirtualAddress, size_t);
static Region* region_from_vaddr(Process&, VirtualAddress);
static const Region* region_from_vaddr(const Process&, VirtualAddress);