1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

MM: Allocate page tables from a separate set of physical pages.

The old approach only worked because of an overpermissive accident.
There's now a concept of supervisor physical pages that can be allocated.
They all sit in the low 4 MB of physical memory and are identity mapped,
shared between all processes, and only ring 0 can access them.
This commit is contained in:
Andreas Kling 2019-01-01 02:09:43 +01:00
parent a5ffa2eec7
commit 683185e4aa
5 changed files with 65 additions and 105 deletions

View file

@ -88,6 +88,7 @@ public:
bool operator>(const LinearAddress& other) const { return m_address > other.m_address; }
bool operator<(const LinearAddress& other) const { return m_address < other.m_address; }
bool operator==(const LinearAddress& other) const { return m_address == other.m_address; }
bool operator!=(const LinearAddress& other) const { return m_address != other.m_address; }
byte* asPtr() { return reinterpret_cast<byte*>(m_address); }
const byte* asPtr() const { return reinterpret_cast<const byte*>(m_address); }