[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/6] enable user access
From: |
Luca Dariz |
Subject: |
[PATCH 5/6] enable user access |
Date: |
Fri, 28 Jan 2022 19:24:08 +0100 |
The pmap module is a bit limited on 64 bit paging, so this should be
refined when we'll be able to use addresses over 4G.
Signed-off-by: Luca Dariz <luca@orpolo.org>
---
i386/intel/pmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c
index 91835b30..278ffb97 100644
--- a/i386/intel/pmap.c
+++ b/i386/intel/pmap.c
@@ -1298,7 +1298,7 @@ pmap_t pmap_create(vm_size_t size)
pa_to_pte(kvtophys((vm_offset_t) page_dir[i]))
| INTEL_PTE_VALID
#if defined(MACH_PV_PAGETABLES) || defined(__x86_64__)
- | INTEL_PTE_WRITE
+ | INTEL_PTE_WRITE | INTEL_PTE_USER
#endif
);
}
@@ -1309,7 +1309,7 @@ pmap_t pmap_create(vm_size_t size)
!= KERN_SUCCESS)
panic("pmap_create");
memset(p->l4base, 0, INTEL_PGBYTES);
- WRITE_PTE(&p->l4base[0], pa_to_pte(kvtophys((vm_offset_t) p->pdpbase))
| INTEL_PTE_VALID | INTEL_PTE_WRITE);
+ WRITE_PTE(&p->l4base[0], pa_to_pte(kvtophys((vm_offset_t) p->pdpbase))
| INTEL_PTE_VALID | INTEL_PTE_WRITE | INTEL_PTE_USER);
#ifdef MACH_PV_PAGETABLES
// FIXME: use kmem_cache_alloc instead
if (kmem_alloc_wired(kernel_map,
--
2.30.2
- [PATCH 0/6] Add initial support for booting x86_64 from grub, Luca Dariz, 2022/01/28
- [PATCH 4/6] fix console setting from cmdline, Luca Dariz, 2022/01/28
- [PATCH 3/6] fix register corruption in irq on qemu, Luca Dariz, 2022/01/28
- [PATCH 2/6] cleanup multiboot, Luca Dariz, 2022/01/28
- [PATCH 1/6] add support for booting from grub with x86_64, Luca Dariz, 2022/01/28
- [PATCH 6/6] fix Task State Segment layout for 64 bit, Luca Dariz, 2022/01/28
- [PATCH 5/6] enable user access,
Luca Dariz <=