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