1 /* kdbparam.h 7.6 87/03/13 */ 2 3 #define DBNAME "kdb\n" 4 #define LPRMODE "%R" 5 #define OFFMODE "+%R" 6 7 #define MAXINT 0x7fffffff 8 #define MAXSTOR (KERNBASE - ctob(UPAGES)) 9 10 #define ENTRYMASK 1 /* check for entry masks */ 11 #define ishiddenreg(p) ((p) <= ®list[8]) 12 13 #define BPT 0x30 14 #define KCALL 0xcf 15 #define CASEL 0xfc 16 #define TBIT 0x10 17 18 #define KDB_IPL 0xf /* highest priority software interrupt */ 19 #define setsoftkdb() mtpr(SIRR, KDB_IPL) 20 21 #define clrsstep() (pcb.pcb_psl &= ~TBIT) 22 #define setsstep() (pcb.pcb_psl |= TBIT) 23 24 #define SETBP(ins) ((BPT<<24) | ((ins) & 0xffffff)) 25 26 #define getprevpc(fp) get((off_t)(fp)-8, DSP) /* pc of caller */ 27 #define getprevframe(fp) (get((off_t)(fp), DSP)&~3) /* fp of caller */ 28 #define getnargs(fp) (((get((off_t)(fp)-4, DSP)&0xffff)-4)/4) 29 #define nextarg(ap) ((ap) + 4) /* next argument in list */ 30 #define NOFRAME 0 /* fp at top of call stack */ 31 32 #define issignalpc(pc) ((unsigned)MAXSTOR < (pc) && (pc) < (unsigned)KERNBASE) 33 #define getsignalpc(fp) get((off_t)(fp)+44, DSP)/* pc of caller before signal */ 34 35 #define leng(a) ((long)((unsigned)(a))) 36 #define shorten(a) (((a) >> 16) & 0xffff) 37 #define itol(a,b) ((long)(((a) << 16) | ((b) & 0xffff))) 38 #define byte(a) (((a) >> 24) & 0xff) 39 #define btol(a) ((long)((a) << 24)) 40 41 /* check for address wrap around */ 42 #define addrwrap(oaddr,newaddr) \ 43 (((oaddr)^(newaddr)) >> 24) 44 /* 45 * INSTACK tells whether its argument is a stack address. 46 * INUDOT tells whether its argument is in the (extended) u. area. 47 * These are used for consistency checking and dont have to be exact. 48 * 49 * INKERNEL tells whether its argument is a kernel space address. 50 * KVTOPH trims a kernel virtal address back to its offset 51 * in the kernel address space. 52 */ 53 #define INSTACK(x) (((int)(x)&0xf0000000) == 0xb0000000) 54 #define INUDOT(x) (((int)(x)&0xf0000000) == 0xb0000000) 55 #define INKERNEL(x) (((int)(x)&0xf0000000) == 0xc0000000) 56 57 #define KERNOFF (KERNBASE + 0x800) /* start of kernel's text */ 58 /* #define KVTOPH(x) ((x)&~ 0xc0000000) sometimes */ 59