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