|
|
1.1 root 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.8 (Berkeley) 5/3/90
7: */
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:
16: #define ENTRYMASK 1 /* check for entry masks */
17: #define ishiddenreg(p) ((p) <= &kdbreglist[8])
18:
19: #define BPT 0x30
20: #define KCALL 0xcf
21: #define CASEL 0xfc
22: #define TBIT 0x10
23:
24: #define KDB_IPL 0xf /* highest priority software interrupt */
25: #define setsoftkdb() mtpr(SIRR, KDB_IPL)
26:
27: #define clrsstep() (kdbpcb.pcb_psl &= ~TBIT)
28: #define setsstep() (kdbpcb.pcb_psl |= TBIT)
29:
30: #define SETBP(ins) ((BPT<<24) | ((ins) & 0xffffff))
31:
32: #define getprevpc(fp) kdbget((off_t)(fp)-8, DSP) /* pc of caller */
33: #define getprevframe(fp) (kdbget((off_t)(fp), DSP)&~3) /* fp of caller */
34: #define getnargs(fp) (((kdbget((off_t)(fp)-4, DSP)&0xffff)-4)/4)
35: #define nextarg(ap) ((ap) + 4) /* next argument in list */
36: #define NOFRAME 0 /* fp at top of call stack */
37:
38: #define issignalpc(pc) ((unsigned)MAXSTOR < (pc) && (pc) < (unsigned)KERNBASE)
39: #define getsignalpc(fp) kdbget((off_t)(fp)+44, DSP)/* pc of caller before signal */
40:
41: #define leng(a) ((long)((unsigned)(a)))
42: #define shorten(a) (((a) >> 16) & 0xffff)
43: #define itol(a,b) ((long)(((a) << 16) | ((b) & 0xffff)))
44: #define byte(a) (((a) >> 24) & 0xff)
45: #define btol(a) ((long)((a) << 24))
46:
47: /* check for address wrap around */
48: #define addrwrap(oaddr,newaddr) \
49: (((oaddr)^(newaddr)) >> 24)
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:
63: #define KERNOFF (KERNBASE + 0x800) /* start of kernel's text */
64: /* #define KVTOPH(x) ((x)&~ 0xc0000000) sometimes */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.