1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:18:11 +00:00

Kernel: Add mechanism to identity map the lowest 2MB

This commit is contained in:
Tom 2020-06-01 22:55:09 -06:00 committed by Andreas Kling
parent 19190267a6
commit 841364b609
7 changed files with 40 additions and 12 deletions

View file

@ -107,6 +107,7 @@ public:
OwnPtr<Region> allocate_contiguous_kernel_region(size_t, const StringView& name, u8 access, bool user_accessible = false, bool cacheable = true);
OwnPtr<Region> allocate_kernel_region(size_t, const StringView& name, u8 access, bool user_accessible = false, bool should_commit = true, bool cacheable = true);
OwnPtr<Region> allocate_kernel_region(PhysicalAddress, size_t, const StringView& name, u8 access, bool user_accessible = false, bool cacheable = true);
OwnPtr<Region> allocate_kernel_region_identity(PhysicalAddress, size_t, const StringView& name, u8 access, bool user_accessible = false, bool cacheable = true);
OwnPtr<Region> allocate_kernel_region_with_vmobject(VMObject&, size_t, const StringView& name, u8 access, bool user_accessible = false, bool cacheable = true);
OwnPtr<Region> allocate_kernel_region_with_vmobject(const Range&, VMObject&, const StringView& name, u8 access, bool user_accessible = false, bool cacheable = true);
OwnPtr<Region> allocate_user_accessible_kernel_region(size_t, const StringView& name, u8 access, bool cacheable = true);
@ -143,6 +144,8 @@ public:
PhysicalPage& shared_zero_page() { return *m_shared_zero_page; }
PageDirectory& kernel_page_directory() { return *m_kernel_page_directory; }
private:
MemoryManager();
~MemoryManager();
@ -177,8 +180,6 @@ private:
PageDirectoryEntry* quickmap_pd(PageDirectory&, size_t pdpt_index);
PageTableEntry* quickmap_pt(PhysicalAddress);
PageDirectory& kernel_page_directory() { return *m_kernel_page_directory; }
const PageTableEntry* pte(const PageDirectory&, VirtualAddress);
PageTableEntry& ensure_pte(PageDirectory&, VirtualAddress);