#include <oskit/x86/base_paging.h>pt_entry_t pdir_get_pte(oskit_addr_t pdir_pa, oskit_addr_t la);
This function is a simple extension of pdir_find_pte: instead of returning the address of the selected page table entry, it returns the contents of the page table entry: i.e., the physical page frame in bits 12-31 and the associated INTEL_PTE_* flags in bits 0-11. If there is no page table in the page directory for the specified linear address, then this function returns 0, the same as if there was a page table but the selected page table entry was zero (invalid).As with pdir_find_pte, 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.
- pdir_pa
- Physical address of the page directory.
- la
- Linear address to use to select the appropriate page directory and page table entries.
Returns the selected page table entry, or zero if there is no page table for this linear address. Also returns zero if the selected page table entry exists but is zero.
- pdir_find_pte
- 10.9.5