Re: x86 pages, page tables, and page table entries

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

 



Le Tue, 22 Jan 2008 10:31:14 +0100,
"Vegard Nossum" <vegard.nossum@xxxxxxxxx> a écrit :

> It allocates two pages and prints out the virtual address of the page
> itself, then the pte_t* of that address. When run, I get this:
> 
> pte for c7802000 = c0438c78
> pte for c7803000 = c0438c78
> 
> So it seems that the two pages actually share a pte. How is this
> possible? Am I using lookup_address() wrongly?

Probably because the identity mapping of the kernel uses large pages
instead of 4k-pages, so that what you get is not a PTE address, but
rather a PMD address.

Look at the code of lookup_address() :

034         if (pmd_large(*pmd))
035                 return (pte_t *)pmd;

Note that I'm not sure, it's just a quick idea.

Sincerly,

Thomas
-- 
Thomas Petazzoni, thomas.petazzoni@xxxxxxxxxxxxxxxxxx
Free Electrons
http://free-electrons.com

Attachment: signature.asc
Description: PGP 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