Re: Query regarding Kernel Space Memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 24, 2015 at 11:53 AM, Vishwas Srivastava
<vishu.kernel@xxxxxxxxx> 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@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxx
> 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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux