diff --git a/kern/pmap.c b/kern/pmap.c index 58c0a41..2c590f2 100644 --- a/kern/pmap.c +++ b/kern/pmap.c @@ -183,8 +183,8 @@ mem_init(void) // Your code goes here: boot_map_region(kern_pgdir, UPAGES, ROUNDUP(pages_size, PGSIZE), - PADDR(pages), PTE_W); - kern_pgdir[PDX(UPAGES)] |= PTE_U | PTE_P; + PADDR(pages), PTE_U); + kern_pgdir[PDX(UPAGES)] |= PTE_U; kern_pgdir[PDX(UPAGES)] &= ~PTE_W; ////////////////////////////////////////////////////////////////////// @@ -196,7 +196,7 @@ mem_init(void) // LAB 3: Your code here. boot_map_region(kern_pgdir, UENVS, ROUNDUP(envs_size, PGSIZE), - PADDR(envs), PTE_W); + PADDR(envs), PTE_U); kern_pgdir[PDX(UENVS)] |= PTE_U; kern_pgdir[PDX(UPAGES)] &= ~PTE_W;