pmap of amd64

Matthew Dillon dillon at apollo.backplane.com
Tue Oct 16 15:18:01 PDT 2007


:
:just for curious: what is recursive pml4 mapping, found from freebsd pmap.h
:
:also, freebsd only have a page of PML4 entries, about 4K/64=64
:entries, not all 512 (2**9).

     I'm not sure but I think what they are doing is mapping the page table
     itself with a page table entry.

     For example, under i386 if you take the page directory address and
     program that into one of the page directory array slots, what you
     get at that address is a representation of the page table.

     [pde] -> [page_table0] -------> [normal-page-in-memory0]
	      [page_table1]	     [normal-page-in-memory1]
	      [page_table2]	     [normal-page-in-memory2]
	      [page_table3]
	      [page_table4]
	      [pde]	-----------> [page_table-page-in-memory0]
	      [page_table6]	     [page_table-page-in-memory1]
		...                  [page_table-page-in-memory2]
				     ...

     This allows the system to look up a page table entry directly in
     memory by indexing relative to some base address.

     I do not think we need to map page tables into memory because we
     will have a direct physical map available and can do the translations
     manually without having to load down the TLB more then it is already.

						-Matt






More information about the Kernel mailing list