|
|
1.1 root 1: /*
2: * @(#)kdbparam.h 7.2 (Berkeley) 5/7/88
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) <= ®list[8])
17:
18: #define BPT 03
19: #define TBIT 020
20:
21: #define clrsstep() (pcb.pcb_psl &= ~TBIT)
22: #define setsstep() (pcb.pcb_psl |= TBIT)
23:
24: #define SETBP(ins) (BPT | ((ins) & ~0xff))
25:
26: #define getprevpc(fp) get((fp)+16, DSP) /* pc of caller */
27: #define getprevframe(fp) (get((fp)+12, DSP)&~2) /* fp of caller */
28: #define getnargs(fp) (get((fp)+6, DSP)&0xffff)
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) (MAXSTOR < (pc) && (pc) < MAXSTOR+ctob(UPAGES))
33: #define getsignalpc(fp) get((fp)+92, DSP) /* pc of caller before signal */
34:
35: /* long to ints and back (puns) */
36: union {
37: int I[2];
38: long L;
39: } itolws;
40:
41: #define leng(a) itol(0,a)
42: #define shorten(a) ((short)(a))
43: #define itol(a,b) (itolws.I[0]=(b), itolws.I[1]=(a), itolws.L)
44: #define byte(a) ((a) & 0xff)
45: #define btol(a) ((a))
46:
47: /* check for address wrap around */
48: #define addrwrap(oaddr,newaddr) (((oaddr)^(newaddr)) >> 24)
49: /*
50: * INSTACK tells whether its argument is a stack address.
51: * INUDOT tells whether its argument is in the (extended) u. area.
52: * These are used for consistency checking and dont have to be exact.
53: *
54: * INKERNEL tells whether its argument is a kernel space address.
55: * KVTOPH trims a kernel virtal address back to its offset
56: * in the kernel address space.
57: */
58: #define INSTACK(x) (((x)&0xf0000000) == 0x70000000)
59: #define INUDOT(x) (((x)&0xf0000000) == 0x70000000)
60: #define INKERNEL(x) (((x)&0xf0000000) == 0x80000000)
61:
62: #define KVTOPH(x) ((x)&~ 0x80000000)
63: #define KERNOFF 0x80000000
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.