1: /*
   2:  * Copyright (c) 1982, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)pte.h	7.1 (Berkeley) 6/5/86
   7:  */
   8: 
   9: /*
  10:  * VAX page table entry
  11:  *
  12:  * There are two major kinds of pte's: those which have ever existed (and are
  13:  * thus either now in core or on the swap device), and those which have
  14:  * never existed, but which will be filled on demand at first reference.
  15:  * There is a structure describing each.  There is also an ancillary
  16:  * structure used in page clustering.
  17:  */
  18: 
  19: #ifndef LOCORE
  20: struct pte
  21: {
  22: unsigned int    pg_pfnum:21,        /* core page frame number or 0 */
  23:         :2,
  24:         pg_vreadm:1,        /* modified since vread (or with _m) */
  25:         pg_swapm:1,     /* have to write back to swap */
  26:         pg_fod:1,       /* is fill on demand (=0) */
  27:         pg_m:1,         /* hardware maintained modified bit */
  28:         pg_prot:4,      /* access control */
  29:         pg_v:1;         /* valid bit */
  30: };
  31: struct hpte
  32: {
  33: unsigned int    pg_pfnum:21,
  34:         :2,
  35:         pg_high:9;      /* special for clustering */
  36: };
  37: struct fpte
  38: {
  39: unsigned int    pg_blkno:24,        /* file system block number */
  40:         pg_fileno:1,        /* file mapped from or TEXT or ZERO */
  41:         pg_fod:1,       /* is fill on demand (=1) */
  42:         :1,
  43:         pg_prot:4,
  44:         pg_v:1;
  45: };
  46: #endif
  47: 
  48: #define PG_V        0x80000000
  49: #define PG_PROT     0x78000000
  50: #define PG_M        0x04000000
  51: #define PG_FOD      0x02000000
  52: #define PG_VREADM   0x00800000
  53: #define PG_PFNUM    0x001fffff
  54: 
  55: #define PG_FZERO    0
  56: #define PG_FTEXT    1
  57: #define PG_FMAX     (PG_FTEXT)
  58: 
  59: #define PG_NOACC    0
  60: #define PG_KW       0x10000000
  61: #define PG_KR       0x18000000
  62: #define PG_UW       0x20000000
  63: #define PG_URKW     0x70000000
  64: #define PG_URKR     0x78000000
  65: 
  66: /*
  67:  * Pte related macros
  68:  */
  69: #define dirty(pte)  ((pte)->pg_fod == 0 && (pte)->pg_pfnum && \
  70:                 ((pte)->pg_m || (pte)->pg_swapm))
  71: 
  72: #ifndef LOCORE
  73: #ifdef KERNEL
  74: 
  75: /* utilities defined in locore.s */
  76: extern  struct pte Sysmap[];
  77: extern  struct pte Usrptmap[];
  78: extern  struct pte usrpt[];
  79: extern  struct pte Swapmap[];
  80: extern  struct pte Forkmap[];
  81: extern  struct pte Xswapmap[];
  82: extern  struct pte Xswap2map[];
  83: extern  struct pte Pushmap[];
  84: extern  struct pte Vfmap[];
  85: extern  struct pte mmap[];
  86: extern  struct pte msgbufmap[];
  87: extern  struct pte camap[];
  88: extern  struct pte Nexmap[][16];
  89: extern  struct pte Ioamap[][1];
  90: #ifdef VAX630
  91: extern  struct pte Clockmap[];
  92: extern  struct pte Ka630map[];
  93: #endif
  94: #endif
  95: #endif

Defined struct's

fpte defined in line 37; used 32 times
hpte defined in line 31; never used
pte defined in line 20; used 260 times

Defined macros

PG_FMAX defined in line 57; used 1 times
PG_FOD defined in line 51; used 2 times
PG_FTEXT defined in line 56; used 5 times
PG_M defined in line 50; used 1 times
PG_NOACC defined in line 59; never used
PG_PFNUM defined in line 53; used 2 times
PG_URKW defined in line 63; used 2 times
PG_VREADM defined in line 52; never used
dirty defined in line 69; never used

Usage of this include

pte.h used 108 times
Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1123
Valid CSS Valid XHTML 1.0 Strict