On Tue, Feb 24, 2015 at 11:53 AM, Vishwas Srivastava <vishu.kernel@gmail.com> wrote:
Hi Sannu, 1G/3G address split is for virtual address. I am not talking about physical address translation stuff here. When a kernel code is compiled for a 32 bit architecture, my assumption is, compiler will generate the code for the full 4G address range. So there must be somebody who is relocating/translating the kernel code address between 0-4G to 3G--4G address space. Who is that guy? and is my understanding correct??
On Tue, Feb 24, 2015 at 10:54 PM, Sannu K <sannumail4foss@gmail.com> wrote:
Address generated by the linker is virtual address, it is not same as physical address. Kernel / MMU will do the virtual to physical address mapping.
Hope this helps, PrasannaKumar
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
I believe it is done as part of kernel image linker script, please have a look at linux/arch/x86/kernel/vmlinux.lds.S. The very first logical address inside script is derived from LOAD_OFFSET (for x86_32) or __PAGE_OFFSET which is 3G mark. Hope I am pointing you in right way. -Rajat