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