1*25681Ssam /* param.h 1.1 86/01/05 */ 2*25681Ssam 3*25681Ssam /* 4*25681Ssam * Machine dependent constants for TAHOE. 5*25681Ssam */ 6*25681Ssam #define NBPG 1024 /* bytes/page */ 7*25681Ssam #define PGOFSET (NBPG-1) /* byte offset into page */ 8*25681Ssam #define PGSHIFT 10 /* LOG2(NBPG) */ 9*25681Ssam 10*25681Ssam #define CLSIZE 1 11*25681Ssam #define CLSIZELOG2 0 12*25681Ssam 13*25681Ssam #define SSIZE 2 /* initial stack size/NBPG */ 14*25681Ssam #define SINCR 2 /* increment of stack/NBPG */ 15*25681Ssam #define UPAGES 6 /* pages of u-area (2 stack pages) */ 16*25681Ssam #define IOBASE ((caddr_t)0xfff00000) /* base of Versabus address space */ 17*25681Ssam 18*25681Ssam #define MAXCKEY 255 /* maximal allowed code key */ 19*25681Ssam #define MAXDKEY 255 /* maximal allowed data key */ 20*25681Ssam #define NCKEY (MAXCKEY+1) /* # code keys, including 0 (reserved) */ 21*25681Ssam #define NDKEY (MAXDKEY+1) /* # data keys, including 0 (reserved) */ 22*25681Ssam 23*25681Ssam /* 24*25681Ssam * Some macros for units conversion 25*25681Ssam */ 26*25681Ssam /* Core clicks (1024 bytes) to segments and vice versa */ 27*25681Ssam #define ctos(x) (x) 28*25681Ssam #define stoc(x) (x) 29*25681Ssam 30*25681Ssam /* Core clicks (1024 bytes) to disk blocks */ 31*25681Ssam #define ctod(x) (x) 32*25681Ssam #define dtoc(x) (x) 33*25681Ssam #define dtob(x) ((x)<<PGSHIFT) 34*25681Ssam 35*25681Ssam /* clicks to bytes */ 36*25681Ssam #define ctob(x) ((x)<<PGSHIFT) 37*25681Ssam 38*25681Ssam /* bytes to clicks */ 39*25681Ssam #define btoc(x) ((((unsigned)(x)+NBPG-1) >> PGSHIFT)) 40*25681Ssam 41*25681Ssam /* 42*25681Ssam * Macros to decode processor status word. 43*25681Ssam */ 44*25681Ssam #define USERMODE(ps) (((ps) & PSL_CURMOD) == PSL_CURMOD) 45*25681Ssam #define BASEPRI(ps) (((ps) & PSL_IPL) == 0) 46*25681Ssam 47*25681Ssam #define DELAY(n) { register int N = 3*(n); while (--N > 0); } 48