summaryrefslogtreecommitdiff
path: root/Kernel/VM
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-18 08:23:49 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-18 08:57:18 +0100
commit345f92d5ac1aa1c97f73412ae1ac07046f6e39e9 (patch)
treeba1bb3e876b36989bcf46e07daf12996ac68759e /Kernel/VM
parentf60bd255f543a553ad2a4bf55fb06c57be7ca3e4 (diff)
downloadserenity-345f92d5ac1aa1c97f73412ae1ac07046f6e39e9.zip
Kernel: Remove two unused MemoryManager functions
Diffstat (limited to 'Kernel/VM')
-rw-r--r--Kernel/VM/MemoryManager.cpp30
-rw-r--r--Kernel/VM/MemoryManager.h4
2 files changed, 0 insertions, 34 deletions
diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp
index 1c64ee6053..2c0ce2a4b9 100644
--- a/Kernel/VM/MemoryManager.cpp
+++ b/Kernel/VM/MemoryManager.cpp
@@ -203,36 +203,6 @@ PageTableEntry& MemoryManager::ensure_pte(PageDirectory& page_directory, Virtual
return quickmap_pt(PhysicalAddress((u32)pde.page_table_base()))[page_table_index];
}
-void MemoryManager::map_protected(VirtualAddress vaddr, size_t length)
-{
- InterruptDisabler disabler;
- ASSERT(vaddr.is_page_aligned());
- for (u32 offset = 0; offset < length; offset += PAGE_SIZE) {
- auto pte_address = vaddr.offset(offset);
- auto& pte = ensure_pte(kernel_page_directory(), pte_address);
- pte.set_physical_page_base(pte_address.get());
- pte.set_user_allowed(false);
- pte.set_present(false);
- pte.set_writable(false);
- flush_tlb(pte_address);
- }
-}
-
-void MemoryManager::create_identity_mapping(PageDirectory& page_directory, VirtualAddress vaddr, size_t size)
-{
- InterruptDisabler disabler;
- ASSERT((vaddr.get() & ~PAGE_MASK) == 0);
- 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(pte_address.get());
- pte.set_user_allowed(false);
- pte.set_present(true);
- pte.set_writable(true);
- flush_tlb(pte_address);
- }
-}
-
void MemoryManager::initialize()
{
s_the = new MemoryManager;
diff --git a/Kernel/VM/MemoryManager.h b/Kernel/VM/MemoryManager.h
index f9f292fc64..24e750f1c6 100644
--- a/Kernel/VM/MemoryManager.h
+++ b/Kernel/VM/MemoryManager.h
@@ -127,10 +127,6 @@ private:
void flush_entire_tlb();
void flush_tlb(VirtualAddress);
- void map_protected(VirtualAddress, size_t length);
-
- void create_identity_mapping(PageDirectory&, VirtualAddress, size_t length);
-
static Region* user_region_from_vaddr(Process&, VirtualAddress);
static Region* kernel_region_from_vaddr(VirtualAddress);