Page 1 of 1

virtual adress for kernel

Posted: Mon Aug 18, 2003 11:00 pm
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.

RE:virtual adress for kernel

Posted: Mon Aug 18, 2003 11:00 pm
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.

RE:virtual adress for kernel

Posted: Mon Aug 18, 2003 11:00 pm
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