summaryrefslogtreecommitdiff
path: root/Kernel
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
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')
-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);