ReactOS  0.4.14-dev-833-g5f692ed
vddsvc.h
Go to the documentation of this file.
1 /*
2  * vddsvc.h
3  *
4  * Windows NT Device Driver Kit
5  *
6  * This file is part of the ReactOS DDK package.
7  *
8  * Contributors:
9  * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
10  *
11  * THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  * This source code is offered for use in the public domain. You may
14  * use, modify or distribute it freely.
15  *
16  * This code is distributed in the hope that it will be useful but
17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18  * DISCLAIMED. This includes but is not limited to warranties of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  */
22 
23 #pragma once
24 
25 #ifndef _NT_VDD
26 #include <nt_vdd.h>
27 #endif
28 
29 /*
30  * Interrupts services
31  */
32 #define ICA_MASTER 0
33 #define ICA_SLAVE 1
34 
35 VOID
36 WINAPI
38  _In_ INT ms,
39  _In_ BYTE line,
40  _In_ INT count);
41 
42 #define VDDSimulateInterrupt(ms, line, count) \
43  call_ica_hw_interrupt((ms), (line), (count)) // Windows specifies a count of 1 ...
44 
45 
46 /*
47  * Memory services
48  */
49 
50 #ifdef i386
51 
52 PBYTE
53 WINAPI
56  _In_ ULONG Size,
57  _In_ BOOLEAN ProtectedMode);
58 
59 #define Sim32GetVDMPointer(Address, Size, Mode) \
60  MGetVdmPointer((Address), (Size), (Mode))
61 
62 #define Sim32FlushVDMPointer(Address, Size, Buffer, Mode) TRUE
63 
64 #else
65 
66 PBYTE
67 WINAPI
70  _In_ ULONG Size,
71  _In_ BOOLEAN ProtectedMode);
72 
73 BOOLEAN
74 WINAPI
77  _In_ ULONG Size,
79  _In_ BOOLEAN ProtectedMode);
80 
81 #endif
82 
83 PBYTE
84 WINAPI
87  _In_ BOOLEAN ProtectedMode);
88 
89 /* This API appears to have never been implemented anywhere... */
90 #define Sim32FreeVDMPointer(Address, Size, Buffer, Mode) TRUE
91 
92 #define GetVDMAddress(usSeg, usOff) (((ULONG)(usSeg) << 4) + (ULONG)(usOff))
93 
94 #define GetVDMPointer(Address, Size, Mode) \
95  Sim32GetVDMPointer(Address, Size, Mode)
96 
97 #define FlushVDMPointer(Address, Size, Buffer, Mode) \
98  Sim32FlushVDMPointer(Address, Size, Buffer, Mode)
99 
100 #define FreeVDMPointer(Address, Size, Buffer, Mode) \
101  Sim32FreeVDMPointer(Address, Size, Buffer, Mode)
102 
103 
104 /*
105  * Registers manipulation
106  */
108 
109 #ifndef _M_MIPS
110 
119 
128 
137 
146 
147 
148 
153 
158 
163 
168 
173 
186 
203 
206 
209 
210 #else
211 
212 ULONG WINAPI c_getEAX(VOID);
213 VOID WINAPI c_setEAX(ULONG);
214 USHORT WINAPI c_getAX(VOID);
215 VOID WINAPI c_setAX(USHORT);
216 UCHAR WINAPI c_getAH(VOID);
217 VOID WINAPI c_setAH(UCHAR);
218 UCHAR WINAPI c_getAL(VOID);
219 VOID WINAPI c_setAL(UCHAR);
220 
221 ULONG WINAPI c_getEBX(VOID);
222 VOID WINAPI c_setEBX(ULONG);
223 USHORT WINAPI c_getBX(VOID);
224 VOID WINAPI c_setBX(USHORT);
225 UCHAR WINAPI c_getBH(VOID);
226 VOID WINAPI c_setBH(UCHAR);
227 UCHAR WINAPI c_getBL(VOID);
228 VOID WINAPI c_setBL(UCHAR);
229 
230 ULONG WINAPI c_getECX(VOID);
231 VOID WINAPI c_setECX(ULONG);
232 USHORT WINAPI c_getCX(VOID);
233 VOID WINAPI c_setCX(USHORT);
234 UCHAR WINAPI c_getCH(VOID);
235 VOID WINAPI c_setCH(UCHAR);
236 UCHAR WINAPI c_getCL(VOID);
237 VOID WINAPI c_setCL(UCHAR);
238 
239 ULONG WINAPI c_getEDX(VOID);
240 VOID WINAPI c_setEDX(ULONG);
241 USHORT WINAPI c_getDX(VOID);
242 VOID WINAPI c_setDX(USHORT);
243 UCHAR WINAPI c_getDH(VOID);
244 VOID WINAPI c_setDH(UCHAR);
245 UCHAR WINAPI c_getDL(VOID);
246 VOID WINAPI c_setDL(UCHAR);
247 
248 
249 
250 ULONG WINAPI c_getESP(VOID);
251 VOID WINAPI c_setESP(ULONG);
252 USHORT WINAPI c_getSP(VOID);
253 VOID WINAPI c_setSP(USHORT);
254 
255 ULONG WINAPI c_getEBP(VOID);
256 VOID WINAPI c_setEBP(ULONG);
257 USHORT WINAPI c_getBP(VOID);
258 VOID WINAPI c_setBP(USHORT);
259 
260 ULONG WINAPI c_getESI(VOID);
261 VOID WINAPI c_setESI(ULONG);
262 USHORT WINAPI c_getSI(VOID);
263 VOID WINAPI c_setSI(USHORT);
264 
265 ULONG WINAPI c_getEDI(VOID);
266 VOID WINAPI c_setEDI(ULONG);
267 USHORT WINAPI c_getDI(VOID);
268 VOID WINAPI c_setDI(USHORT);
269 
270 ULONG WINAPI c_getEIP(VOID);
271 VOID WINAPI c_setEIP(ULONG);
272 USHORT WINAPI c_getIP(VOID);
273 VOID WINAPI c_setIP(USHORT);
274 
275 USHORT WINAPI c_getCS(VOID);
276 VOID WINAPI c_setCS(USHORT);
277 USHORT WINAPI c_getSS(VOID);
278 VOID WINAPI c_setSS(USHORT);
279 USHORT WINAPI c_getDS(VOID);
280 VOID WINAPI c_setDS(USHORT);
281 USHORT WINAPI c_getES(VOID);
282 VOID WINAPI c_setES(USHORT);
283 USHORT WINAPI c_getFS(VOID);
284 VOID WINAPI c_setFS(USHORT);
285 USHORT WINAPI c_getGS(VOID);
286 VOID WINAPI c_setGS(USHORT);
287 
288 ULONG WINAPI c_getCF(VOID);
289 VOID WINAPI c_setCF(ULONG);
290 ULONG WINAPI c_getPF(VOID);
291 VOID WINAPI c_setPF(ULONG);
292 ULONG WINAPI c_getAF(VOID);
293 VOID WINAPI c_setAF(ULONG);
294 ULONG WINAPI c_getZF(VOID);
295 VOID WINAPI c_setZF(ULONG);
296 ULONG WINAPI c_getSF(VOID);
297 VOID WINAPI c_setSF(ULONG);
298 ULONG WINAPI c_getIF(VOID);
299 VOID WINAPI c_setIF(ULONG);
300 ULONG WINAPI c_getDF(VOID);
301 VOID WINAPI c_setDF(ULONG);
302 ULONG WINAPI c_getOF(VOID);
303 VOID WINAPI c_setOF(ULONG);
304 
305 USHORT WINAPI c_getMSW(VOID);
306 VOID WINAPI c_setMSW(USHORT);
307 
308 #endif
309 
310 /* EOF */
VOID WINAPI setEBP(ULONG)
Definition: registers.c:367
VOID WINAPI setIP(USHORT)
Definition: registers.c:471
ULONG WINAPI getEIP(VOID)
Definition: registers.c:450
USHORT WINAPI getBX(VOID)
Definition: registers.c:170
VOID WINAPI setBL(UCHAR)
Definition: registers.c:205
UCHAR WINAPI getCL(VOID)
Definition: registers.c:256
VOID WINAPI setEAX(ULONG)
Definition: registers.c:107
USHORT WINAPI getSI(VOID)
Definition: registers.c:404
VOID WINAPI setECX(ULONG)
Definition: registers.c:221
USHORT WINAPI getCX(VOID)
Definition: registers.c:228
VOID WINAPI setCH(UCHAR)
Definition: registers.c:249
VOID WINAPI setAH(UCHAR)
Definition: registers.c:135
GLuint GLuint GLsizei count
Definition: gl.h:1545
ULONG WINAPI getEDX(VOID)
Definition: registers.c:272
VOID WINAPI setAX(USHORT)
Definition: registers.c:121
VOID WINAPI setDS(USHORT)
Definition: registers.c:515
VOID WINAPI setAL(UCHAR)
Definition: registers.c:149
USHORT WINAPI getSS(VOID)
Definition: registers.c:494
UCHAR WINAPI getAH(VOID)
Definition: registers.c:128
ULONG WINAPI getZF(VOID)
Definition: registers.c:608
UCHAR WINAPI getAL(VOID)
Definition: registers.c:142
VOID WINAPI setPF(ULONG)
Definition: registers.c:587
UCHAR WINAPI getDH(VOID)
Definition: registers.c:300
ULONG WINAPI getEBX(VOID)
Definition: registers.c:156
int32_t INT
Definition: typedefs.h:56
UCHAR WINAPI getDL(VOID)
Definition: registers.c:314
ULONG WINAPI getSF(VOID)
Definition: registers.c:622
VOID WINAPI call_ica_hw_interrupt(_In_ INT ms, _In_ BYTE line, _In_ INT count)
ULONG WINAPI getAF(VOID)
Definition: registers.c:594
VOID WINAPI setES(USHORT)
Definition: registers.c:529
VOID WINAPI setSP(USHORT)
Definition: registers.c:351
ULONG WINAPI getEFLAGS(VOID)
Definition: registers.c:680
VOID WINAPI setSS(USHORT)
Definition: registers.c:501
VOID WINAPI setCF(ULONG)
Definition: registers.c:573
VOID WINAPI setSI(USHORT)
Definition: registers.c:411
ULONG WINAPI getPF(VOID)
Definition: registers.c:580
VOID WINAPI setEBX(ULONG)
Definition: registers.c:163
unsigned char BOOLEAN
static WCHAR Address[46]
Definition: ping.c:68
Definition: parser.c:48
Definition: bufpool.h:45
ULONG WINAPI getEDI(VOID)
Definition: registers.c:420
USHORT WINAPI getGS(VOID)
Definition: registers.c:550
USHORT WINAPI getES(VOID)
Definition: registers.c:522
PVOID WINAPI getIntelRegistersPointer(VOID)
Definition: registers.c:29
USHORT WINAPI getIP(VOID)
Definition: registers.c:464
#define WINAPI
Definition: msvc.h:6
VOID WINAPI setSF(ULONG)
Definition: registers.c:629
UCHAR WINAPI getBH(VOID)
Definition: registers.c:184
PBYTE WINAPI MGetVdmPointer(IN ULONG Address, IN ULONG Size, IN BOOLEAN ProtectedMode)
Definition: memory.c:413
VOID WINAPI setBP(USHORT)
Definition: registers.c:381
VOID WINAPI setGS(USHORT)
Definition: registers.c:557
ULONG WINAPI getEAX(VOID)
Definition: registers.c:100
VOID WINAPI setDX(USHORT)
Definition: registers.c:293
unsigned char UCHAR
Definition: xmlstorage.h:181
VOID WINAPI setEDX(ULONG)
Definition: registers.c:279
USHORT WINAPI getDX(VOID)
Definition: registers.c:286
USHORT WINAPI getAX(VOID)
Definition: registers.c:114
unsigned char BYTE
Definition: mem.h:68
VOID WINAPI setEFLAGS(ULONG)
Definition: registers.c:687
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
VOID WINAPI setBX(USHORT)
Definition: registers.c:177
VOID WINAPI setBH(UCHAR)
Definition: registers.c:191
ULONG WINAPI getESI(VOID)
Definition: registers.c:390
VOID WINAPI setOF(ULONG)
Definition: registers.c:671
VOID WINAPI setFS(USHORT)
Definition: registers.c:543
ULONG WINAPI getIF(VOID)
Definition: registers.c:636
VOID WINAPI setCS(USHORT)
Definition: registers.c:487
ULONG WINAPI getDF(VOID)
Definition: registers.c:650
#define _In_
Definition: no_sal2.h:204
VOID WINAPI setDF(ULONG)
Definition: registers.c:657
VOID WINAPI setDI(USHORT)
Definition: registers.c:441
VOID WINAPI setEIP(ULONG)
Definition: registers.c:457
VOID WINAPI setZF(ULONG)
Definition: registers.c:615
PBYTE WINAPI Sim32GetVDMPointer(_In_ ULONG Address, _In_ ULONG Size, _In_ BOOLEAN ProtectedMode)
unsigned short USHORT
Definition: pedump.c:61
UCHAR WINAPI getBL(VOID)
Definition: registers.c:198
USHORT WINAPI getDI(VOID)
Definition: registers.c:434
VOID WINAPI setDL(UCHAR)
Definition: registers.c:321
VOID WINAPI setEDI(ULONG)
Definition: registers.c:427
ULONG WINAPI getEBP(VOID)
Definition: registers.c:360
VOID WINAPI setIF(ULONG)
Definition: registers.c:643
ULONG WINAPI getESP(VOID)
Definition: registers.c:330
VOID WINAPI setCX(USHORT)
Definition: registers.c:235
UCHAR WINAPI getCH(VOID)
Definition: registers.c:242
VOID WINAPI setESP(ULONG)
Definition: registers.c:337
USHORT WINAPI getDS(VOID)
Definition: registers.c:508
USHORT WINAPI getMSW(VOID)
Definition: registers.c:696
unsigned int ULONG
Definition: retypes.h:1
VOID WINAPI setESI(ULONG)
Definition: registers.c:397
ULONG WINAPI getECX(VOID)
Definition: registers.c:214
ULONG WINAPI getOF(VOID)
Definition: registers.c:664
USHORT WINAPI getBP(VOID)
Definition: registers.c:374
USHORT WINAPI getSP(VOID)
Definition: registers.c:344
PBYTE WINAPI Sim32pGetVDMPointer(_In_ ULONG Address, _In_ BOOLEAN ProtectedMode)
VOID WINAPI setCL(UCHAR)
Definition: registers.c:263
USHORT WINAPI getCS(VOID)
Definition: registers.c:480
VOID WINAPI setAF(ULONG)
Definition: registers.c:601
BOOLEAN WINAPI Sim32FlushVDMPointer(_In_ ULONG Address, _In_ ULONG Size, _In_ PBYTE Buffer, _In_ BOOLEAN ProtectedMode)
BYTE * PBYTE
Definition: pedump.c:66
USHORT WINAPI getFS(VOID)
Definition: registers.c:536
ULONG WINAPI getCF(VOID)
Definition: registers.c:566
VOID WINAPI setMSW(USHORT)
Definition: registers.c:703
VOID WINAPI setDH(UCHAR)
Definition: registers.c:307