1 | /* $Id: IEMAllDbg.cpp 100673 2023-07-21 07:50:33Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * IEM - Debug and Logging.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 |
|
---|
29 | /*********************************************************************************************************************************
|
---|
30 | * Header Files *
|
---|
31 | *********************************************************************************************************************************/
|
---|
32 | #define LOG_GROUP LOG_GROUP_IEM
|
---|
33 | #define VMCPU_INCL_CPUM_GST_CTX
|
---|
34 | #include <VBox/vmm/iem.h>
|
---|
35 | #include <VBox/vmm/cpum.h>
|
---|
36 | #include <VBox/vmm/pgm.h>
|
---|
37 | #include "IEMInternal.h"
|
---|
38 | #include <VBox/vmm/vmcc.h>
|
---|
39 | #include <VBox/log.h>
|
---|
40 | #include <iprt/errcore.h>
|
---|
41 |
|
---|
42 |
|
---|
43 | /*********************************************************************************************************************************
|
---|
44 | * Syscalls *
|
---|
45 | *********************************************************************************************************************************/
|
---|
46 |
|
---|
47 | #ifdef LOG_ENABLED
|
---|
48 |
|
---|
49 | # undef LOG_GROUP
|
---|
50 | # define LOG_GROUP LOG_GROUP_IEM_SYSCALL
|
---|
51 |
|
---|
52 |
|
---|
53 | static void iemLogSyscallWinVxDCall(PVMCPUCC pVCpu, uint8_t cbInstr)
|
---|
54 | {
|
---|
55 | /*
|
---|
56 | * Two double words follow the instruction:
|
---|
57 | * 1. Service number.
|
---|
58 | * 2. VxD identifier.
|
---|
59 | */
|
---|
60 | uint16_t auParams[2] = {0, 0};
|
---|
61 | RTGCPTR const GCPtrParams = pVCpu->cpum.GstCtx.cs.u64Base + pVCpu->cpum.GstCtx.rip + cbInstr;
|
---|
62 | int rc = PGMPhysSimpleReadGCPtr(pVCpu, auParams, GCPtrParams, sizeof(auParams));
|
---|
63 | if (RT_SUCCESS(rc))
|
---|
64 | {
|
---|
65 | const char *pszVxD = NULL;
|
---|
66 | const char *pszService = NULL;
|
---|
67 | uint16_t const idVxD = auParams[1];
|
---|
68 | uint16_t const idService = auParams[0];
|
---|
69 | switch (idVxD)
|
---|
70 | {
|
---|
71 | case 0x0001:
|
---|
72 | switch (idService)
|
---|
73 | {
|
---|
74 | case 0x0000: pszService = "get version"; break;
|
---|
75 | case 0x0001: pszService = "get current VM handle"; break;
|
---|
76 | case 0x0002: pszService = "test current VM handle"; break;
|
---|
77 | case 0x0003: pszService = "get system VM handle"; break;
|
---|
78 | case 0x0004: pszService = "test system VM handle"; break;
|
---|
79 | case 0x0005: pszService = "validate VM handle"; break;
|
---|
80 | case 0x0006: pszService = "get VMM reenter count"; break;
|
---|
81 | case 0x0007: pszService = "begin reentrant execution"; break;
|
---|
82 | case 0x0008: pszService = "end reentrant execution"; break;
|
---|
83 | case 0x0009: pszService = "install V86 breakpoint"; break;
|
---|
84 | case 0x000a: pszService = "remove V86 breakpoint"; break;
|
---|
85 | case 0x000b: pszService = "allocate V86 callback"; break;
|
---|
86 | case 0x000c: pszService = "allocation PM callback"; break;
|
---|
87 | case 0x000d: pszService = "call when VM returns"; break;
|
---|
88 | case 0x000e: pszService = "schedule global event"; break;
|
---|
89 | case 0x000f: pszService = "schedule VM event"; break;
|
---|
90 | case 0x0010: pszService = "call global event"; break;
|
---|
91 | case 0x0011: pszService = "call VM event"; break;
|
---|
92 | case 0x0012: pszService = "cancel global event"; break;
|
---|
93 | case 0x0013: pszService = "cancel VM event"; break;
|
---|
94 | case 0x0014: pszService = "call priority VM event"; break;
|
---|
95 | case 0x0015: pszService = "cancel priority VM event"; break;
|
---|
96 | case 0x0016: pszService = "get NMI handler address"; break;
|
---|
97 | case 0x0017: pszService = "set NMI handler address"; break;
|
---|
98 | case 0x0018: pszService = "hook NMI event"; break;
|
---|
99 | case 0x0019: pszService = "call when VM interrupts enabled"; break;
|
---|
100 | case 0x001a: pszService = "enable VM interrupts"; break;
|
---|
101 | case 0x001b: pszService = "disable VM interrupts"; break;
|
---|
102 | case 0x001c: pszService = "map flat"; break;
|
---|
103 | case 0x001d: pszService = "map linear to VM address"; break;
|
---|
104 | case 0x001e: pszService = "adjust execution priority"; break;
|
---|
105 | case 0x001f: pszService = "begin critical section"; break;
|
---|
106 | case 0x0020: pszService = "end critical section"; break;
|
---|
107 | case 0x0021: pszService = "end critical section and suspend"; break;
|
---|
108 | case 0x0022: pszService = "claim critical section"; break;
|
---|
109 | case 0x0023: pszService = "release critical section"; break;
|
---|
110 | case 0x0024: pszService = "call when not critical"; break;
|
---|
111 | case 0x0025: pszService = "create semaphore"; break;
|
---|
112 | case 0x0026: pszService = "destroy semaphore"; break;
|
---|
113 | case 0x0027: pszService = "wait on semaphore"; break;
|
---|
114 | case 0x0028: pszService = "signal semaphore"; break;
|
---|
115 | case 0x0029: pszService = "get critical section status"; break;
|
---|
116 | case 0x002a: pszService = "call when task switched"; break;
|
---|
117 | case 0x002b: pszService = "suspend VM"; break;
|
---|
118 | case 0x002c: pszService = "resume VM"; break;
|
---|
119 | case 0x002d: pszService = "no-fail resume VM"; break;
|
---|
120 | case 0x002e: pszService = "nuke VM"; break;
|
---|
121 | case 0x002f: pszService = "crash current VM"; break;
|
---|
122 | case 0x0030: pszService = "get execution focus"; break;
|
---|
123 | case 0x0031: pszService = "set execution focus"; break;
|
---|
124 | case 0x0032: pszService = "get time slice priority"; break;
|
---|
125 | case 0x0033: pszService = "set time slice priority"; break;
|
---|
126 | case 0x0034: pszService = "get time slice granularity"; break;
|
---|
127 | case 0x0035: pszService = "set time slice granularity"; break;
|
---|
128 | case 0x0036: pszService = "get time slice information"; break;
|
---|
129 | case 0x0037: pszService = "adjust execution time"; break;
|
---|
130 | case 0x0038: pszService = "release time slice"; break;
|
---|
131 | case 0x0039: pszService = "wake up VM"; break;
|
---|
132 | case 0x003a: pszService = "call when idle"; break;
|
---|
133 | case 0x003b: pszService = "get next VM handle"; break;
|
---|
134 | case 0x003c: pszService = "set global timeout"; break;
|
---|
135 | case 0x003d: pszService = "set VM timeout"; break;
|
---|
136 | case 0x003e: pszService = "cancel timeout"; break;
|
---|
137 | case 0x003f: pszService = "get system time"; break;
|
---|
138 | case 0x0040: pszService = "get VM execution time"; break;
|
---|
139 | case 0x0041: pszService = "hook V86 interrupt chain"; break;
|
---|
140 | case 0x0042: pszService = "get V86 interrupt vector"; break;
|
---|
141 | case 0x0043: pszService = "set V86 interrupt vector"; break;
|
---|
142 | case 0x0044: pszService = "get PM interrupt vector"; break;
|
---|
143 | case 0x0045: pszService = "set PM interrupt vector"; break;
|
---|
144 | case 0x0046: pszService = "simulate interrupt"; break;
|
---|
145 | case 0x0047: pszService = "simulate IRET"; break;
|
---|
146 | case 0x0048: pszService = "simulate far call"; break;
|
---|
147 | case 0x0049: pszService = "simulate far jump"; break;
|
---|
148 | case 0x004a: pszService = "simulate far RET"; break;
|
---|
149 | case 0x004b: pszService = "simulate far RET N"; break;
|
---|
150 | case 0x004c: pszService = "build interrupt stack frame"; break;
|
---|
151 | case 0x004d: pszService = "simulate push"; break;
|
---|
152 | case 0x004e: pszService = "simulate pop"; break;
|
---|
153 | case 0x004f: pszService = "HeapAllocate"; break;
|
---|
154 | case 0x0050: pszService = "HeapReAllocate"; break;
|
---|
155 | case 0x0051: pszService = "HeapFree"; break;
|
---|
156 | case 0x0052: pszService = "HeapGetSize"; break;
|
---|
157 | case 0x0053: pszService = "PageAllocate"; break;
|
---|
158 | case 0x0054: pszService = "PageReAllocate"; break;
|
---|
159 | case 0x0055: pszService = "PageFree"; break;
|
---|
160 | case 0x0056: pszService = "PageLock"; break;
|
---|
161 | case 0x0057: pszService = "PageUnLock"; break;
|
---|
162 | case 0x0058: pszService = "PageGetSizeAddr"; break;
|
---|
163 | case 0x0059: pszService = "PageGetAllocInfo"; break;
|
---|
164 | case 0x005a: pszService = "GetFreePageCount"; break;
|
---|
165 | case 0x005b: pszService = "GetSysPageCount"; break;
|
---|
166 | case 0x005c: pszService = "GetVMPgCount"; break;
|
---|
167 | case 0x005d: pszService = "MapIntoV86"; break;
|
---|
168 | case 0x005e: pszService = "PhysIntoV86"; break;
|
---|
169 | case 0x005f: pszService = "TestGlobalV86Mem"; break;
|
---|
170 | case 0x0060: pszService = "ModifyPageBits"; break;
|
---|
171 | case 0x0061: pszService = "copy page table"; break;
|
---|
172 | case 0x0062: pszService = "map linear into V86"; break;
|
---|
173 | case 0x0063: pszService = "linear page lock"; break;
|
---|
174 | case 0x0064: pszService = "linear page unlock"; break;
|
---|
175 | case 0x0065: pszService = "SetResetV86Pageabl"; break;
|
---|
176 | case 0x0066: pszService = "GetV86PageableArray"; break;
|
---|
177 | case 0x0067: pszService = "PageCheckLinRange"; break;
|
---|
178 | case 0x0068: pszService = "page out dirty pages"; break;
|
---|
179 | case 0x0069: pszService = "discard pages"; break;
|
---|
180 | case 0x006a: pszService = "GetNulPageHandle"; break;
|
---|
181 | case 0x006b: pszService = "get first V86 page"; break;
|
---|
182 | case 0x006c: pszService = "map physical address to linear address"; break;
|
---|
183 | case 0x006d: pszService = "GetAppFlatDSAlias"; break;
|
---|
184 | case 0x006e: pszService = "SelectorMapFlat"; break;
|
---|
185 | case 0x006f: pszService = "GetDemandPageInfo"; break;
|
---|
186 | case 0x0070: pszService = "GetSetPageOutCount"; break;
|
---|
187 | case 0x0071: pszService = "hook V86 page"; break;
|
---|
188 | case 0x0072: pszService = "assign device V86 pages"; break;
|
---|
189 | case 0x0073: pszService = "deassign device V86 pages"; break;
|
---|
190 | case 0x0074: pszService = "get array of V86 pages for device"; break;
|
---|
191 | case 0x0075: pszService = "SetNULPageAddr"; break;
|
---|
192 | case 0x0076: pszService = "allocate GDT selector"; break;
|
---|
193 | case 0x0077: pszService = "free GDT selector"; break;
|
---|
194 | case 0x0078: pszService = "allocate LDT selector"; break;
|
---|
195 | case 0x0079: pszService = "free LDT selector"; break;
|
---|
196 | case 0x007a: pszService = "BuildDescriptorDWORDs"; break;
|
---|
197 | case 0x007b: pszService = "get descriptor"; break;
|
---|
198 | case 0x007c: pszService = "set descriptor"; break;
|
---|
199 | case 0x007d: pszService = "toggle HMA"; break;
|
---|
200 | case 0x007e: pszService = "get fault hook addresses"; break;
|
---|
201 | case 0x007f: pszService = "hook V86 fault"; break;
|
---|
202 | case 0x0080: pszService = "hook PM fault"; break;
|
---|
203 | case 0x0081: pszService = "hook VMM fault"; break;
|
---|
204 | case 0x0082: pszService = "begin nested V86 execution"; break;
|
---|
205 | case 0x0083: pszService = "begin nested execution"; break;
|
---|
206 | case 0x0084: pszService = "execute V86-mode interrupt"; break;
|
---|
207 | case 0x0085: pszService = "resume execution"; break;
|
---|
208 | case 0x0086: pszService = "end nested execution"; break;
|
---|
209 | case 0x0087: pszService = "allocate PM application callback area"; break;
|
---|
210 | case 0x0088: pszService = "get current PM application callback area"; break;
|
---|
211 | case 0x0089: pszService = "set V86 execution mode"; break;
|
---|
212 | case 0x008a: pszService = "set PM execution mode"; break;
|
---|
213 | case 0x008b: pszService = "begin using locked PM stack"; break;
|
---|
214 | case 0x008c: pszService = "end using locked PM stack"; break;
|
---|
215 | case 0x008d: pszService = "save client state"; break;
|
---|
216 | case 0x008e: pszService = "restore client state"; break;
|
---|
217 | case 0x008f: pszService = "execute VxD interrupt"; break;
|
---|
218 | case 0x0090: pszService = "hook device service"; break;
|
---|
219 | case 0x0091: pszService = "hook device V86 API"; break;
|
---|
220 | case 0x0092: pszService = "hook device PM API"; break;
|
---|
221 | case 0x0093: pszService = "system control (see also #02657)"; break;
|
---|
222 | case 0x0094: pszService = "simulate I/O"; break;
|
---|
223 | case 0x0095: pszService = "install multiple I/O handlers"; break;
|
---|
224 | case 0x0096: pszService = "install I/O handler"; break;
|
---|
225 | case 0x0097: pszService = "enable global trapping"; break;
|
---|
226 | case 0x0098: pszService = "enable local trapping"; break;
|
---|
227 | case 0x0099: pszService = "disable global trapping"; break;
|
---|
228 | case 0x009a: pszService = "disable local trapping"; break;
|
---|
229 | case 0x009b: pszService = "create list"; break;
|
---|
230 | case 0x009c: pszService = "destroy list"; break;
|
---|
231 | case 0x009d: pszService = "allocate list"; break;
|
---|
232 | case 0x009e: pszService = "attach list"; break;
|
---|
233 | case 0x009f: pszService = "attach list tail"; break;
|
---|
234 | case 0x00a0: pszService = "insert into list"; break;
|
---|
235 | case 0x00a1: pszService = "remove from list"; break;
|
---|
236 | case 0x00a2: pszService = "deallocate list"; break;
|
---|
237 | case 0x00a3: pszService = "get first item in list"; break;
|
---|
238 | case 0x00a4: pszService = "get next item in list"; break;
|
---|
239 | case 0x00a5: pszService = "remove first item in list"; break;
|
---|
240 | case 0x00a6: pszService = "add instance item"; break;
|
---|
241 | case 0x00a7: pszService = "allocate device callback area"; break;
|
---|
242 | case 0x00a8: pszService = "allocate global V86 data area"; break;
|
---|
243 | case 0x00a9: pszService = "allocate temporary V86 data area"; break;
|
---|
244 | case 0x00aa: pszService = "free temporary V86 data area"; break;
|
---|
245 | case 0x00ab: pszService = "get decimal integer from profile"; break;
|
---|
246 | case 0x00ac: pszService = "convert decimal string to integer"; break;
|
---|
247 | case 0x00ad: pszService = "get fixed-point number from profile"; break;
|
---|
248 | case 0x00ae: pszService = "convert fixed-point string"; break;
|
---|
249 | case 0x00af: pszService = "get hex integer from profile"; break;
|
---|
250 | case 0x00b0: pszService = "convert hex string to integer"; break;
|
---|
251 | case 0x00b1: pszService = "get boolean value from profile"; break;
|
---|
252 | case 0x00b2: pszService = "convert boolean string"; break;
|
---|
253 | case 0x00b3: pszService = "get string from profile"; break;
|
---|
254 | case 0x00b4: pszService = "get next string from profile"; break;
|
---|
255 | case 0x00b5: pszService = "get environment string"; break;
|
---|
256 | case 0x00b6: pszService = "get exec path"; break;
|
---|
257 | case 0x00b7: pszService = "get configuration directory"; break;
|
---|
258 | case 0x00b8: pszService = "open file"; break;
|
---|
259 | case 0x00b9: pszService = "get PSP segment"; break;
|
---|
260 | case 0x00ba: pszService = "get DOS vectors"; break;
|
---|
261 | case 0x00bb: pszService = "get machine information"; break;
|
---|
262 | case 0x00bc: pszService = "get/set HMA information"; break;
|
---|
263 | case 0x00bd: pszService = "set system exit code"; break;
|
---|
264 | case 0x00be: pszService = "fatal error handler"; break;
|
---|
265 | case 0x00bf: pszService = "fatal memory error"; break;
|
---|
266 | case 0x00c0: pszService = "update system clock"; break;
|
---|
267 | case 0x00c1: pszService = "test if debugger installed"; break;
|
---|
268 | case 0x00c2: pszService = "output debugger string"; break;
|
---|
269 | case 0x00c3: pszService = "output debugger character"; break;
|
---|
270 | case 0x00c4: pszService = "input debugger character"; break;
|
---|
271 | case 0x00c5: pszService = "debugger convert hex to binary"; break;
|
---|
272 | case 0x00c6: pszService = "debugger convert hex to decimal"; break;
|
---|
273 | case 0x00c7: pszService = "debugger test if valid handle"; break;
|
---|
274 | case 0x00c8: pszService = "validate client pointer"; break;
|
---|
275 | case 0x00c9: pszService = "test reentry"; break;
|
---|
276 | case 0x00ca: pszService = "queue debugger string"; break;
|
---|
277 | case 0x00cb: pszService = "log procedure call"; break;
|
---|
278 | case 0x00cc: pszService = "debugger test current VM"; break;
|
---|
279 | case 0x00cd: pszService = "get PM interrupt type"; break;
|
---|
280 | case 0x00ce: pszService = "set PM interrupt type"; break;
|
---|
281 | case 0x00cf: pszService = "get last updated system time"; break;
|
---|
282 | case 0x00d0: pszService = "get last updated VM execution time"; break;
|
---|
283 | case 0x00d1: pszService = "test if double-byte character-set lead byte"; break;
|
---|
284 | case 0x00d2: pszService = "AddFreePhysPage"; break;
|
---|
285 | case 0x00d3: pszService = "PageResetHandlePAddr"; break;
|
---|
286 | case 0x00d4: pszService = "SetLastV86Page"; break;
|
---|
287 | case 0x00d5: pszService = "GetLastV86Page"; break;
|
---|
288 | case 0x00d6: pszService = "MapFreePhysReg"; break;
|
---|
289 | case 0x00d7: pszService = "UnmapFreePhysReg"; break;
|
---|
290 | case 0x00d8: pszService = "XchgFreePhysReg"; break;
|
---|
291 | case 0x00d9: pszService = "SetFreePhysRegCalBk"; break;
|
---|
292 | case 0x00da: pszService = "get next arena (MCB)"; break;
|
---|
293 | case 0x00db: pszService = "get name of ugly TSR"; break;
|
---|
294 | case 0x00dc: pszService = "get debug options"; break;
|
---|
295 | case 0x00dd: pszService = "set physical HMA alias"; break;
|
---|
296 | case 0x00de: pszService = "GetGlblRng0V86IntBase"; break;
|
---|
297 | case 0x00df: pszService = "add global V86 data area"; break;
|
---|
298 | case 0x00e0: pszService = "get/set detailed VM error"; break;
|
---|
299 | case 0x00e1: pszService = "Is_Debug_Chr"; break;
|
---|
300 | case 0x00e2: pszService = "clear monochrome screen"; break;
|
---|
301 | case 0x00e3: pszService = "output character to mono screen"; break;
|
---|
302 | case 0x00e4: pszService = "output string to mono screen"; break;
|
---|
303 | case 0x00e5: pszService = "set current position on mono screen"; break;
|
---|
304 | case 0x00e6: pszService = "get current position on mono screen"; break;
|
---|
305 | case 0x00e7: pszService = "get character from mono screen"; break;
|
---|
306 | case 0x00e8: pszService = "locate byte in ROM"; break;
|
---|
307 | case 0x00e9: pszService = "hook invalid page fault"; break;
|
---|
308 | case 0x00ea: pszService = "unhook invalid page fault"; break;
|
---|
309 | case 0x00eb: pszService = "set delete on exit file"; break;
|
---|
310 | case 0x00ec: pszService = "close VM"; break;
|
---|
311 | case 0x00ed: pszService = "Enable_Touch_1st_Meg"; break;
|
---|
312 | case 0x00ee: pszService = "Disable_Touch_1st_Meg"; break;
|
---|
313 | case 0x00ef: pszService = "install exception handler"; break;
|
---|
314 | case 0x00f0: pszService = "remove exception handler"; break;
|
---|
315 | case 0x00f1: pszService = "Get_Crit_Status_No_Block"; break;
|
---|
316 | case 0x00f2: pszService = "Schedule_VM_RTI_Event"; break;
|
---|
317 | case 0x00f3: pszService = "Trace_Out_Service"; break;
|
---|
318 | case 0x00f4: pszService = "Debug_Out_Service"; break;
|
---|
319 | case 0x00f5: pszService = "Debug_Flags_Service"; break;
|
---|
320 | case 0x00f6: pszService = "VMM add import module name"; break;
|
---|
321 | case 0x00f7: pszService = "VMM Add DDB"; break;
|
---|
322 | case 0x00f8: pszService = "VMM Remove DDB"; break;
|
---|
323 | case 0x00f9: pszService = "get thread time slice priority"; break;
|
---|
324 | case 0x00fa: pszService = "set thread time slice priority"; break;
|
---|
325 | case 0x00fb: pszService = "schedule thread event"; break;
|
---|
326 | case 0x00fc: pszService = "cancel thread event"; break;
|
---|
327 | case 0x00fd: pszService = "set thread timeout"; break;
|
---|
328 | case 0x00fe: pszService = "set asynchronous timeout"; break;
|
---|
329 | case 0x00ff: pszService = "AllocatreThreadDataSlot"; break;
|
---|
330 | case 0x0100: pszService = "FreeThreadDataSlot"; break;
|
---|
331 | case 0x0101: pszService = "create Mutex"; break;
|
---|
332 | case 0x0102: pszService = "destroy Mutex"; break;
|
---|
333 | case 0x0103: pszService = "get Mutex owner"; break;
|
---|
334 | case 0x0104: pszService = "call when thread switched"; break;
|
---|
335 | case 0x0105: pszService = "create thread"; break;
|
---|
336 | case 0x0106: pszService = "start thread"; break;
|
---|
337 | case 0x0107: pszService = "terminate thread"; break;
|
---|
338 | case 0x0108: pszService = "get current thread handle"; break;
|
---|
339 | case 0x0109: pszService = "test current thread handle"; break;
|
---|
340 | case 0x010a: pszService = "Get_Sys_Thread_Handle"; break;
|
---|
341 | case 0x010b: pszService = "Test_Sys_Thread_Handle"; break;
|
---|
342 | case 0x010c: pszService = "Validate_Thread_Handle"; break;
|
---|
343 | case 0x010d: pszService = "Get_Initial_Thread_Handle"; break;
|
---|
344 | case 0x010e: pszService = "Test_Initial_Thread_Handle"; break;
|
---|
345 | case 0x010f: pszService = "Debug_Test_Valid_Thread_Handle"; break;
|
---|
346 | case 0x0110: pszService = "Debug_Test_Cur_Thread"; break;
|
---|
347 | case 0x0111: pszService = "VMM_GetSystemInitState"; break;
|
---|
348 | case 0x0112: pszService = "Cancel_Call_When_Thread_Switched"; break;
|
---|
349 | case 0x0113: pszService = "Get_Next_Thread_Handle"; break;
|
---|
350 | case 0x0114: pszService = "Adjust_Thread_Exec_Priority"; break;
|
---|
351 | case 0x0115: pszService = "Deallocate_Device_CB_Area"; break;
|
---|
352 | case 0x0116: pszService = "Remove_IO_Handler"; break;
|
---|
353 | case 0x0117: pszService = "Remove_Mult_IO_Handlers"; break;
|
---|
354 | case 0x0118: pszService = "unhook V86 interrupt chain"; break;
|
---|
355 | case 0x0119: pszService = "unhook V86 fault handler"; break;
|
---|
356 | case 0x011a: pszService = "unhook PM fault handler"; break;
|
---|
357 | case 0x011b: pszService = "unhook VMM fault handler"; break;
|
---|
358 | case 0x011c: pszService = "unhook device service"; break;
|
---|
359 | case 0x011d: pszService = "PageReserve"; break;
|
---|
360 | case 0x011e: pszService = "PageCommit"; break;
|
---|
361 | case 0x011f: pszService = "PageDecommit"; break;
|
---|
362 | case 0x0120: pszService = "PagerRegister"; break;
|
---|
363 | case 0x0121: pszService = "PagerQuery"; break;
|
---|
364 | case 0x0122: pszService = "PagerDeregister"; break;
|
---|
365 | case 0x0123: pszService = "ContextCreate"; break;
|
---|
366 | case 0x0124: pszService = "ContextDestroy"; break;
|
---|
367 | case 0x0125: pszService = "PageAttach"; break;
|
---|
368 | case 0x0126: pszService = "PageFlush"; break;
|
---|
369 | case 0x0127: pszService = "SignalID"; break;
|
---|
370 | case 0x0128: pszService = "PageCommitPhys"; break;
|
---|
371 | case 0x0129: pszService = "Register_Win32_Services"; break;
|
---|
372 | case 0x012a: pszService = "Cancel_Call_When_Not_Critical"; break;
|
---|
373 | case 0x012b: pszService = "Cancel_Call_When_Idle"; break;
|
---|
374 | case 0x012c: pszService = "Cancel_Call_When_Task_Switched"; break;
|
---|
375 | case 0x012d: pszService = "Debug_Printf_Service"; break;
|
---|
376 | case 0x012e: pszService = "enter Mutex"; break;
|
---|
377 | case 0x012f: pszService = "leave Mutex"; break;
|
---|
378 | case 0x0130: pszService = "simulate VM I/O"; break;
|
---|
379 | case 0x0131: pszService = "Signal_Semaphore_No_Switch"; break;
|
---|
380 | case 0x0132: pszService = "MMSwitchContext"; break;
|
---|
381 | case 0x0133: pszService = "MMModifyPermissions"; break;
|
---|
382 | case 0x0134: pszService = "MMQuery"; break;
|
---|
383 | case 0x0135: pszService = "EnterMustComplete"; break;
|
---|
384 | case 0x0136: pszService = "LeaveMustComplete"; break;
|
---|
385 | case 0x0137: pszService = "ResumeExecMustComplete"; break;
|
---|
386 | case 0x0138: pszService = "get thread termination status"; break;
|
---|
387 | case 0x0139: pszService = "GetInstanceInfo"; break;
|
---|
388 | case 0x013a: pszService = "ExecIntMustComplete"; break;
|
---|
389 | case 0x013b: pszService = "ExecVxDIntMustComplete"; break;
|
---|
390 | case 0x013c: pszService = "begin V86 serialization"; break;
|
---|
391 | case 0x013d: pszService = "unhook V86 page"; break;
|
---|
392 | case 0x013e: pszService = "VMM_GetVxDLocationList"; break;
|
---|
393 | case 0x013f: pszService = "VMM_GetDDBList get start of VxD chain"; break;
|
---|
394 | case 0x0140: pszService = "unhook NMI event"; break;
|
---|
395 | case 0x0141: pszService = "Get_Instanced_V86_Int_Vector"; break;
|
---|
396 | case 0x0142: pszService = "get or set real DOS PSP"; break;
|
---|
397 | case 0x0143: pszService = "call priority thread event"; break;
|
---|
398 | case 0x0144: pszService = "Get_System_Time_Address"; break;
|
---|
399 | case 0x0145: pszService = "Get_Crit_Status_Thread"; break;
|
---|
400 | case 0x0146: pszService = "Get_DDB"; break;
|
---|
401 | case 0x0147: pszService = "Directed_Sys_Control"; break;
|
---|
402 | case 0x0148: pszService = "RegOpenKey"; break;
|
---|
403 | case 0x0149: pszService = "RegCloseKey"; break;
|
---|
404 | case 0x014a: pszService = "RegCreateKey"; break;
|
---|
405 | case 0x014b: pszService = "RegDeleteKey"; break;
|
---|
406 | case 0x014c: pszService = "RegEnumKey"; break;
|
---|
407 | case 0x014d: pszService = "RegQueryValue"; break;
|
---|
408 | case 0x014e: pszService = "RegSetValue"; break;
|
---|
409 | case 0x014f: pszService = "RegDeleteValue"; break;
|
---|
410 | case 0x0150: pszService = "RegEnumValue"; break;
|
---|
411 | case 0x0151: pszService = "RegQueryValueEx"; break;
|
---|
412 | case 0x0152: pszService = "RegSetValueEx"; break;
|
---|
413 | case 0x0153: pszService = "CallRing3"; break;
|
---|
414 | case 0x0154: pszService = "Exec_PM_Int"; break;
|
---|
415 | case 0x0155: pszService = "RegFlushKey"; break;
|
---|
416 | case 0x0156: pszService = "PageCommitContig"; break;
|
---|
417 | case 0x0157: pszService = "GetCurrentContext"; break;
|
---|
418 | case 0x0158: pszService = "LocalizeSprintf"; break;
|
---|
419 | case 0x0159: pszService = "LocalizeStackSprintf"; break;
|
---|
420 | case 0x015a: pszService = "Call_Restricted_Event"; break;
|
---|
421 | case 0x015b: pszService = "Cancel_Restricted_Event"; break;
|
---|
422 | case 0x015c: pszService = "Register_PEF_Provider"; break;
|
---|
423 | case 0x015d: pszService = "GetPhysPageInfo"; break;
|
---|
424 | case 0x015e: pszService = "RegQueryInfoKey"; break;
|
---|
425 | case 0x015f: pszService = "MemArb_Reserve_Pages"; break;
|
---|
426 | case 0x0160: pszService = "Time_Slice_Sys_VM_Idle"; break;
|
---|
427 | case 0x0161: pszService = "Time_Slice_Sleep"; break;
|
---|
428 | case 0x0162: pszService = "Boost_With_Decay"; break;
|
---|
429 | case 0x0163: pszService = "Set_Inversion_Pri"; break;
|
---|
430 | case 0x0164: pszService = "Reset_Inversion_Pri"; break;
|
---|
431 | case 0x0165: pszService = "Release_Inversion_Pri"; break;
|
---|
432 | case 0x0166: pszService = "Get_Thread_Win32_Pri"; break;
|
---|
433 | case 0x0167: pszService = "Set_Thread_Win32_Pri"; break;
|
---|
434 | case 0x0168: pszService = "Set_Thread_Static_Boost"; break;
|
---|
435 | case 0x0169: pszService = "Set_VM_Static_Boost"; break;
|
---|
436 | case 0x016a: pszService = "Release_Inversion_Pri_ID"; break;
|
---|
437 | case 0x016b: pszService = "Attach_Thread_To_Group"; break;
|
---|
438 | case 0x016c: pszService = "Detach_Thread_From_Group"; break;
|
---|
439 | case 0x016d: pszService = "Set_Group_Static_Boost"; break;
|
---|
440 | case 0x016e: pszService = "GetRegistryPath"; break;
|
---|
441 | case 0x016f: pszService = "GetRegistryKey"; break;
|
---|
442 | case 0x0170: pszService = "CleanupNestedExec"; break;
|
---|
443 | case 0x0171: pszService = "RegRemapPreDefKey"; break;
|
---|
444 | case 0x0172: pszService = "End_V86_Serialization"; break;
|
---|
445 | case 0x0173: pszService = "Assert_Range"; break;
|
---|
446 | case 0x0174: pszService = "Sprintf"; break;
|
---|
447 | case 0x0175: pszService = "PageChangePager"; break;
|
---|
448 | case 0x0176: pszService = "RegCreateDynKey"; break;
|
---|
449 | case 0x0177: pszService = "RegQMulti"; break;
|
---|
450 | case 0x0178: pszService = "Boost_Thread_With_VM"; break;
|
---|
451 | case 0x0179: pszService = "Get_Boot_Flags"; break;
|
---|
452 | case 0x017a: pszService = "Set_Boot_Flags"; break;
|
---|
453 | case 0x017b: pszService = "lstrcpyn"; break;
|
---|
454 | case 0x017c: pszService = "lstrlen"; break;
|
---|
455 | case 0x017d: pszService = "lmemcpy"; break;
|
---|
456 | case 0x017e: pszService = "GetVxDName"; break;
|
---|
457 | case 0x017f: pszService = "Force_Mutexes_Free"; break;
|
---|
458 | case 0x0180: pszService = "Restore_Forced_Mutexes"; break;
|
---|
459 | case 0x0181: pszService = "AddReclaimableItem"; break;
|
---|
460 | case 0x0182: pszService = "SetReclaimableItem"; break;
|
---|
461 | case 0x0183: pszService = "EnumReclaimableItem"; break;
|
---|
462 | case 0x0184: pszService = "Time_Slice_Wake_Sys_VM"; break;
|
---|
463 | case 0x0185: pszService = "VMM_Replace_Global_Environment"; break;
|
---|
464 | case 0x0186: pszService = "Begin_Non_Serial_Nest_V86_Exec"; break;
|
---|
465 | case 0x0187: pszService = "Get_Nest_Exec_Status"; break;
|
---|
466 | case 0x0188: pszService = "Open_Boot_Log"; break;
|
---|
467 | case 0x0189: pszService = "Write_Boot_Log"; break;
|
---|
468 | case 0x018a: pszService = "Close_Boot_Log"; break;
|
---|
469 | case 0x018b: pszService = "EnableDisable_Boot_Log"; break;
|
---|
470 | case 0x018c: pszService = "Call_On_My_Stack"; break;
|
---|
471 | case 0x018d: pszService = "Get_Inst_V86_Int_Vec_Base"; break;
|
---|
472 | case 0x018e: pszService = "lstrcmpi"; break;
|
---|
473 | case 0x018f: pszService = "strupr"; break;
|
---|
474 | case 0x0190: pszService = "Log_Fault_Call_Out"; break;
|
---|
475 | case 0x0191: pszService = "AtEventTime"; break;
|
---|
476 | }
|
---|
477 | pszVxD = "VMM";
|
---|
478 | break;
|
---|
479 | case 0x0002: pszVxD = "DEBUG"; break;
|
---|
480 | case 0x0003: pszVxD = "VPICD"; break;
|
---|
481 | case 0x0004: pszVxD = "VDMAD"; break;
|
---|
482 | case 0x0005: pszVxD = "VTD"; break;
|
---|
483 | case 0x0006: pszVxD = "V86MMGR"; break;
|
---|
484 | case 0x0007: pszVxD = "PageSwap"; break;
|
---|
485 | case 0x0009: pszVxD = "REBOOT"; break;
|
---|
486 | case 0x000A: pszVxD = "VDD"; break;
|
---|
487 | case 0x000B: pszVxD = "VSD"; break;
|
---|
488 | case 0x000C: pszVxD = "VMD / VMOUSE"; break;
|
---|
489 | case 0x000D: pszVxD = "VKD"; break;
|
---|
490 | case 0x000E: pszVxD = "VCD"; break;
|
---|
491 | case 0x0010: pszVxD = "BlockDev / IOS"; break;
|
---|
492 | case 0x0011: pszVxD = "VMCPD"; break;
|
---|
493 | case 0x0012: pszVxD = "EBIOS"; break;
|
---|
494 | case 0x0014: pszVxD = "VNETBIOS"; break;
|
---|
495 | case 0x0015: pszVxD = "DOSMGR"; break;
|
---|
496 | case 0x0017: pszVxD = "SHELL"; break;
|
---|
497 | case 0x0018: pszVxD = "VMPoll"; break;
|
---|
498 | case 0x001A: pszVxD = "DOSNET"; break;
|
---|
499 | case 0x001B: pszVxD = "VFD"; break;
|
---|
500 | case 0x001C: pszVxD = "LoadHi"; break;
|
---|
501 | case 0x0020: pszVxD = "Int13"; break;
|
---|
502 | case 0x0021: pszVxD = "PAGEFILE"; break;
|
---|
503 | case 0x0026: pszVxD = "VPOWERD"; break;
|
---|
504 | case 0x0027: pszVxD = "VXDLDR"; break;
|
---|
505 | case 0x0028: pszVxD = "NDIS"; break;
|
---|
506 | case 0x002A: pszVxD = "VWIN32"; break;
|
---|
507 | case 0x002B: pszVxD = "VCOMM"; break;
|
---|
508 | case 0x002C: pszVxD = "SPOOLER"; break;
|
---|
509 | case 0x0032: pszVxD = "VSERVER"; break;
|
---|
510 | case 0x0033: pszVxD = "CONFIGMG"; break;
|
---|
511 | case 0x0034: pszVxD = "DWCFGMG.SYS"; break;
|
---|
512 | case 0x0036: pszVxD = "VFBACKUP"; break;
|
---|
513 | case 0x0037: pszVxD = "VMINI / ENABLE"; break;
|
---|
514 | case 0x0038: pszVxD = "VCOND"; break;
|
---|
515 | case 0x003D: pszVxD = "BIOS"; break;
|
---|
516 | case 0x003E: pszVxD = "WSOCK"; break;
|
---|
517 | case 0x0040: pszVxD = "IFSMgr"; break;
|
---|
518 | case 0x0041: pszVxD = "VCDFSD"; break;
|
---|
519 | case 0x0048: pszVxD = "PERF"; break;
|
---|
520 | case 0x004A: pszVxD = "MTRR"; break;
|
---|
521 | case 0x004B: pszVxD = "NTKERN"; break;
|
---|
522 | case 0x011F: pszVxD = "VFLATD"; break;
|
---|
523 | case 0x0449: pszVxD = "vjoyd"; break;
|
---|
524 | case 0x044A: pszVxD = "mmdevldr"; break;
|
---|
525 | case 0x0480: pszVxD = "VNetSup"; break;
|
---|
526 | case 0x0481: pszVxD = "VREDIR"; break;
|
---|
527 | case 0x0483: pszVxD = "VSHARE"; break;
|
---|
528 | case 0x0487: pszVxD = "NWLINK"; break;
|
---|
529 | case 0x0488: pszVxD = "VTDI"; break;
|
---|
530 | case 0x0489: pszVxD = "VIP"; break;
|
---|
531 | case 0x048A: pszVxD = "MSTCP"; break;
|
---|
532 | case 0x048B: pszVxD = "VCACHE"; break;
|
---|
533 | case 0x048E: pszVxD = "NWREDIR"; break;
|
---|
534 | case 0x0491: pszVxD = "FILESEC"; break;
|
---|
535 | case 0x0492: pszVxD = "NWSERVER"; break;
|
---|
536 | case 0x0493: pszVxD = "MSSP / NWSP"; break;
|
---|
537 | case 0x0494: pszVxD = "NSCL"; break;
|
---|
538 | case 0x0495: pszVxD = "AFVXD"; break;
|
---|
539 | case 0x0496: pszVxD = "NDIS2SUP"; break;
|
---|
540 | case 0x0498: pszVxD = "Splitter"; break;
|
---|
541 | case 0x0499: pszVxD = "PPPMAC"; break;
|
---|
542 | case 0x049A: pszVxD = "VDHCP"; break;
|
---|
543 | case 0x049B: pszVxD = "VNBT"; break;
|
---|
544 | case 0x049D: pszVxD = "LOGGER"; break;
|
---|
545 | case 0x097C: pszVxD = "PCCARD"; break;
|
---|
546 | case 0x3098: pszVxD = "VstlthD"; break; /* QEMM */
|
---|
547 | case 0x30F6: pszVxD = "WSVV"; break;
|
---|
548 | case 0x33FC: pszVxD = "ASPIENUM"; break;
|
---|
549 | case 0x357E: pszVxD = "DSOUND"; break;
|
---|
550 | case 0x39E6: pszVxD = "A3D"; break;
|
---|
551 | case 0x3BFD: pszVxD = "CWCPROXY"; break;
|
---|
552 | case 0x3C78: pszVxD = "VGARTD"; break;
|
---|
553 |
|
---|
554 | default:
|
---|
555 | {
|
---|
556 | uint8_t abOpcodes[16] = {0};
|
---|
557 | cbInstr = RT_MIN(cbInstr, 16);
|
---|
558 | rc = PGMPhysSimpleReadGCPtr(pVCpu, abOpcodes, GCPtrParams - cbInstr, cbInstr);
|
---|
559 | Log2(("VxD syscall: VxD=%#x Service=%#x - Unknown at %04x:%08RX64: %.*Rhxs - %.*Rhxs (%Rrc)\n",
|
---|
560 | idVxD, idService, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip,
|
---|
561 | cbInstr, abOpcodes, sizeof(auParams), auParams, rc));
|
---|
562 | return;
|
---|
563 | }
|
---|
564 | }
|
---|
565 | if (pszService)
|
---|
566 | Log2(("VxD syscall: VxD=%#04x Service=%#04x - %s: %s\n", idVxD, idService, pszVxD, pszService));
|
---|
567 | else
|
---|
568 | Log2(("VxD syscall: VxD=%#04x Service=%#04x - %s\n", idVxD, idService, pszVxD));
|
---|
569 | }
|
---|
570 | else
|
---|
571 | Log2(("VxD syscall: unable to read parameters at %RGv: %Rrc\n", GCPtrParams, rc));
|
---|
572 | }
|
---|
573 |
|
---|
574 |
|
---|
575 | void iemLogSyscallProtModeInt(PVMCPUCC pVCpu, uint8_t u8Vector, uint8_t cbInstr)
|
---|
576 | {
|
---|
577 | /* DOS & BIOS (V86 mode) */
|
---|
578 | if (LogIsEnabled())
|
---|
579 | {
|
---|
580 | }
|
---|
581 |
|
---|
582 | /* Windows 3.x */
|
---|
583 | if (LogIs2Enabled())
|
---|
584 | switch (u8Vector)
|
---|
585 | {
|
---|
586 | case 0x20: /* VxD call. */
|
---|
587 | iemLogSyscallWinVxDCall(pVCpu, cbInstr);
|
---|
588 | break;
|
---|
589 | }
|
---|
590 |
|
---|
591 | /* Linux */
|
---|
592 | if (LogIs3Enabled())
|
---|
593 | {
|
---|
594 |
|
---|
595 | }
|
---|
596 | }
|
---|
597 |
|
---|
598 | #endif /* LOG_ENABLED */
|
---|