pc: zero rampage() memory (thanks LordCreepity)

memory returned by rampage() is not zeroed, so we have to
zero it ourselfs. apparently, this bug didnt show up as we
where zeroing conventional low memory before the new memory
map code. also rampage() never returns nil.
This commit is contained in:
cinap_lenrek 2020-04-06 01:28:34 +02:00
parent 0ba0820070
commit a35cd0f861

View file

@ -524,8 +524,7 @@ mmuwalk(ulong* pdb, ulong va, int level, int create)
panic("mmuwalk2: va %luX entry %luX", va, *table);
if(!(*table & PTEVALID)){
map = rampage();
if(map == nil)
panic("mmuwalk: page alloc failed");
memset(map, 0, BY2PG);
*table = PADDR(map)|PTEWRITE|PTEVALID;
}
table = KADDR(PPN(*table));