next up previous contents index
Next: 10.9.11 pdir_map_range: map a Up: (X86) Base Environment: Page Previous: 10.9.9 pdir_map_page: map a

10.9.10 pdir_unmap_page: unmap a single 4KB page mapping

   

SYNOPSIS

#include <oskit/x86/base_paging.h>

void pdir_unmap_page(oskit_addr_t pdir_pa, oskit_addr_t la);

DESCRIPTION

This function invalidates a single 4KB page mapping in the linear address space represented by the specified page directory. The la parameter should fall in a page previous mapped with pdir_map_page, otherwise the result of the call is undefined. XXX Is this overly restrictive?

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. In other words, the caller should not attempt to destroy a 4KB page mapping in a part of the linear address space covered by a valid 4MB superpage mapping. Use pmap_unmap_range to remove a 4MB superpage mapping.

PARAMETERS

pdir_pa
Physical address of the page directory acting as the root of the linear address space from which the requested page mapping is to be removed.
la
Linear address contained in the page to be removed. Only bits 12-31 are relevant to this function; bits 0-11 are ignored.

DEPENDENCIES

pdir_find_pde
10.9.3
ptab_find_pte
10.9.4
ptab_free
10.9.8



University of Utah Flux Research Group