diff options
Diffstat (limited to 'src/kernel/core/paging.c')
-rw-r--r-- | src/kernel/core/paging.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/core/paging.c b/src/kernel/core/paging.c index 74331c0..5a58c8c 100644 --- a/src/kernel/core/paging.c +++ b/src/kernel/core/paging.c @@ -221,7 +221,8 @@ bool pd_map_page(void* vaddr, uint32_t frame_id, bool rw) { } current_pd->page[pt] = pd->page[pt] = - (new_pt_frame << PTE_FRAME_SHIFT) | PTE_PRESENT | PTE_RW; + (new_pt_frame << PTE_FRAME_SHIFT) | PTE_PRESENT | PTE_RW + | ((size_t)vaddr < K_HIGHHALF_ADDR ? PTE_USER : 0); invlpg(¤t_pt[pt]); } current_pt[pt].page[page] = |