Post by Nikolas CoukoumaHas anyone else had trouble with a "bogus memory error" when
initializing paging? Any suggestions for places to check? (loop
conditions, bad values in struct fields, etc.)
I kept getting a "bogus memory error" because I forgot to right-shift
the physical address so that pde->baseAddr holds the most significant 20
bits of the physical address...
I found that most of the errors that involved bad loop conditions in my
code would cause "exception 14" (or maybe it was 13?) errors, instead of
"bogus memory".
My (fairly uninformed) guess based on this experience, is that maybe the
"exception 14" errors are caused by run-of-the-mill wrong memory values,
and "bogus memory" errors are caused by memory values that are greater
than the physical memory available to the processor (for example,
writing 4096 as a pte->baseAddr (instead of 4096>>12 = 1), will cause
the processor to look for the address 4096*4096, which is well beyond
the physcial memory space of the processor).