xref: /csrg-svn/sys/tahoe/include/kdbparam.h (revision 30114)
1 /*	kdbparam.h	7.1	86/11/20	*/
2 
3 #include <sys/vm.h>
4 
5 #define DBNAME "kdb\n"
6 #define LPRMODE "%R"
7 #define OFFMODE "+%R"
8 
9 #define	MAXINT	0x7fffffff
10 #define	MAXSTOR (KERNBASE - ctob(UPAGES))
11 
12 #define BPT	0x30
13 #define KCALL	0xcf
14 #define CASEL	0xfc
15 #define TBIT	0x10
16 
17 #define	SETBP(ins)	((BPT<<24) | ((ins) & 0xffffff))
18 
19 #define ALIGN	-4
20 
21 #define leng(a)		((long)((unsigned)(a)))
22 #define shorten(a)	(((a) >> 16) & 0xffff)
23 #define	itol(a,b)	(((a) << 16) | ((b) & 0xffff))
24 #define	byte(a)		(((a) >> 24) & 0xff)
25 
26 /*
27  * INSTACK tells whether its argument is a stack address.
28  * INUDOT tells whether its argument is in the (extended) u. area.
29  * These are used for consistency checking and dont have to be exact.
30  *
31  * INKERNEL tells whether its argument is a kernel space address.
32  * KVTOPH trims a kernel virtal address back to its offset
33  * in the kernel address space.
34  */
35 #define	INSTACK(x)	(((int)(x)&0xf0000000) == 0xb0000000)
36 #define	INUDOT(x)	(((int)(x)&0xf0000000) == 0xb0000000)
37 #define	INKERNEL(x)	(((int)(x)&0xf0000000) == 0xc0000000)
38 
39 #define	KERNBASE	0xc0000000
40 #define	KERNOFF		(KERNBASE + 0x800)	/* start of kernel's text */
41 #define	KVTOPH(x)	((x)&~ 0xc0000000)
42