summaryrefslogtreecommitdiff
path: root/Kernel/VM/MemoryManager.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-07 22:13:10 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-07 22:13:10 +0200
commit98ce4989222abdb7be0ab702118a56bcabbd14d8 (patch)
tree47343be9244904ef8ce94cf4f38e646ebe5c28ef /Kernel/VM/MemoryManager.cpp
parentc258c9a4b2348b85506bec201b97aeec1e4ac6e6 (diff)
downloadserenity-98ce4989222abdb7be0ab702118a56bcabbd14d8.zip
Kernel: Remove unused MemoryManager::remove_identity_mapping()
This was not actually used and just sitting there being confusing.
Diffstat (limited to 'Kernel/VM/MemoryManager.cpp')
-rw-r--r--Kernel/VM/MemoryManager.cpp15
1 files changed, 0 insertions, 15 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();