Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Apr 2012 09:56:06 -0500
From:      Mark Tinguely <marktinguely@gmail.com>
To:        vasanth rao naik sabavat <vasanth.raonaik@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: question about amd64 pagetable page allocation.
Message-ID:  <CAP%2BM-_Es5A3a0%2BcM6K=qi_kbk0ftnHHmZoazuerhg3TxrVr6SA@mail.gmail.com>
In-Reply-To: <CAAuizBhUuWvbYjZewO5LgHPuGfi37mW0sJFAKs-YN-G1ZbNAUQ@mail.gmail.com>
References:  <CAAuizBhUuWvbYjZewO5LgHPuGfi37mW0sJFAKs-YN-G1ZbNAUQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 3, 2012 at 8:33 AM, vasanth rao naik sabavat
<vasanth.raonaik@gmail.com> wrote:
> Hi,
>
> I am trying to understand the page table page allocation for a process in
> FBSD6.1. I see that the page table pages are allocated by vm_page_alloc()=
.
> I believe the virtual address for this allocated page can be derived by
> PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)), however when I compare this address wit=
h
> the virtual address accessed in pmap_remove_pages() they are not the same=
.
>
> The virtual address of a *PTE in pmap_remove_pages() is something like
> *0xffff800000643200
> *
> However, the virtual address of the page allocated by vm_page_alloc() is =
=A0*
> 0xffffff033c6a0000
>
> *I would also like to understand the importance of loc_PTmap, I believe t=
he
> pmap_remove_pages() is derving the page table page addresses from loc_PTm=
ap?
> (kgdb) p loc_PTmap
> Cannot access memory at address 0xffff800000000000
>
> How do we relate the loc_PTmap to the page table pages allocated by
> vm_page_alloc() in _pmap_allocpte().
>
> Thanks,
> Vasanth



The answer to your questions will be more obvious when you get an
understanding of the Recursive Page Tables.

--Mark Tinguely.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAP%2BM-_Es5A3a0%2BcM6K=qi_kbk0ftnHHmZoazuerhg3TxrVr6SA>