Barrelfish
Data Structures | Macros | Functions
paging_kernel_target.h File Reference

x86-32 kernel page-table structures. More...

Data Structures

union  x86_32_pdir_entry
 
union  x86_32_ptable_entry
 

Macros

#define X86_32_PTABLE_FLAGS_MASK
 All arch-specific flags valid to be set from user-space.
 
#define X86_32_PTABLE_ACCESS_MASK
 All flags valid for page access protection from user-space.
 
#define X86_32_PTABLE_FLAGS(flags)   (flags & X86_32_PTABLE_FLAGS_MASK)
 Mask out all arch-specific flags except those valid from user-space.
 
#define X86_32_PTABLE_ACCESS(flags)   (flags & X86_32_PTABLE_ACCESS_MASK)
 Mask out all flags except those for access protection.
 
#define X86_32_IS_PRESENT(entry)   ((*(uint32_t *)(entry)) & X86_32_PTABLE_PRESENT)
 

Functions

void paging_x86_32_make_good_pdir (lpaddr_t base)
 Make a "good" PDE table out of a page table. More...
 
void paging_x86_32_reset (void)
 Reset kernel paging. More...
 

Detailed Description

x86-32 kernel page-table structures.

Macro Definition Documentation

#define X86_32_IS_PRESENT (   entry)    ((*(uint32_t *)(entry)) & X86_32_PTABLE_PRESENT)

True if page entry is present in memory

Function Documentation

void paging_x86_32_make_good_pdir ( lpaddr_t  base)

Make a "good" PDE table out of a page table.

A "good" PDE table is one that has all physical address space and the kernel mapped in. This function modifies the passed PDE, based at physical address 'base' accordingly. It does this by taking out the corresponding entries of the kernel's pristine PDE table.

Parameters
basePhysical base address of PDE table to make "good".
void paging_x86_32_reset ( void  )

Reset kernel paging.

This function resets the page maps for kernel and memory-space. It clears out all other mappings. Use this only at system bootup!