Re: Re: Kernel and User Address Distinction.

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

 



matrix reloaded (matrix_reloaded18@xxxxxxxxxxxxxx) wrote:
>   If it's so, then what is the significance of __pa and __va ? 
> Could you please throw some light on this ... 
>  
> Thanks. 
> Sumit. 

Hi,

kernel memory is placed before PAGE_OFFSET 0xC0000000. So __pa() and
__va() translate virtual adress to real and real to virtual.

But a read of code would be better ;-)

http://lxr.linux.no/source/include/asm-i386/page.h?v=2.4.26
http://kos.enix.org/pub/intelvol1.pdf.gz
http://kos.enix.org/pub/intelvol2.pdf.gz
http://kos.enix.org/pub/intelvol3.pdf.gz
The three lastest are pointer to ia32 book.

Hope this help.
  
> On Mon, 09 Aug 2004 Ed L Cashin wrote : 
> >"matrix reloaded" <matrix_reloaded18@xxxxxxxxxxxxxx> writes: 
> > 
> > > Hi, 
> > > 	Sorry if this kinda request has already been logged in this mailing list. I would 
> > > like to know how the interpretation of Kernel Address and User Address is 
> made. I 
> > > mean to say that how does mmu know that it needs to call __pa(x) or __va(x) 
> for 
> > > Kernel Adderss and others for user address ? Could you also tell me where this 
> > > code is exactly present ? 
> > 
> >It doesn't.  On x86, it has a pointer to the base of the page tables 
> >in control register three.  When it's translating a virtual address it 
> >uses the page tables found there to resolve any translation that isn't 
> >already in the TLB.  It's the same whether the CPU is running in ring 
> >0 (kernel) or ring 3 (userland). 
-- 
Amicalement/Regards
Christophe

-----------------------------------------------------------------
Christophe Lucas <c.lucas@xxxxxxxxxxx>         developer/sysadmin
Registered User #271267              http://odie.mcom.fr/~clucas/
RotomaLUG member (http://www.rotomalug.org)   gpg dsa: 0x1E87C874
-----------------------------------------------------------------

Se tromper est humain ; Vraiment foutre la merde necessite le mot de 
passe de root.

Attachment: signature.asc
Description: Digital signature


[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