From 9a22cfe02edd77297c92876a701f2f21998e64d7 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 5 Dec 2022 20:46:27 +0200 Subject: [PATCH] Now works --- Core/Memory/Memory.cpp | 4 ++-- Core/Memory/VirtualMemoryManager.cpp | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Core/Memory/Memory.cpp b/Core/Memory/Memory.cpp index b8b22aaa..f1d62fa4 100644 --- a/Core/Memory/Memory.cpp +++ b/Core/Memory/Memory.cpp @@ -198,9 +198,9 @@ __no_instrument_function void InitializeMemoryManagement(BootInfo *Info) trace("Applying new page table from address %p", KernelPageTable); #ifdef DEBUG debug("Kernel:"); - // tracepagetable(KernelPageTable); + tracepagetable(KernelPageTable); debug("Userspace:"); - // tracepagetable(UserspaceKernelOnlyPageTable); + tracepagetable(UserspaceKernelOnlyPageTable); #endif #if defined(__amd64__) || defined(__i386__) asmv("mov %0, %%cr3" ::"r"(KernelPageTable)); diff --git a/Core/Memory/VirtualMemoryManager.cpp b/Core/Memory/VirtualMemoryManager.cpp index 82243049..5410643a 100644 --- a/Core/Memory/VirtualMemoryManager.cpp +++ b/Core/Memory/VirtualMemoryManager.cpp @@ -127,10 +127,7 @@ namespace Memory (byte & 0x01 ? '1' : '0') if (!this->Check(VirtualAddress, (PTFlag)Flags)) // quick workaround just to see where it fails - { - // this->Check(VirtualAddress, (PTFlag)Flags); - // warn("Failed to map %#lx - %#lx with flags: " BYTE_TO_BINARY_PATTERN, VirtualAddress, PhysicalAddress, BYTE_TO_BINARY(Flags)); - } + warn("Failed to map %#lx - %#lx with flags: " BYTE_TO_BINARY_PATTERN, VirtualAddress, PhysicalAddress, BYTE_TO_BINARY(Flags)); #endif }