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