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