cleaning out memory areas
Posted: Wed Sep 15, 2004 4:17 am
After a few days of hard debugging, I 've found one source of obscure bugs - maybe it is the solution to get rid of a vast majority of them - anyways, I gonna tell you something crucial and to some of you maybe logical, be it due to experience be it due to education:
Clean out Page Directories and Page Tables! Don't rely on only zeroing the dealt out memory areas.
Say: zero out page directory before mapping in the kernel land (simply put in the PDE's at the corresponding places).
Zero out each page table ere you enter any pages. Your MMU might find a "valid" page and use it - and this might not be what you want.
To say it in short:
Zero out all management tables too.
Page Directory and Page Tables.
I just needed to put this here. It has caused me way a lot of headache and wondering: why does it work on this PC and not on any other??!! *damn*
Hope, you can benefit from my atrocious moron-ness.
Clean out Page Directories and Page Tables! Don't rely on only zeroing the dealt out memory areas.
Say: zero out page directory before mapping in the kernel land (simply put in the PDE's at the corresponding places).
Zero out each page table ere you enter any pages. Your MMU might find a "valid" page and use it - and this might not be what you want.
To say it in short:
Zero out all management tables too.
Page Directory and Page Tables.
I just needed to put this here. It has caused me way a lot of headache and wondering: why does it work on this PC and not on any other??!! *damn*
Hope, you can benefit from my atrocious moron-ness.