From e9232199bdd97233dabd59f07c63607c93c0c59c Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 21 Mar 2021 16:53:07 +0200 Subject: Check multiboot2 header length, and if needed map the next page as well --- src/vmm.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/vmm.h') diff --git a/src/vmm.h b/src/vmm.h index 252e5bb..1729275 100644 --- a/src/vmm.h +++ b/src/vmm.h @@ -28,13 +28,6 @@ public: vmm(uint32_t* addr = nullptr); - [[deprecated]] constexpr static size_t table_id(uint32_t offset) { - offset &= 0xfff00000; - offset /= (4 * 1024 * 1024); - return static_cast(offset); - } - [[deprecated]] constexpr static size_t page_id(uint32_t offset) { return static_cast(offset / 4096); } - static void reload() { uint32_t cr0; asm volatile("mov %%cr0, %0" : "=r"(cr0)); @@ -42,6 +35,7 @@ public: } [[nodiscard]] Result map(uint32_t phys_addr, const address dest); + void unmap(const address); private: class page_table { -- cgit v1.2.1