diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-26 21:45:56 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-26 21:45:56 +0200 |
commit | 183205d51cefcb68b9fd8102fe2b566212a8e59e (patch) | |
tree | eda6663f14903d132cc888386a0bf1491d9b0829 /Kernel/VM/PageDirectory.h | |
parent | 0538adbabd255411711b4d126c0d31a66c715c00 (diff) | |
download | serenity-183205d51cefcb68b9fd8102fe2b566212a8e59e.zip |
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. :^)
Diffstat (limited to 'Kernel/VM/PageDirectory.h')
-rw-r--r-- | Kernel/VM/PageDirectory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/VM/PageDirectory.h b/Kernel/VM/PageDirectory.h index 06698f75c5..b7917aa9f1 100644 --- a/Kernel/VM/PageDirectory.h +++ b/Kernel/VM/PageDirectory.h @@ -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); |