RE: Understanding the mapping of physical memory to kernel address space

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

 



-----Original Message-----
From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [mailto:kernelnewbies-bounces@xxxxxxxxxxxxxxxxx] On Behalf Of Arun KS
Sent: Thursday, March 12, 2015 11:03 AM
To: Sunny Shah
Cc: kernelnewbies
Subject: Re: Understanding the mapping of physical memory to kernel address space

Hello Sunny,

On Thu, Mar 12, 2015 at 10:32 PM, Sunny Shah <shahsunny715@xxxxxxxxx> wrote:
> Hello,
>
> This is my first mail on this list, so please let me know if I'm erring.
>
> I'm reading Bovet and Cesati's "Understanding the Linux Kernel", 
> specifically the chapter "Memory Addressing", sub-section "Kernel Page 
> Tables". Here they describe how Linux initializes its page tables for 
> various RAM sizes and how much of the physical address space is mapped 
> onto the kernel virtual address space.
>
> I have several questions from my reading:
>
> My understanding is that the 32 bit virtual address space of a process 
> is split into 2 parts - the first 3 GiB for the user space and the 
> remaining 1GiB for the kernel (with the same kernel mapping being used 
> for all processes. However, although the kernel is mapped into the 
> higher portion of the address space, it resides in the lower 1 GiB of RAM. Is this correct?
Yes. Incase of 3:1 mapping, kernel virtual address starts at 0xc0000000. You can also have 2:2 mappings aswell. It is a configurable option

Just an FYI, I've seen 1:3 mapping too. We had to do that with the kernels we built
when I was at one company because we needed 3GB of virtual address space to map all
of the memory mapped registers on their ASICs.

There's lots of options here.

Jeff Haran



_______________________________________________
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