|
|
1.1 ! root 1: /* ! 2: * VAX page table entry ! 3: * ! 4: * There are two major kinds of pte's: those which have ever existed (and are ! 5: * thus either now in core or on the swap device), and those which have ! 6: * never existed, but which will be filled on demand at first reference. ! 7: * There is a structure describing each. There is also an ancillary ! 8: * structure used in page clustering. ! 9: */ ! 10: ! 11: struct pte ! 12: { ! 13: unsigned int pg_pfnum:21, /* core page frame number or 0 */ ! 14: :2, ! 15: pg_vreadm:1, /* modified since vread (or with _m) */ ! 16: pg_swapm:1, /* have to write back to swap */ ! 17: pg_fod:1, /* is fill on demand (=0) */ ! 18: pg_m:1, /* hardware maintained modified bit */ ! 19: pg_prot:4, /* access control */ ! 20: pg_v:1; /* valid bit */ ! 21: }; ! 22: struct hpte ! 23: { ! 24: unsigned int pg_pfnum:21, ! 25: :2, ! 26: pg_high:9; /* special for clustering */ ! 27: }; ! 28: struct fpte ! 29: { ! 30: unsigned int pg_blkno:20, /* file system block number */ ! 31: pg_source:5, /* TEXT or ZERO */ ! 32: pg_fod:1, /* is fill on demand (=1) */ ! 33: :1, ! 34: pg_prot:4, ! 35: pg_v:1; ! 36: }; ! 37: ! 38: #define PG_V 0x80000000 ! 39: #define PG_PROT 0x78000000 ! 40: #define PG_M 0x04000000 ! 41: #define PG_FOD 0x02000000 ! 42: #define PG_VREADM 0x00800000 ! 43: #define PG_PFNUM 0x001fffff ! 44: ! 45: #define PG_FMIN (NOFILE) ! 46: #define PG_FZERO (PG_FMIN) ! 47: #define PG_FTEXT (PG_FMIN+1) ! 48: #define PG_FMAX (PG_FTEXT) ! 49: ! 50: #define PG_NOACC 0 ! 51: #define PG_KW 0x10000000 ! 52: #define PG_KR 0x18000000 ! 53: #define PG_UW 0x20000000 ! 54: #define PG_URKW 0x70000000 ! 55: #define PG_URKR 0x78000000 ! 56: ! 57: ! 58: #ifdef KERNEL ! 59: /* ! 60: * Pte related macros ! 61: */ ! 62: #define dirty(pte) ((pte)->pg_fod == 0 && (pte)->pg_pfnum && \ ! 63: ((pte)->pg_m || (pte)->pg_swapm)) ! 64: #define physadr(a) ((long)(a)&PGOFSET|(Sysmap[((long)(a)&~KSTART)/NBPG].pg_pfnum*NBPG)) ! 65: ! 66: struct pte *vtopte(); ! 67: struct pte *btopte(); ! 68: ! 69: /* various pointers into the system page table */ ! 70: extern struct pte *Sysmap; ! 71: extern struct pte *Usrptmap; ! 72: extern struct pte *usrpt; ! 73: extern struct pte *Swapmap; ! 74: extern struct pte *Forkmap; ! 75: extern struct pte *Xswapmap; ! 76: extern struct pte *Xswap2map; ! 77: extern struct pte *Pushmap; ! 78: extern struct pte *mmap; ! 79: extern struct pte *msgbufmap; ! 80: extern struct pte *camap; ! 81: extern struct pte *Prusrmap; ! 82: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.