merge
This commit is contained in:
commit
665b78da23
|
@ -524,8 +524,7 @@ mmuwalk(ulong* pdb, ulong va, int level, int create)
|
||||||
panic("mmuwalk2: va %luX entry %luX", va, *table);
|
panic("mmuwalk2: va %luX entry %luX", va, *table);
|
||||||
if(!(*table & PTEVALID)){
|
if(!(*table & PTEVALID)){
|
||||||
map = rampage();
|
map = rampage();
|
||||||
if(map == nil)
|
memset(map, 0, BY2PG);
|
||||||
panic("mmuwalk: page alloc failed");
|
|
||||||
*table = PADDR(map)|PTEWRITE|PTEVALID;
|
*table = PADDR(map)|PTEWRITE|PTEVALID;
|
||||||
}
|
}
|
||||||
table = KADDR(PPN(*table));
|
table = KADDR(PPN(*table));
|
||||||
|
|
|
@ -299,8 +299,6 @@ ptesplit(uintptr* table, uintptr va)
|
||||||
if(pte == nil || (*pte & PTESIZE) == 0 || (va & PGLSZ(1)-1) == 0)
|
if(pte == nil || (*pte & PTESIZE) == 0 || (va & PGLSZ(1)-1) == 0)
|
||||||
return;
|
return;
|
||||||
table = rampage();
|
table = rampage();
|
||||||
if(table == nil)
|
|
||||||
panic("ptesplit: out of memory\n");
|
|
||||||
va &= -PGLSZ(1);
|
va &= -PGLSZ(1);
|
||||||
pa = *pte & ~PTESIZE;
|
pa = *pte & ~PTESIZE;
|
||||||
for(off = 0; off < PGLSZ(1); off += PGLSZ(0))
|
for(off = 0; off < PGLSZ(1); off += PGLSZ(0))
|
||||||
|
|
Loading…
Reference in a new issue