make vfs & filesystems use failable copying
[minix3.git] / kernel / arch / i386 / debugreg.h
blob56b8a48c3ef35c75bbccbddc079403e13724d6b7
1 #ifndef __DEBUGREG_H__
2 #define __DEBUGREG_H__
4 /* DR6: status flags */
5 #define DR6_B(bp) (1 << (bp)) /* breakpoint was triggered */
6 #define DR6_BD (1 << 13) /* debug register access detected */
7 #define DR6_BS (1 << 14) /* single step */
8 #define DR6_BT (1 << 15) /* task switch */
10 /* DR7: control flags */
11 #define DR7_L(bp) (1 << (2*(bp))) /* breakpoint armed locally */
12 #define DR7_G(bp) (1 << (1+2*(bp))) /* breakpoint armed globally */
13 #define DR7_LE (1 << 8) /* exact local breakpoints */
14 #define DR7_GE (1 << 9) /* exact global breakpoints */
15 #define DR7_GD (1 << 13) /* detect debug reg movs */
17 #define DR7_RW_MASK(bp) (3 << (16+4*(bp)))
18 #define DR7_RW_EXEC(bp) (0 << (16+4*(bp))) /* execute */
19 #define DR7_RW_WRITE(bp) (1 << (16+4*(bp))) /* write */
20 #define DR7_RW_IO(bp) (2 << (16+4*(bp))) /* IO */
21 #define DR7_RW_RW(bp) (3 << (16+4*(bp))) /* read or write */
23 #define DR7_LN_MASK(bp) (3 << (18+4*(bp)))
24 #define DR7_LN_1(bp) (0 << (18+4*(bp))) /* 1 byte */
25 #define DR7_LN_2(bp) (1 << (18+4*(bp))) /* 2 bytes */
26 #define DR7_LN_8(bp) (2 << (18+4*(bp))) /* 8 bytes */
27 #define DR7_LN_4(bp) (3 << (18+4*(bp))) /* 4 bytes */
29 /* debugreg.S */
30 void ld_dr0(phys_bytes value);
31 void ld_dr1(phys_bytes value);
32 void ld_dr2(phys_bytes value);
33 void ld_dr3(phys_bytes value);
34 void ld_dr6(unsigned long value);
35 void ld_dr7(unsigned long value);
36 phys_bytes st_dr0(void);
37 phys_bytes st_dr1(void);
38 phys_bytes st_dr2(void);
39 phys_bytes st_dr3(void);
40 unsigned long st_dr6(void);
41 unsigned long st_dr7(void);
43 #endif /* __DEBUGREG_H__ */