1*433d6423SLionel Sambuc 2*433d6423SLionel Sambuc #ifndef _PT_H 3*433d6423SLionel Sambuc #define _PT_H 1 4*433d6423SLionel Sambuc 5*433d6423SLionel Sambuc #include <machine/vm.h> 6*433d6423SLionel Sambuc 7*433d6423SLionel Sambuc #include "vm.h" 8*433d6423SLionel Sambuc #include "pagetable.h" 9*433d6423SLionel Sambuc 10*433d6423SLionel Sambuc /* A pagetable. */ 11*433d6423SLionel Sambuc typedef struct { 12*433d6423SLionel Sambuc /* Directory entries in VM addr space - root of page table. */ 13*433d6423SLionel Sambuc u32_t *pt_dir; /* page aligned (ARCH_VM_DIR_ENTRIES) */ 14*433d6423SLionel Sambuc u32_t pt_dir_phys; /* physical address of pt_dir */ 15*433d6423SLionel Sambuc 16*433d6423SLionel Sambuc /* Pointers to page tables in VM address space. */ 17*433d6423SLionel Sambuc u32_t *pt_pt[ARCH_VM_DIR_ENTRIES]; 18*433d6423SLionel Sambuc 19*433d6423SLionel Sambuc /* When looking for a hole in virtual address space, start 20*433d6423SLionel Sambuc * looking here. This is in linear addresses, i.e., 21*433d6423SLionel Sambuc * not as the process sees it but the position in the page 22*433d6423SLionel Sambuc * page table. This is just a hint. 23*433d6423SLionel Sambuc */ 24*433d6423SLionel Sambuc u32_t pt_virtop; 25*433d6423SLionel Sambuc } pt_t; 26*433d6423SLionel Sambuc 27*433d6423SLionel Sambuc #define CLICKSPERPAGE (VM_PAGE_SIZE/CLICK_SIZE) 28*433d6423SLionel Sambuc 29*433d6423SLionel Sambuc #endif 30