next up previous contents index
Next: 10.9.6 pdir_get_pte: retrieve the Up: (X86) Base Environment: Page Previous: 10.9.4 ptab_find_pte: find an

10.9.5 pdir_find_pte: look up a page table entry from a page directory

   

SYNOPSIS

#include <oskit/x86/base_paging.h>

pt_entry_t *pdir_find_pte(oskit_addr_t pdir_pa, oskit_addr_t la);

DESCRIPTION

This function is a combination of pdir_find_pde and ptab_find_pte: it descends through both levels of the x86 page table hierarchy and finds the page table entry for the specified linear address.

This function assumes that if the page directory entry selected by bits 22-31 of la is valid (the INTEL_PDE_VALID bit is set), then that entry actually refers to a page table, and is not a 4MB page mapping. The caller must ensure that this is the case.

PARAMETERS

pdir_pa
Physical address of the page directory.
la
Linear address to use to select the appropriate page directory and page table entries.

RETURNS

Returns a pointer to the selected page table entry, or NULL if there is no page table for this linear address.

DEPENDENCIES

pdir_find_pde
10.9.3
ptab_find_pte
10.9.4



University of Utah Flux Research Group