1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:18:12 +00:00

Kernel: Add mapping from page directory base (PDB) to PageDirectory

This allows the page fault code to find the owning PageDirectory and
corresponding process for faulting regions.

The mapping is implemented as a global hash map right now, which is
definitely not optimal. We can come up with something better when it
becomes necessary.
This commit is contained in:
Andreas Kling 2019-08-06 11:19:16 +02:00
parent 8d07bce12a
commit 2ad963d261
5 changed files with 60 additions and 16 deletions

View file

@ -108,6 +108,8 @@ private:
static Region* user_region_from_vaddr(Process&, VirtualAddress);
static Region* kernel_region_from_vaddr(VirtualAddress);
static Region* region_from_vaddr(VirtualAddress);
bool copy_on_write(Region&, unsigned page_index_in_region);
bool page_in_from_inode(Region&, unsigned page_index_in_region);
bool zero_page(Region& region, unsigned page_index_in_region);