|
|
1.1 ! root 1: /* pte.h 4.9 81/05/14 */ ! 2: /* Tahoe "used" bit version, May 1984 */ ! 3: ! 4: /* ! 5: * Tahoe page table entry ! 6: * ! 7: * There are two major kinds of pte's: those which have ever existed (and are ! 8: * thus either now in core or on the swap device), and those which have ! 9: * never existed, but which will be filled on demand at first reference. ! 10: * There is a structure describing each. There is also an ancillary ! 11: * structure used in page clustering. ! 12: */ ! 13: ! 14: #ifndef LOCORE ! 15: struct pte ! 16: { ! 17: unsigned int ! 18: pg_v:1, /* valid bit */ ! 19: pg_prot:4, /* access control */ ! 20: pg_fod:1, /* is fill on demand (=0) */ ! 21: :1, /*swapm is not used in 4.2 */ ! 22: pg_nc:1, /* 'uncacheable page' bit */ ! 23: pg_m:1, /* hardware maintained modified bit */ ! 24: pg_u:1, /* hardware maintained 'used' bit */ ! 25: pg_pfnum:22; /* core page frame number or 0 */ ! 26: }; ! 27: struct hpte ! 28: { ! 29: unsigned int ! 30: pg_high:10, /* special for clustering */ ! 31: pg_pfnum:22; ! 32: }; ! 33: struct fpte ! 34: { ! 35: unsigned int ! 36: pg_v:1, ! 37: pg_prot:4, ! 38: pg_fod:1, /* is fill on demand (=1) */ ! 39: :1, ! 40: pg_fileno:5, /* file mapped from or TEXT or ZERO */ ! 41: pg_blkno:20; /* file system block number */ ! 42: }; ! 43: #endif ! 44: ! 45: #define PG_V 0x80000000 ! 46: #define PG_PROT 0x78000000 /* all protection bits (dorit). */ ! 47: #define PG_FOD 0x04000000 ! 48: #define PG_N 0x01000000 /* Non-cacheable */ ! 49: #define PG_M 0x00800000 ! 50: #define PG_U 0x00400000 ! 51: #define PG_PFNUM 0x003fffff ! 52: ! 53: #define PG_FZERO (NOFILE) ! 54: #define PG_FTEXT (NOFILE+1) ! 55: #define PG_FMAX (PG_FTEXT) ! 56: ! 57: #define PG_NOACC 0 ! 58: #define PG_KR 0x40000000 ! 59: #define PG_KW 0x60000000 ! 60: #define PG_URKR 0x50000000 ! 61: #define PG_URKW 0x70000000 ! 62: #define PG_UW 0x78000000 ! 63: ! 64: /* ! 65: * Pte related macros ! 66: */ ! 67: #define dirty(pte) ((pte)->pg_fod == 0 && (pte)->pg_pfnum && \ ! 68: ((pte)->pg_m)) ! 69: ! 70: #ifndef LOCORE ! 71: #ifdef KERNEL ! 72: struct pte *vtopte(); ! 73: ! 74: /* utilities defined in locore.s */ ! 75: extern struct pte Sysmap[]; ! 76: extern struct pte Usrptmap[]; ! 77: extern struct pte usrpt[]; ! 78: extern struct pte Swapmap[]; ! 79: extern struct pte Forkmap[]; ! 80: extern struct pte Xswapmap[]; ! 81: extern struct pte Xswap2map[]; ! 82: extern struct pte Pushmap[]; ! 83: extern struct pte Vfmap[]; ! 84: /* ! 85: extern struct pte IOmap[]; ! 86: */ ! 87: extern struct pte VD0map[]; ! 88: extern struct pte VD1map[]; ! 89: extern struct pte VD2map[]; ! 90: extern struct pte VD3map[]; ! 91: extern struct pte UDmap[]; ! 92: extern struct pte CY0map[]; ! 93: extern struct pte CY1map[]; ! 94: extern struct pte XYmap[]; ! 95: extern struct pte mmap[]; ! 96: extern struct pte msgbufmap[]; ! 97: extern struct pte camap[]; ! 98: #endif ! 99: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.