1 #ifndef _PMAP_MACHINE_ 2 #define _PMAP_MACHINE_ 3 4 /* 5 * Pmap stuff 6 * [some ideas borrowed from torek, but no code] 7 */ 8 9 struct context_state { 10 queue_chain_t context_link; 11 int context_num; 12 pmap_t context_upmap; 13 }; 14 15 struct pmap { 16 int pm_refcount; /* pmap reference count */ 17 simple_lock_data_t pm_lock; /* lock on pmap */ 18 struct pmap_statistics pm_stats; /* pmap statistics */ 19 context_t pm_context; /* context if any */ 20 int pm_version; 21 unsigned char *pm_segmap; 22 }; 23 24 typedef struct pmap *pmap_t; 25 26 extern pmap_t kernel_pmap; 27 28 struct pmeg_state { 29 queue_chain_t pmeg_link; 30 int pmeg_index; 31 pmap_t pmeg_owner; 32 int pmeg_owner_version; 33 vm_offset_t pmeg_va; 34 int pmeg_wired_count; 35 int pmeg_reserved; 36 int pmeg_vpages; 37 }; 38 39 typedef struct pmeg_state *pmeg_t; 40 41 #define PMAP_ACTIVATE(pmap, pcbp, iscurproc) \ 42 pmap_activate(pmap, pcbp, iscurproc); 43 #define PMAP_DEACTIVATE(pmap, pcbp) \ 44 pmap_deactivate(pmap, pcbp) 45 46 #define pmap_kernel() (kernel_pmap) 47 48 /* like the sparc port, use the lower bits of a pa which must be page 49 * aligned anyway to pass memtype, caching information. 50 */ 51 #define PMAP_MMEM 0x0 52 #define PMAP_OBIO 0x1 53 #define PMAP_VME16D 0x2 54 #define PMAP_VME32D 0x3 55 #define PMAP_MEMMASK 0x3 56 #define PMAP_NC 0x4 57 #define PMAP_SPECMASK 0x7 58 59 #endif _PMAP_MACHINE_ 60