diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-04-06 01:28:34 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2020-04-06 01:28:34 +0200 |
commit | a35cd0f861b6ded0811b5c365635e53710d0e157 (patch) | |
tree | 89d81b2bf1fd1afacde4137f9d8a4b48b13ca052 | |
parent | 0ba08200707e5d761cbe39d6b08174f8eb868125 (diff) |
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.
-rw-r--r-- | sys/src/9/pc/mmu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/src/9/pc/mmu.c b/sys/src/9/pc/mmu.c index edcf866db..c0b13674a 100644 --- a/sys/src/9/pc/mmu.c +++ b/sys/src/9/pc/mmu.c @@ -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)); |