sunnysideup wrote:
Or can I just keep the identity map? It seems simpler right?
Any disadvantage of keeping an identity map?
Yeah, because you're pretty basically ignoring the whole point of paging.
Also if your kernel is loaded at 1 MB then you won't be able to load your programs at lower addresses, such as zero.
Also don't just map 4 MB and call it a day.
You should map just enough, according to the size of your kernel. Or you will run into random errors once your code expands beyond 4 MB. Just something to keep in mind for the future.
For sure you can have certain sections identity mapped but the whole kernel, better not.
Didn't read the whole topic, just giving some general heads up.