Now works

This commit is contained in:
Alex 2022-12-05 20:46:27 +02:00
parent 7bff9f260e
commit 9a22cfe02e
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
2 changed files with 3 additions and 6 deletions

View File

@ -198,9 +198,9 @@ __no_instrument_function void InitializeMemoryManagement(BootInfo *Info)
trace("Applying new page table from address %p", KernelPageTable); trace("Applying new page table from address %p", KernelPageTable);
#ifdef DEBUG #ifdef DEBUG
debug("Kernel:"); debug("Kernel:");
// tracepagetable(KernelPageTable); tracepagetable(KernelPageTable);
debug("Userspace:"); debug("Userspace:");
// tracepagetable(UserspaceKernelOnlyPageTable); tracepagetable(UserspaceKernelOnlyPageTable);
#endif #endif
#if defined(__amd64__) || defined(__i386__) #if defined(__amd64__) || defined(__i386__)
asmv("mov %0, %%cr3" ::"r"(KernelPageTable)); asmv("mov %0, %%cr3" ::"r"(KernelPageTable));

View File

@ -127,10 +127,7 @@ namespace Memory
(byte & 0x01 ? '1' : '0') (byte & 0x01 ? '1' : '0')
if (!this->Check(VirtualAddress, (PTFlag)Flags)) // quick workaround just to see where it fails if (!this->Check(VirtualAddress, (PTFlag)Flags)) // quick workaround just to see where it fails
{ warn("Failed to map %#lx - %#lx with flags: " BYTE_TO_BINARY_PATTERN, VirtualAddress, PhysicalAddress, BYTE_TO_BINARY(Flags));
// this->Check(VirtualAddress, (PTFlag)Flags);
// warn("Failed to map %#lx - %#lx with flags: " BYTE_TO_BINARY_PATTERN, VirtualAddress, PhysicalAddress, BYTE_TO_BINARY(Flags));
}
#endif #endif
} }