6 #include <machine/vm.h>
11 #define PTF_WRITE I386_VM_WRITE
12 #define PTF_READ I386_VM_READ
13 #define PTF_PRESENT I386_VM_PRESENT
14 #define PTF_USER I386_VM_USER
15 #define PTF_GLOBAL I386_VM_GLOBAL
16 #define PTF_MAPALLOC I386_VM_PTAVAIL1 /* Page allocated by pt code. */
17 #define PTF_NOCACHE (I386_VM_PWT | I386_VM_PCD)
19 #define ARCH_VM_DIR_ENTRIES I386_VM_DIR_ENTRIES
20 #define ARCH_BIG_PAGE_SIZE I386_BIG_PAGE_SIZE
21 #define ARCH_VM_ADDR_MASK I386_VM_ADDR_MASK
22 #define ARCH_VM_PAGE_PRESENT I386_VM_PRESENT
23 #define ARCH_VM_PDE_MASK I386_VM_PDE_MASK
24 #define ARCH_VM_PDE_PRESENT I386_VM_PRESENT
25 #define ARCH_VM_PTE_PRESENT I386_VM_PRESENT
26 #define ARCH_VM_PTE_USER I386_VM_USER
27 #define ARCH_VM_PTE_RW I386_VM_WRITE
28 #define ARCH_PAGEDIR_SIZE I386_PAGE_SIZE
29 #define ARCH_VM_BIGPAGE I386_VM_BIGPAGE
30 #define ARCH_VM_PT_ENTRIES I386_VM_PT_ENTRIES
32 /* For arch-specific PT routines to check if no bits outside
33 * the regular flags are set.
35 #define PTF_ALLFLAGS (PTF_READ|PTF_WRITE|PTF_PRESENT|PTF_USER|PTF_GLOBAL|PTF_NOCACHE)
37 #define PFERR_NOPAGE(e) (!((e) & I386_VM_PFE_P))
38 #define PFERR_PROT(e) (((e) & I386_VM_PFE_P))
39 #define PFERR_WRITE(e) ((e) & I386_VM_PFE_W)
40 #define PFERR_READ(e) (!((e) & I386_VM_PFE_W))
42 #define VM_PAGE_SIZE I386_PAGE_SIZE