1 /* 2 * Copyright (c) 1986, 1988 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 * @(#)cpu.h 7.1 (Berkeley) 05/21/88 7 */ 8 9 /* 10 * Assorted definitions unique to TAHOE CPU support. 11 */ 12 13 #define uncache(v) mtpr(PDCS, (caddr_t)(v)) 14 #define movow(a,w) _movow((u_short *)(a), (u_short)(w)) 15 #define movob(a,b) _movob((u_char *)(a), (u_char)(b)) 16 17 #define resettodr() /* no todr to set */ 18 19 #define MAXCKEY 255 /* maximal allowed code key */ 20 #define MAXDKEY 255 /* maximal allowed data key */ 21 #define NCKEY (MAXCKEY+1) /* # code keys, including 0 (reserved) */ 22 #define NDKEY (MAXDKEY+1) /* # data keys, including 0 (reserved) */ 23 24 #ifndef LOCORE 25 #ifdef KERNEL 26 char ckey_cache[NCKEY]; /* 1 =>'s key i may be in code cache */ 27 short ckey_cnt[NCKEY]; /* code key reference count */ 28 char dkey_cache[NDKEY]; /* 1 =>'s key i may be in data cache */ 29 short dkey_cnt[NDKEY]; /* data key reference count */ 30 #endif 31 32 /* 33 * Statistics maintained for code and 34 * data cache key allocations algorithms. 35 */ 36 struct keystats { 37 long ks_avail; /* number of keys currently unallocated */ 38 long ks_dirty; /* number of keys currently waiting for purge */ 39 long ks_allocs; /* number of keys allocated */ 40 long ks_allocfree; /* key allocated from free slot */ 41 long ks_norefs; /* key marked in use, but refcnt 0 */ 42 long ks_taken; /* key taken from single process */ 43 long ks_shared; /* key taken from multiple processes */ 44 long ks_inval; /* number of times keys exchanged */ 45 }; 46 #endif 47 48 long *user_psl; /* user mode psl for ast's */ 49 int intenable; /* interrupts enable startup flag */ 50 int clk_enable; /* clock enable startup flag */ 51 52 /* 53 * Enable realtime clock. 54 */ 55 #define enablertclock() (clk_enable = 1) 56