Rev 6082 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6082 | Rev 6102 | ||
---|---|---|---|
1 | #ifndef __DDK_H__ |
1 | #ifndef __DDK_H__ |
2 | #define __DDK_H__ |
2 | #define __DDK_H__ |
3 | 3 | ||
4 | #include |
4 | #include |
5 | #include |
5 | #include |
6 | #include |
6 | #include |
7 | #include |
7 | #include |
8 | #include |
8 | #include |
9 | #include |
9 | |
10 | 10 | #define OS_BASE 0x80000000 |
|
11 | - | ||
12 | #define OS_BASE 0x80000000 |
- | |
13 | 11 | ||
14 | #define PG_SW 0x003 |
12 | #define PG_SW 0x003 |
15 | #define PG_UW 0x007 |
13 | #define PG_UW 0x007 |
16 | #define PG_WRITEC 0x008 |
14 | #define PG_WRITEC 0x008 |
17 | #define PG_NOCACHE 0x018 |
15 | #define PG_NOCACHE 0x018 |
18 | #define PG_SHARED 0x200 |
16 | #define PG_SHARED 0x200 |
19 | 17 | ||
20 | #define MANUAL_DESTROY 0x80000000 |
18 | #define MANUAL_DESTROY 0x80000000 |
21 | 19 | ||
22 | #define ENTER() dbgprintf("enter %s\n",__FUNCTION__) |
20 | #define ENTER() dbgprintf("enter %s\n",__FUNCTION__) |
23 | #define LEAVE() dbgprintf("leave %s\n",__FUNCTION__) |
21 | #define LEAVE() dbgprintf("leave %s\n",__FUNCTION__) |
24 | #define FAIL() dbgprintf("fail %s\n",__FUNCTION__) |
22 | #define FAIL() dbgprintf("fail %s\n",__FUNCTION__) |
25 | 23 | #define LINE() dbgprintf("%s line %d\n", __FUNCTION__,__LINE__) |
|
26 | typedef struct |
24 | |
27 | { |
- | |
28 | u32 code; |
- | |
29 | u32 data[5]; |
- | |
30 | }kevent_t; |
- | |
31 | - | ||
32 | typedef union |
- | |
33 | { |
- | |
34 | struct |
- | |
35 | { |
- | |
36 | u32 handle; |
- | |
37 | u32 euid; |
- | |
38 | }; |
25 | typedef struct |
39 | u64 raw; |
- | |
40 | }evhandle_t; |
- | |
41 | - | ||
42 | typedef struct |
- | |
43 | { |
26 | { |
44 | u32 handle; |
27 | u32 handle; |
45 | u32 io_code; |
28 | u32 io_code; |
46 | void *input; |
29 | void *input; |
47 | int inp_size; |
30 | int inp_size; |
48 | void *output; |
31 | void *output; |
49 | int out_size; |
32 | int out_size; |
50 | }ioctl_t; |
33 | }ioctl_t; |
51 | 34 | ||
52 | typedef int ( __stdcall *srv_proc_t)(ioctl_t *); |
35 | typedef int ( __stdcall *srv_proc_t)(ioctl_t *); |
53 | 36 | ||
54 | #define ERR_OK 0 |
37 | #define ERR_OK 0 |
55 | #define ERR_PARAM -1 |
38 | #define ERR_PARAM -1 |
56 | 39 | ||
57 | 40 | ||
58 | struct ddk_params; |
41 | struct ddk_params; |
59 | 42 | ||
60 | int ddk_init(struct ddk_params *params); |
43 | int ddk_init(struct ddk_params *params); |
61 | 44 | ||
62 | u32 drvEntry(int, char *)__asm__("_drvEntry"); |
45 | u32 drvEntry(int, char *)__asm__("_drvEntry"); |
63 | 46 | ||
64 | 47 | ||
65 | #endif /* DDK_H */ |
48 | #endif /* DDK_H */ |