Fix permissions.

This commit is contained in:
Danila Fedorin 2019-04-23 17:09:54 -07:00
parent f0e2ab8abd
commit f4e3196494

View File

@ -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;