aboutsummaryrefslogtreecommitdiff
path: root/pk/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'pk/vm.c')
-rw-r--r--pk/vm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pk/vm.c b/pk/vm.c
index cd2cba1..4f3523e 100644
--- a/pk/vm.c
+++ b/pk/vm.c
@@ -482,9 +482,8 @@ void supervisor_vm_init()
uintptr_t pk_vm_init()
{
- // keep RV32 addresses positive
- if (!current.elf64)
- current.mmap_max = MIN(current.mmap_max, 0x80000000U);
+ // keep user addresses positive
+ current.mmap_max = MIN(current.mmap_max, (uintptr_t)INTPTR_MAX + 1);
__map_kernel_range(0, 0, current.first_free_paddr, PROT_READ|PROT_WRITE|PROT_EXEC);
__map_kernel_range(first_free_page, first_free_page, free_pages * RISCV_PGSIZE, PROT_READ|PROT_WRITE);