Make mappages fit on the page
This commit is contained in:
parent
82bb0b56c6
commit
cf7b670293
1 changed files with 1 additions and 2 deletions
3
vm.c
3
vm.c
|
@ -77,8 +77,7 @@ mappages(pde_t *pgdir, void *va, uint size, uint pa,
|
||||||
a = (char *) PGROUNDDOWN((uint) va);
|
a = (char *) PGROUNDDOWN((uint) va);
|
||||||
last = (char *) PGROUNDDOWN(((uint) va) + size - 1);
|
last = (char *) PGROUNDDOWN(((uint) va) + size - 1);
|
||||||
for(;;){
|
for(;;){
|
||||||
pte = walkpgdir(pgdir, a, alloc);
|
if((pte = walkpgdir(pgdir, a, alloc) == 0)
|
||||||
if(pte == 0)
|
|
||||||
return -1;
|
return -1;
|
||||||
if(*pte & PTE_P)
|
if(*pte & PTE_P)
|
||||||
panic("remap");
|
panic("remap");
|
||||||
|
|
Loading…
Reference in a new issue