1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:17:45 +00:00

Kernel: Make the x86 paging code slightly less insane.

Instead of PDE's and PTE's being weird wrappers around dword*, just have
MemoryManager::ensure_pte() return a PageDirectoryEntry&, which in turn has
a PageTableEntry* entries().

I've been trying to understand how things ended up this way, and I suspect
it was because I inadvertently invoked the PageDirectoryEntry copy ctor in
the original work on this, which must have made me very confused..

Anyways, now things are a bit saner and we can move forward towards a better
future, etc. :^)
This commit is contained in:
Andreas Kling 2019-06-26 21:45:56 +02:00
parent 0538adbabd
commit 183205d51c
4 changed files with 126 additions and 123 deletions

View file

@ -15,7 +15,7 @@ public:
~PageDirectory();
dword cr3() const { return m_directory_page->paddr().get(); }
dword* entries() { return reinterpret_cast<dword*>(cr3()); }
PageDirectoryEntry* entries() { return reinterpret_cast<PageDirectoryEntry*>(cr3()); }
void flush(VirtualAddress);