virtual adress for kernel

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Adek336

virtual adress for kernel

Post by Adek336 »

I would like to know what virtual adresses do you give to your kernel. Speak out! Is it 0, 0x100000 (1Mb) or is it for example 0xC0000000 (3 Gb)?

Thanx for the answers,
Adrian.
Xenos

RE:virtual adress for kernel

Post by Xenos »

My kernel is at 0x8FE00 - ((kernel_length + 0x0F) % 0x10). I use this crazy value because it works best with my bootloader and puts the kernel just below the GDT. This part of memory is identity mapped because I initialize paging in the lower parts of this code, which can be discarded later.
carbonBased

RE:virtual adress for kernel

Post by carbonBased »

my _micro_ kernel is loaded at 1mb physical, and 1mb virtual (ie, phys = virt).  All the modules, however, will be mapped at >16MB (physical) if possible (for DMA reasons) or as high as possible if otherwise.

The virtual address isn't overly decided yet; applications may not even see the kernel... at least probably not all of it.  There will, perhaps, be a shared, read-only memory space between the kernel and applications, but it will (quite possible) be virtually mapped to 0x80000000 (2GB) or 0xC0000000 (3GB).

Cheers,
Jeff
Post Reply