|
|
1.1 root 1: /*
2: * @(#)kdbparam.h 7.3 (Berkeley) 6/22/90
3: */
4:
5: #define DBNAME "kdb\n"
6: #define LPRMODE "%R"
7: #define OFFMODE "+%R"
8:
9: #define KDB_IPL 0xf /* highest priority software interrupt */
10: #define setsoftkdb() mtpr(SIRR, KDB_IPL)
11:
12: #define MAXINT 0x7fffffff
13: #define MAXSTOR (KERNBASE - ctob(UPAGES))
14:
15: #define ENTRYMASK 1 /* check for entry masks */
16: #define ishiddenreg(p) ((p) <= &kdbreglist[8])
17:
18: #define BPT 03
19: #define TBIT 020
20:
21: #define clrsstep() (kdbpcb.pcb_psl &= ~TBIT)
22: #define setsstep() (kdbpcb.pcb_psl |= TBIT)
23:
24: #define SETBP(ins) (BPT | ((ins) & ~0xff))
25:
26: #define getprevpc(fp) kdbget((fp)+16, DSP) /* pc of caller */
27: #define getprevframe(fp) (kdbget((fp)+12, DSP)&~2) /* fp of caller */
28: #define NOFRAME 0 /* fp at top of call stack */
29:
30: #define issignalpc(pc) (MAXSTOR < (pc) && (pc) < MAXSTOR+ctob(UPAGES))
31: #define getsignalpc(fp) kdbget((fp)+92, DSP) /* pc of caller before signal */
32:
33: /* long to ints and back (puns) */
34: union {
35: int I[2];
36: long L;
37: } itolws;
38:
39: #define leng(a) itol(0,a)
40: #define shorten(a) ((short)(a))
41: #define itol(a,b) (itolws.I[0]=(b), itolws.I[1]=(a), itolws.L)
42: #define byte(a) ((a) & 0xff)
43: #define btol(a) ((a))
44:
45: /* check for address wrap around */
46: #define addrwrap(oaddr,newaddr) (((oaddr)^(newaddr)) >> 24)
47: /*
48: * INSTACK tells whether its argument is a stack address.
49: * INUDOT tells whether its argument is in the (extended) u. area.
50: * These are used for consistency checking and dont have to be exact.
51: *
52: * INKERNEL tells whether its argument is a kernel space address.
53: * KVTOPH trims a kernel virtal address back to its offset
54: * in the kernel address space.
55: */
56: #define INSTACK(x) (((x)&0xf0000000) == 0x70000000)
57: #define INUDOT(x) (((x)&0xf0000000) == 0x70000000)
58: #define INKERNEL(x) (((x)&0xf0000000) == 0x80000000)
59:
60: #define KVTOPH(x) ((x)&~ 0x80000000)
61: #define KERNOFF 0x80000000
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.