Re: Kernel and User Address Distinction.

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

 



"matrix reloaded" <matrix_reloaded18@xxxxxxxxxxxxxx> writes:

> Do you mean that kernel menory which would be 1 GB in this case is at a fixed 
> address physically and just by shifting the virtual address by PAGE_OFFSET we 
> can get Physical address ? 

Yes, in the low-memory-style x86 setup, the gigabyte of virtual pages
starting at 0xC0000000 map to a gigabyte of physical addresses.  It's
not really a whole gigabyte, though, because the last part is used for
some dynamic stuff.

> As stated in the first mail that kernel has page table 
> base addresses from where it translates the addresses. Then what is that ? 

The CPU doesn't know that Linux has this gig-to-gig thing going on.
That's the kernel's business.  The CPU just knows that it has to
translate all the virtual addresses.  That's done in the MMU.  The
kernel sets up page tables for all the kernel virtual-to-physical
translations when it starts up.

I forget where it sets up those page tables, but this has been covered
on kernelnewbies before, so some skillful googling should avail you.

-- 
  Ed L Cashin <ecashin@xxxxxxxxxx>


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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