ReactOS 0.4.15-dev-7942-gd23573b
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
35VOID
38 _In_ INT ms,
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
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
71 _In_ BOOLEAN ProtectedMode);
72
79 _In_ BOOLEAN ProtectedMode);
80
81#endif
82
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
212ULONG WINAPI c_getEAX(VOID);
213VOID WINAPI c_setEAX(ULONG);
214USHORT WINAPI c_getAX(VOID);
215VOID WINAPI c_setAX(USHORT);
216UCHAR WINAPI c_getAH(VOID);
217VOID WINAPI c_setAH(UCHAR);
218UCHAR WINAPI c_getAL(VOID);
219VOID WINAPI c_setAL(UCHAR);
220
221ULONG WINAPI c_getEBX(VOID);
222VOID WINAPI c_setEBX(ULONG);
223USHORT WINAPI c_getBX(VOID);
224VOID WINAPI c_setBX(USHORT);
225UCHAR WINAPI c_getBH(VOID);
226VOID WINAPI c_setBH(UCHAR);
227UCHAR WINAPI c_getBL(VOID);
228VOID WINAPI c_setBL(UCHAR);
229
230ULONG WINAPI c_getECX(VOID);
231VOID WINAPI c_setECX(ULONG);
232USHORT WINAPI c_getCX(VOID);
233VOID WINAPI c_setCX(USHORT);
234UCHAR WINAPI c_getCH(VOID);
235VOID WINAPI c_setCH(UCHAR);
236UCHAR WINAPI c_getCL(VOID);
237VOID WINAPI c_setCL(UCHAR);
238
239ULONG WINAPI c_getEDX(VOID);
240VOID WINAPI c_setEDX(ULONG);
241USHORT WINAPI c_getDX(VOID);
242VOID WINAPI c_setDX(USHORT);
243UCHAR WINAPI c_getDH(VOID);
244VOID WINAPI c_setDH(UCHAR);
245UCHAR WINAPI c_getDL(VOID);
246VOID WINAPI c_setDL(UCHAR);
247
248
249
250ULONG WINAPI c_getESP(VOID);
251VOID WINAPI c_setESP(ULONG);
252USHORT WINAPI c_getSP(VOID);
253VOID WINAPI c_setSP(USHORT);
254
255ULONG WINAPI c_getEBP(VOID);
256VOID WINAPI c_setEBP(ULONG);
257USHORT WINAPI c_getBP(VOID);
258VOID WINAPI c_setBP(USHORT);
259
260ULONG WINAPI c_getESI(VOID);
261VOID WINAPI c_setESI(ULONG);
262USHORT WINAPI c_getSI(VOID);
263VOID WINAPI c_setSI(USHORT);
264
265ULONG WINAPI c_getEDI(VOID);
266VOID WINAPI c_setEDI(ULONG);
267USHORT WINAPI c_getDI(VOID);
268VOID WINAPI c_setDI(USHORT);
269
270ULONG WINAPI c_getEIP(VOID);
271VOID WINAPI c_setEIP(ULONG);
272USHORT WINAPI c_getIP(VOID);
273VOID WINAPI c_setIP(USHORT);
274
275USHORT WINAPI c_getCS(VOID);
276VOID WINAPI c_setCS(USHORT);
277USHORT WINAPI c_getSS(VOID);
278VOID WINAPI c_setSS(USHORT);
279USHORT WINAPI c_getDS(VOID);
280VOID WINAPI c_setDS(USHORT);
281USHORT WINAPI c_getES(VOID);
282VOID WINAPI c_setES(USHORT);
283USHORT WINAPI c_getFS(VOID);
284VOID WINAPI c_setFS(USHORT);
285USHORT WINAPI c_getGS(VOID);
286VOID WINAPI c_setGS(USHORT);
287
288ULONG WINAPI c_getCF(VOID);
289VOID WINAPI c_setCF(ULONG);
290ULONG WINAPI c_getPF(VOID);
291VOID WINAPI c_setPF(ULONG);
292ULONG WINAPI c_getAF(VOID);
293VOID WINAPI c_setAF(ULONG);
294ULONG WINAPI c_getZF(VOID);
295VOID WINAPI c_setZF(ULONG);
296ULONG WINAPI c_getSF(VOID);
297VOID WINAPI c_setSF(ULONG);
298ULONG WINAPI c_getIF(VOID);
299VOID WINAPI c_setIF(ULONG);
300ULONG WINAPI c_getDF(VOID);
301VOID WINAPI c_setDF(ULONG);
302ULONG WINAPI c_getOF(VOID);
303VOID WINAPI c_setOF(ULONG);
304
305USHORT WINAPI c_getMSW(VOID);
306VOID WINAPI c_setMSW(USHORT);
307
308#endif
309
310/* EOF */
unsigned char BOOLEAN
Definition: bufpool.h:45
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define _In_
Definition: ms_sal.h:308
BYTE * PBYTE
Definition: pedump.c:66
unsigned short USHORT
Definition: pedump.c:61
static WCHAR Address[46]
Definition: ping.c:68
Definition: parser.c:49
PBYTE WINAPI MGetVdmPointer(IN ULONG Address, IN ULONG Size, IN BOOLEAN ProtectedMode)
Definition: memory.c:416
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
ULONG WINAPI getEBP(VOID)
Definition: registers.c:360
USHORT WINAPI getMSW(VOID)
Definition: registers.c:696
ULONG WINAPI getSF(VOID)
Definition: registers.c:622
VOID WINAPI setBX(USHORT)
Definition: registers.c:177
BOOLEAN WINAPI Sim32FlushVDMPointer(_In_ ULONG Address, _In_ ULONG Size, _In_ PBYTE Buffer, _In_ BOOLEAN ProtectedMode)
VOID WINAPI call_ica_hw_interrupt(_In_ INT ms, _In_ BYTE line, _In_ INT count)
USHORT WINAPI getIP(VOID)
Definition: registers.c:464
VOID WINAPI setEIP(ULONG)
Definition: registers.c:457
USHORT WINAPI getGS(VOID)
Definition: registers.c:550
VOID WINAPI setDF(ULONG)
Definition: registers.c:657
UCHAR WINAPI getBH(VOID)
Definition: registers.c:184
VOID WINAPI setOF(ULONG)
Definition: registers.c:671
ULONG WINAPI getEBX(VOID)
Definition: registers.c:156
VOID WINAPI setCX(USHORT)
Definition: registers.c:235
VOID WINAPI setCH(UCHAR)
Definition: registers.c:249
ULONG WINAPI getZF(VOID)
Definition: registers.c:608
VOID WINAPI setDX(USHORT)
Definition: registers.c:293
ULONG WINAPI getPF(VOID)
Definition: registers.c:580
ULONG WINAPI getCF(VOID)
Definition: registers.c:566
USHORT WINAPI getBX(VOID)
Definition: registers.c:170
VOID WINAPI setAL(UCHAR)
Definition: registers.c:149
ULONG WINAPI getAF(VOID)
Definition: registers.c:594
UCHAR WINAPI getCH(VOID)
Definition: registers.c:242
VOID WINAPI setDL(UCHAR)
Definition: registers.c:321
VOID WINAPI setPF(ULONG)
Definition: registers.c:587
VOID WINAPI setMSW(USHORT)
Definition: registers.c:703
USHORT WINAPI getDS(VOID)
Definition: registers.c:508
UCHAR WINAPI getAL(VOID)
Definition: registers.c:142
VOID WINAPI setCF(ULONG)
Definition: registers.c:573
VOID WINAPI setEDI(ULONG)
Definition: registers.c:427
VOID WINAPI setAH(UCHAR)
Definition: registers.c:135
VOID WINAPI setSF(ULONG)
Definition: registers.c:629
USHORT WINAPI getCX(VOID)
Definition: registers.c:228
PVOID WINAPI getIntelRegistersPointer(VOID)
Definition: registers.c:29
VOID WINAPI setECX(ULONG)
Definition: registers.c:221
USHORT WINAPI getSI(VOID)
Definition: registers.c:404
USHORT WINAPI getDX(VOID)
Definition: registers.c:286
VOID WINAPI setFS(USHORT)
Definition: registers.c:543
VOID WINAPI setIF(ULONG)
Definition: registers.c:643
ULONG WINAPI getOF(VOID)
Definition: registers.c:664
VOID WINAPI setSP(USHORT)
Definition: registers.c:351
VOID WINAPI setBL(UCHAR)
Definition: registers.c:205
VOID WINAPI setDS(USHORT)
Definition: registers.c:515
UCHAR WINAPI getCL(VOID)
Definition: registers.c:256
VOID WINAPI setEFLAGS(ULONG)
Definition: registers.c:687
USHORT WINAPI getAX(VOID)
Definition: registers.c:114
VOID WINAPI setCS(USHORT)
Definition: registers.c:487
VOID WINAPI setBH(UCHAR)
Definition: registers.c:191
ULONG WINAPI getEDX(VOID)
Definition: registers.c:272
USHORT WINAPI getES(VOID)
Definition: registers.c:522
VOID WINAPI setESP(ULONG)
Definition: registers.c:337
ULONG WINAPI getECX(VOID)
Definition: registers.c:214
USHORT WINAPI getBP(VOID)
Definition: registers.c:374
VOID WINAPI setDH(UCHAR)
Definition: registers.c:307
USHORT WINAPI getDI(VOID)
Definition: registers.c:434
USHORT WINAPI getCS(VOID)
Definition: registers.c:480
USHORT WINAPI getSP(VOID)
Definition: registers.c:344
ULONG WINAPI getESI(VOID)
Definition: registers.c:390
VOID WINAPI setBP(USHORT)
Definition: registers.c:381
VOID WINAPI setSS(USHORT)
Definition: registers.c:501
VOID WINAPI setGS(USHORT)
Definition: registers.c:557
PBYTE WINAPI Sim32pGetVDMPointer(_In_ ULONG Address, _In_ BOOLEAN ProtectedMode)
PBYTE WINAPI Sim32GetVDMPointer(_In_ ULONG Address, _In_ ULONG Size, _In_ BOOLEAN ProtectedMode)
VOID WINAPI setEBX(ULONG)
Definition: registers.c:163
ULONG WINAPI getDF(VOID)
Definition: registers.c:650
UCHAR WINAPI getDL(VOID)
Definition: registers.c:314
VOID WINAPI setEBP(ULONG)
Definition: registers.c:367
UCHAR WINAPI getBL(VOID)
Definition: registers.c:198
VOID WINAPI setAX(USHORT)
Definition: registers.c:121
VOID WINAPI setZF(ULONG)
Definition: registers.c:615
VOID WINAPI setAF(ULONG)
Definition: registers.c:601
VOID WINAPI setESI(ULONG)
Definition: registers.c:397
VOID WINAPI setES(USHORT)
Definition: registers.c:529
ULONG WINAPI getEAX(VOID)
Definition: registers.c:100
ULONG WINAPI getEFLAGS(VOID)
Definition: registers.c:680
ULONG WINAPI getEDI(VOID)
Definition: registers.c:420
ULONG WINAPI getEIP(VOID)
Definition: registers.c:450
VOID WINAPI setCL(UCHAR)
Definition: registers.c:263
ULONG WINAPI getESP(VOID)
Definition: registers.c:330
UCHAR WINAPI getAH(VOID)
Definition: registers.c:128
VOID WINAPI setIP(USHORT)
Definition: registers.c:471
VOID WINAPI setSI(USHORT)
Definition: registers.c:411
VOID WINAPI setEDX(ULONG)
Definition: registers.c:279
USHORT WINAPI getFS(VOID)
Definition: registers.c:536
VOID WINAPI setDI(USHORT)
Definition: registers.c:441
VOID WINAPI setEAX(ULONG)
Definition: registers.c:107
USHORT WINAPI getSS(VOID)
Definition: registers.c:494
ULONG WINAPI getIF(VOID)
Definition: registers.c:636
UCHAR WINAPI getDH(VOID)
Definition: registers.c:300
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
#define WINAPI
Definition: msvc.h:6
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned char BYTE
Definition: xxhash.c:193