Hey all,
I'm sure this question gets asked a lot, however I couldn't find any resources on the wiki, forum, or after some google searches...
I was wondering why people map their kernels to strange addresses such as 0xC0000000 in the case of the x64 tutorials, or 0xFF300000 in the case of pedigree (any may other locations when i have been looking through code from various other oses)
I can understand the reasoning for not mapping below the 1MB mark, however why not just map the kernel there? Why not use a linear space for the kernel then allocate virtual spaces from 1MB for each new userland application. Is this just personal taste or is there a better technical explanation for this?
Thanks!
Where to map everything?
Re: Where to map everything?
x86_64 kernel usually maps at high address (FFXXXXXX:00000000) or low address,Mattie wrote:I was wondering why people map their kernels to strange addresses such as 0xC0000000 in the case of the x64 tutorials
while x86 kernel usually maps to C0000000, ie. higher half, or low address.
The reason for such is that it form a logical zone to divide kernel and user space, and have these zones be continuous.
You may adjust the size of kernel zone to fit your design, some micro-kernel may just sits on the top most 128MB region (ie. F8000000~FFFFFFFF).
Re: Where to map everything?
I suppose today it's just personal taste. It is defined by a memory management strategy which everyone choses according to his personal taste.Mattie wrote:Is this just personal taste or is there a better technical explanation for this?