VirtualBox

source: vbox/trunk/src/VBox/Devices/testcase/tstDevicePdmDevHlp.cpp@ 82904

Last change on this file since 82904 was 82904, checked in by vboxsync, 5 years ago

Devices/tstDevice: Continue stubbing/implementing more PDM device helper callbacks, bugref:9006

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 154.5 KB
Line 
1/* $Id: tstDevicePdmDevHlp.cpp 82904 2020-01-29 12:19:30Z vboxsync $ */
2/** @file
3 * tstDevice - Test framework for PDM devices/drivers, PDM helper implementation.
4 */
5
6/*
7 * Copyright (C) 2017-2019 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*********************************************************************************************************************************
20* Header Files *
21*********************************************************************************************************************************/
22#define LOG_GROUP LOG_GROUP_DEFAULT /** @todo */
23#include <VBox/types.h>
24#include <VBox/version.h>
25#include <VBox/vmm/pdmpci.h>
26
27#include <iprt/assert.h>
28#include <iprt/mem.h>
29
30#include "tstDeviceInternal.h"
31
32
33/*********************************************************************************************************************************
34* Defined Constants And Macros *
35*********************************************************************************************************************************/
36
37/** @def PDMDEV_ASSERT_DEVINS
38 * Asserts the validity of the device instance.
39 */
40#ifdef VBOX_STRICT
41# define PDMDEV_ASSERT_DEVINS(pDevIns) \
42 do { \
43 AssertPtr(pDevIns); \
44 Assert(pDevIns->u32Version == PDM_DEVINS_VERSION); \
45 Assert(pDevIns->CTX_SUFF(pvInstanceDataFor) == (void *)&pDevIns->achInstanceData[0]); \
46 } while (0)
47#else
48# define PDMDEV_ASSERT_DEVINS(pDevIns) do { } while (0)
49#endif
50
51
52/** Frequency of the real clock. */
53#define TMCLOCK_FREQ_REAL UINT32_C(1000)
54/** Frequency of the virtual clock. */
55#define TMCLOCK_FREQ_VIRTUAL UINT32_C(1000000000)
56
57
58/*********************************************************************************************************************************
59* Structures and Typedefs *
60*********************************************************************************************************************************/
61
62
63
64/*********************************************************************************************************************************
65* Global Variables *
66*********************************************************************************************************************************/
67
68
69
70/*********************************************************************************************************************************
71* Internal Functions *
72*********************************************************************************************************************************/
73
74
75/**
76 * Resolves a path reference to a configuration item.
77 *
78 * @returns VBox status code.
79 * @param paDevCfg The array of config items.
80 * @param pszName Name of a byte string value.
81 * @param ppItem Where to store the pointer to the item.
82 */
83static int tstDev_CfgmR3ResolveItem(PCTSTDEVCFGITEM paDevCfg, const char *pszName, PCTSTDEVCFGITEM *ppItem)
84{
85 *ppItem = NULL;
86 if (!paDevCfg)
87 return VERR_CFGM_VALUE_NOT_FOUND;
88
89 size_t cchName = strlen(pszName);
90 PCTSTDEVCFGITEM pDevCfgItem = paDevCfg;
91 while (pDevCfgItem->pszKey != NULL)
92 {
93 size_t cchKey = strlen(pDevCfgItem->pszKey);
94 if (cchName == cchKey)
95 {
96 int iDiff = memcmp(pszName, pDevCfgItem->pszKey, cchName);
97 if (iDiff <= 0)
98 {
99 if (iDiff != 0)
100 break;
101 *ppItem = pDevCfgItem;
102 return VINF_SUCCESS;
103 }
104 }
105
106 /* next */
107 pDevCfgItem++;
108 }
109 return VERR_CFGM_VALUE_NOT_FOUND;
110}
111
112
113/** @interface_method_impl{PDMDEVHLPR3,pfnIoPortCreateEx} */
114static DECLCALLBACK(int) pdmR3DevHlp_IoPortCreateEx(PPDMDEVINS pDevIns, RTIOPORT cPorts, uint32_t fFlags, PPDMPCIDEV pPciDev,
115 uint32_t iPciRegion, PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn,
116 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, RTR3PTR pvUser,
117 const char *pszDesc, PCIOMIOPORTDESC paExtDescs, PIOMIOPORTHANDLE phIoPorts)
118{
119 PDMDEV_ASSERT_DEVINS(pDevIns);
120 LogFlow(("pdmR3DevHlp_IoPortCreateEx: caller='%s'/%d: cPorts=%#x fFlags=%#x pPciDev=%p iPciRegion=%#x pfnOut=%p pfnIn=%p pfnOutStr=%p pfnInStr=%p pvUser=%p pszDesc=%p:{%s} paExtDescs=%p phIoPorts=%p\n",
121 pDevIns->pReg->szName, pDevIns->iInstance, cPorts, fFlags, pPciDev, iPciRegion, pfnOut, pfnIn, pfnOutStr, pfnInStr,
122 pvUser, pszDesc, pszDesc, paExtDescs, phIoPorts));
123
124 /** @todo Verify there is no overlapping. */
125
126 RT_NOREF(pszDesc);
127 int rc = VINF_SUCCESS;
128 PRTDEVDUTIOPORT pIoPort = (PRTDEVDUTIOPORT)RTMemAllocZ(sizeof(RTDEVDUTIOPORT));
129 if (RT_LIKELY(pIoPort))
130 {
131 pIoPort->cPorts = cPorts;
132 pIoPort->pvUserR3 = pvUser;
133 pIoPort->pfnOutR3 = pfnOut;
134 pIoPort->pfnInR3 = pfnIn;
135 pIoPort->pfnOutStrR3 = pfnOutStr;
136 pIoPort->pfnInStrR3 = pfnInStr;
137 RTListAppend(&pDevIns->Internal.s.pDut->LstIoPorts, &pIoPort->NdIoPorts);
138 *phIoPorts = (IOMIOPORTHANDLE)pIoPort;
139 }
140 else
141 rc = VERR_NO_MEMORY;
142
143 LogFlow(("pdmR3DevHlp_IoPortCreateEx: caller='%s'/%d: returns %Rrc (*phIoPorts=%#x)\n",
144 pDevIns->pReg->szName, pDevIns->iInstance, rc, *phIoPorts));
145 return rc;
146}
147
148
149/** @interface_method_impl{PDMDEVHLPR3,pfnIoPortMap} */
150static DECLCALLBACK(int) pdmR3DevHlp_IoPortMap(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, RTIOPORT Port)
151{
152 PDMDEV_ASSERT_DEVINS(pDevIns);
153 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: hIoPorts=%#x Port=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hIoPorts, Port));
154
155 PRTDEVDUTIOPORT pIoPort = (PRTDEVDUTIOPORT)hIoPorts;
156 pIoPort->PortStart = Port;
157
158 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: returns VINF_SUCCESS\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS));
159 return VINF_SUCCESS;
160}
161
162
163/** @interface_method_impl{PDMDEVHLPR3,pfnIoPortUnmap} */
164static DECLCALLBACK(int) pdmR3DevHlp_IoPortUnmap(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts)
165{
166 PDMDEV_ASSERT_DEVINS(pDevIns);
167 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: hIoPorts=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hIoPorts));
168
169 int rc = VERR_NOT_IMPLEMENTED;
170 AssertFailed();
171
172 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
173 return rc;
174}
175
176
177/** @interface_method_impl{PDMDEVHLPR3,pfnIoPortGetMappingAddress} */
178static DECLCALLBACK(uint32_t) pdmR3DevHlp_IoPortGetMappingAddress(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts)
179{
180 PDMDEV_ASSERT_DEVINS(pDevIns);
181 LogFlow(("pdmR3DevHlp_IoPortGetMappingAddress: caller='%s'/%d: hIoPorts=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hIoPorts));
182
183 uint32_t uAddress = 0;
184 AssertFailed();
185
186 LogFlow(("pdmR3DevHlp_IoPortGetMappingAddress: caller='%s'/%d: returns %#RX32\n", pDevIns->pReg->szName, pDevIns->iInstance, uAddress));
187 return uAddress;
188}
189
190
191/** @interface_method_impl{PDMDEVHLPR3,pfnMmioCreateEx} */
192static DECLCALLBACK(int) pdmR3DevHlp_MmioCreateEx(PPDMDEVINS pDevIns, RTGCPHYS cbRegion,
193 uint32_t fFlags, PPDMPCIDEV pPciDev, uint32_t iPciRegion,
194 PFNIOMMMIONEWWRITE pfnWrite, PFNIOMMMIONEWREAD pfnRead, PFNIOMMMIONEWFILL pfnFill,
195 void *pvUser, const char *pszDesc, PIOMMMIOHANDLE phRegion)
196{
197 PDMDEV_ASSERT_DEVINS(pDevIns);
198 LogFlow(("pdmR3DevHlp_MmioCreateEx: caller='%s'/%d: cbRegion=%#RGp fFlags=%#x pPciDev=%p iPciRegion=%#x pfnWrite=%p pfnRead=%p pfnFill=%p pvUser=%p pszDesc=%p:{%s} phRegion=%p\n",
199 pDevIns->pReg->szName, pDevIns->iInstance, cbRegion, fFlags, pPciDev, iPciRegion, pfnWrite, pfnRead, pfnFill, pvUser, pszDesc, pszDesc, phRegion));
200
201 int rc = VERR_NOT_IMPLEMENTED;
202 AssertFailed();
203
204 LogFlow(("pdmR3DevHlp_MmioCreateEx: caller='%s'/%d: returns %Rrc (*phRegion=%#x)\n",
205 pDevIns->pReg->szName, pDevIns->iInstance, rc, *phRegion));
206 return rc;
207}
208
209
210/** @interface_method_impl{PDMDEVHLPR3,pfnMmioMap} */
211static DECLCALLBACK(int) pdmR3DevHlp_MmioMap(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS GCPhys)
212{
213 PDMDEV_ASSERT_DEVINS(pDevIns);
214 LogFlow(("pdmR3DevHlp_MmioMap: caller='%s'/%d: hRegion=%#x GCPhys=%#RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, GCPhys));
215
216 int rc = VERR_NOT_IMPLEMENTED;
217 AssertFailed();
218
219 LogFlow(("pdmR3DevHlp_MmioMap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
220 return rc;
221}
222
223
224/** @interface_method_impl{PDMDEVHLPR3,pfnMmioUnmap} */
225static DECLCALLBACK(int) pdmR3DevHlp_MmioUnmap(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion)
226{
227 PDMDEV_ASSERT_DEVINS(pDevIns);
228 LogFlow(("pdmR3DevHlp_MmioUnmap: caller='%s'/%d: hRegion=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion));
229
230 int rc = VERR_NOT_IMPLEMENTED;
231 AssertFailed();
232
233 LogFlow(("pdmR3DevHlp_MmioUnmap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
234 return rc;
235}
236
237
238/** @interface_method_impl{PDMDEVHLPR3,pfnMmioReduce} */
239static DECLCALLBACK(int) pdmR3DevHlp_MmioReduce(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS cbRegion)
240{
241 PDMDEV_ASSERT_DEVINS(pDevIns);
242 LogFlow(("pdmR3DevHlp_MmioReduce: caller='%s'/%d: hRegion=%#x cbRegion=%#RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, cbRegion));
243
244 int rc = VERR_NOT_IMPLEMENTED;
245 AssertFailed();
246
247 LogFlow(("pdmR3DevHlp_MmioReduce: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
248 return rc;
249}
250
251
252/** @interface_method_impl{PDMDEVHLPR3,pfnMmioGetMappingAddress} */
253static DECLCALLBACK(RTGCPHYS) pdmR3DevHlp_MmioGetMappingAddress(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion)
254{
255 PDMDEV_ASSERT_DEVINS(pDevIns);
256 LogFlow(("pdmR3DevHlp_MmioGetMappingAddress: caller='%s'/%d: hRegion=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion));
257
258 RTGCPHYS GCPhys = NIL_RTGCPHYS;
259 AssertFailed();
260
261 LogFlow(("pdmR3DevHlp_MmioGetMappingAddress: caller='%s'/%d: returns %RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys));
262 return GCPhys;
263}
264
265
266/** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Create} */
267static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Create(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iPciRegion, RTGCPHYS cbRegion,
268 uint32_t fFlags, const char *pszDesc, void **ppvMapping, PPGMMMIO2HANDLE phRegion)
269{
270 PDMDEV_ASSERT_DEVINS(pDevIns);
271 LogFlow(("pdmR3DevHlp_Mmio2Create: caller='%s'/%d: pPciDev=%p (%#x) iPciRegion=%#x cbRegion=%#RGp fFlags=%RX32 pszDesc=%p:{%s} ppvMapping=%p phRegion=%p\n",
272 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iPciRegion, cbRegion,
273 fFlags, pszDesc, pszDesc, ppvMapping, phRegion));
274
275 int rc = VERR_NOT_IMPLEMENTED;
276 AssertFailed();
277
278 LogFlow(("pdmR3DevHlp_Mmio2Create: caller='%s'/%d: returns %Rrc *ppvMapping=%p phRegion=%#RX64\n",
279 pDevIns->pReg->szName, pDevIns->iInstance, rc, *ppvMapping, *phRegion));
280 return rc;
281}
282
283
284/** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Destroy} */
285static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Destroy(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion)
286{
287 PDMDEV_ASSERT_DEVINS(pDevIns);
288 LogFlow(("pdmR3DevHlp_Mmio2Destroy: caller='%s'/%d: hRegion=%#RX64\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion));
289
290 int rc = VERR_NOT_IMPLEMENTED;
291 AssertFailed();
292
293 LogFlow(("pdmR3DevHlp_Mmio2Destroy: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
294 return rc;
295}
296
297
298/** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Map} */
299static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Map(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion, RTGCPHYS GCPhys)
300{
301 PDMDEV_ASSERT_DEVINS(pDevIns);
302 LogFlow(("pdmR3DevHlp_Mmio2Map: caller='%s'/%d: hRegion=%#RX64 GCPhys=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, GCPhys));
303
304 int rc = VERR_NOT_IMPLEMENTED;
305 AssertFailed();
306
307 LogFlow(("pdmR3DevHlp_Mmio2Map: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
308 return rc;
309}
310
311
312/** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Unmap} */
313static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Unmap(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion)
314{
315 PDMDEV_ASSERT_DEVINS(pDevIns);
316 LogFlow(("pdmR3DevHlp_Mmio2Unmap: caller='%s'/%d: hRegion=%#RX64\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion));
317
318 int rc = VERR_NOT_IMPLEMENTED;
319 AssertFailed();
320
321 LogFlow(("pdmR3DevHlp_Mmio2Unmap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
322 return rc;
323}
324
325
326/** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Reduce} */
327static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Reduce(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion, RTGCPHYS cbRegion)
328{
329 PDMDEV_ASSERT_DEVINS(pDevIns);
330 LogFlow(("pdmR3DevHlp_Mmio2Reduce: caller='%s'/%d: hRegion=%#RX64 cbRegion=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, cbRegion));
331
332 int rc = VERR_NOT_IMPLEMENTED;
333 AssertFailed();
334
335 LogFlow(("pdmR3DevHlp_Mmio2Reduce: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
336 return rc;
337}
338
339
340/** @interface_method_impl{PDMDEVHLPR3,pfnMmio2GetMappingAddress} */
341static DECLCALLBACK(RTGCPHYS) pdmR3DevHlp_Mmio2GetMappingAddress(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion)
342{
343 PDMDEV_ASSERT_DEVINS(pDevIns);
344 LogFlow(("pdmR3DevHlp_Mmio2GetMappingAddress: caller='%s'/%d: hRegion=%#RX6r\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion));
345
346 RTGCPHYS GCPhys = NIL_RTGCPHYS;
347 AssertFailed();
348
349 LogFlow(("pdmR3DevHlp_Mmio2GetMappingAddress: caller='%s'/%d: returns %RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys));
350 return GCPhys;
351}
352
353/**
354 * @copydoc PDMDEVHLPR3::pfnMmio2ChangeRegionNo
355 */
356static DECLCALLBACK(int) pdmR3DevHlp_Mmio2ChangeRegionNo(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion, uint32_t iNewRegion)
357{
358 PDMDEV_ASSERT_DEVINS(pDevIns);
359 LogFlow(("pdmR3DevHlp_Mmio2ChangeRegionNo: caller='%s'/%d: hRegion=%#RX6r iNewRegion=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, iNewRegion));
360
361 int rc = VERR_NOT_IMPLEMENTED;
362 AssertFailed();
363
364 LogFlow(("pdmR3DevHlp_Mmio2ChangeRegionNo: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
365 return rc;
366}
367
368
369/** @interface_method_impl{PDMDEVHLPR3,pfnROMRegister} */
370static DECLCALLBACK(int) pdmR3DevHlp_ROMRegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange,
371 const void *pvBinary, uint32_t cbBinary, uint32_t fFlags, const char *pszDesc)
372{
373 PDMDEV_ASSERT_DEVINS(pDevIns);
374 LogFlow(("pdmR3DevHlp_ROMRegister: caller='%s'/%d: GCPhysStart=%RGp cbRange=%#x pvBinary=%p cbBinary=%#x fFlags=%#RX32 pszDesc=%p:{%s}\n",
375 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange, pvBinary, cbBinary, fFlags, pszDesc, pszDesc));
376
377 int rc = VERR_NOT_IMPLEMENTED;
378 AssertFailed();
379
380 LogFlow(("pdmR3DevHlp_ROMRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
381 return rc;
382}
383
384
385/** @interface_method_impl{PDMDEVHLPR3,pfnROMProtectShadow} */
386static DECLCALLBACK(int) pdmR3DevHlp_ROMProtectShadow(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_t cbRange, PGMROMPROT enmProt)
387{
388 PDMDEV_ASSERT_DEVINS(pDevIns);
389 LogFlow(("pdmR3DevHlp_ROMProtectShadow: caller='%s'/%d: GCPhysStart=%RGp cbRange=%#x enmProt=%d\n",
390 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange, enmProt));
391
392 int rc = VERR_NOT_IMPLEMENTED;
393 AssertFailed();
394
395 LogFlow(("pdmR3DevHlp_ROMProtectShadow: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
396 return rc;
397}
398
399
400static DECLCALLBACK(int) pdmR3DevHlp_SSMRegister(PPDMDEVINS pDevIns, uint32_t uVersion, size_t cbGuess, const char *pszBefore,
401 PFNSSMDEVLIVEPREP pfnLivePrep, PFNSSMDEVLIVEEXEC pfnLiveExec, PFNSSMDEVLIVEVOTE pfnLiveVote,
402 PFNSSMDEVSAVEPREP pfnSavePrep, PFNSSMDEVSAVEEXEC pfnSaveExec, PFNSSMDEVSAVEDONE pfnSaveDone,
403 PFNSSMDEVLOADPREP pfnLoadPrep, PFNSSMDEVLOADEXEC pfnLoadExec, PFNSSMDEVLOADDONE pfnLoadDone)
404{
405 PDMDEV_ASSERT_DEVINS(pDevIns);
406 LogFlow(("pdmR3DevHlp_SSMRegister: caller='%s'/%d: uVersion=%#x cbGuess=%#x pszBefore=%p:{%s}\n"
407 " pfnLivePrep=%p pfnLiveExec=%p pfnLiveVote=%p pfnSavePrep=%p pfnSaveExec=%p pfnSaveDone=%p pszLoadPrep=%p pfnLoadExec=%p pfnLoadDone=%p\n",
408 pDevIns->pReg->szName, pDevIns->iInstance, uVersion, cbGuess, pszBefore, pszBefore,
409 pfnLivePrep, pfnLiveExec, pfnLiveVote,
410 pfnSavePrep, pfnSaveExec, pfnSaveDone,
411 pfnLoadPrep, pfnLoadExec, pfnLoadDone));
412
413 RT_NOREF(cbGuess, pszBefore);
414 int rc = VINF_SUCCESS;
415 PTSTDEVDUTSSM pSsm = (PTSTDEVDUTSSM)RTMemAllocZ(sizeof(*pSsm));
416 if (RT_LIKELY(pSsm))
417 {
418 pSsm->uVersion = uVersion;
419 pSsm->pfnLivePrep = pfnLivePrep;
420 pSsm->pfnLiveExec = pfnLiveExec;
421 pSsm->pfnLiveVote = pfnLiveVote;
422 pSsm->pfnSavePrep = pfnSavePrep;
423 pSsm->pfnSaveExec = pfnSaveExec;
424 pSsm->pfnSaveDone = pfnSaveDone;
425 pSsm->pfnLoadPrep = pfnLoadPrep;
426 pSsm->pfnLoadExec = pfnLoadExec;
427 pSsm->pfnLoadDone = pfnLoadDone;
428 RTListAppend(&pDevIns->Internal.s.pDut->LstSsmHandlers, &pSsm->NdSsm);
429 }
430 else
431 rc = VERR_NO_MEMORY;
432
433 LogFlow(("pdmR3DevHlp_SSMRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
434 return rc;
435}
436
437
438static DECLCALLBACK(int) pdmR3DevHlp_SSMPutStruct(PSSMHANDLE pSSM, const void *pvStruct, PCSSMFIELD paFields)
439{
440 RT_NOREF(pSSM, pvStruct, paFields);
441 AssertFailed();
442 return VERR_NOT_IMPLEMENTED;
443}
444
445
446static DECLCALLBACK(int) pdmR3DevHlp_SSMPutStructEx(PSSMHANDLE pSSM, const void *pvStruct, size_t cbStruct, uint32_t fFlags, PCSSMFIELD paFields, void *pvUser)
447{
448 RT_NOREF(pSSM, pvStruct, cbStruct, fFlags, paFields, pvUser);
449 AssertFailed();
450 return VERR_NOT_IMPLEMENTED;
451}
452
453
454static DECLCALLBACK(int) pdmR3DevHlp_SSMPutBool(PSSMHANDLE pSSM, bool fBool)
455{
456 RT_NOREF(pSSM, fBool);
457 AssertFailed();
458 return VERR_NOT_IMPLEMENTED;
459}
460
461
462static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU8(PSSMHANDLE pSSM, uint8_t u8)
463{
464 RT_NOREF(pSSM, u8);
465 AssertFailed();
466 return VERR_NOT_IMPLEMENTED;
467}
468
469
470static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS8(PSSMHANDLE pSSM, int8_t i8)
471{
472 RT_NOREF(pSSM, i8);
473 AssertFailed();
474 return VERR_NOT_IMPLEMENTED;
475}
476
477
478static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU16(PSSMHANDLE pSSM, uint16_t u16)
479{
480 RT_NOREF(pSSM, u16);
481 AssertFailed();
482 return VERR_NOT_IMPLEMENTED;
483}
484
485
486static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS16(PSSMHANDLE pSSM, int16_t i16)
487{
488 RT_NOREF(pSSM, i16);
489 AssertFailed();
490 return VERR_NOT_IMPLEMENTED;
491}
492
493
494static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU32(PSSMHANDLE pSSM, uint32_t u32)
495{
496 RT_NOREF(pSSM, u32);
497 AssertFailed();
498 return VERR_NOT_IMPLEMENTED;
499}
500
501
502static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS32(PSSMHANDLE pSSM, int32_t i32)
503{
504 RT_NOREF(pSSM, i32);
505 AssertFailed();
506 return VERR_NOT_IMPLEMENTED;
507}
508
509
510static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU64(PSSMHANDLE pSSM, uint64_t u64)
511{
512 RT_NOREF(pSSM, u64);
513 AssertFailed();
514 return VERR_NOT_IMPLEMENTED;
515}
516
517
518static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS64(PSSMHANDLE pSSM, int64_t i64)
519{
520 RT_NOREF(pSSM, i64);
521 AssertFailed();
522 return VERR_NOT_IMPLEMENTED;
523}
524
525
526static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU128(PSSMHANDLE pSSM, uint128_t u128)
527{
528 RT_NOREF(pSSM, u128);
529 AssertFailed();
530 return VERR_NOT_IMPLEMENTED;
531}
532
533
534static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS128(PSSMHANDLE pSSM, int128_t i128)
535{
536 RT_NOREF(pSSM, i128);
537 AssertFailed();
538 return VERR_NOT_IMPLEMENTED;
539}
540
541
542static DECLCALLBACK(int) pdmR3DevHlp_SSMPutUInt(PSSMHANDLE pSSM, RTUINT u)
543{
544 RT_NOREF(pSSM, u);
545 AssertFailed();
546 return VERR_NOT_IMPLEMENTED;
547}
548
549
550static DECLCALLBACK(int) pdmR3DevHlp_SSMPutSInt(PSSMHANDLE pSSM, RTINT i)
551{
552 RT_NOREF(pSSM, i);
553 AssertFailed();
554 return VERR_NOT_IMPLEMENTED;
555}
556
557
558static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCUInt(PSSMHANDLE pSSM, RTGCUINT u)
559{
560 RT_NOREF(pSSM, u);
561 AssertFailed();
562 return VERR_NOT_IMPLEMENTED;
563}
564
565
566static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCUIntReg(PSSMHANDLE pSSM, RTGCUINTREG u)
567{
568 RT_NOREF(pSSM, u);
569 AssertFailed();
570 return VERR_NOT_IMPLEMENTED;
571}
572
573
574static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCPhys32(PSSMHANDLE pSSM, RTGCPHYS32 GCPhys)
575{
576 RT_NOREF(pSSM, GCPhys);
577 AssertFailed();
578 return VERR_NOT_IMPLEMENTED;
579}
580
581
582static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCPhys64(PSSMHANDLE pSSM, RTGCPHYS64 GCPhys)
583{
584 RT_NOREF(pSSM, GCPhys);
585 AssertFailed();
586 return VERR_NOT_IMPLEMENTED;
587}
588
589
590static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCPhys(PSSMHANDLE pSSM, RTGCPHYS GCPhys)
591{
592 RT_NOREF(pSSM, GCPhys);
593 AssertFailed();
594 return VERR_NOT_IMPLEMENTED;
595}
596
597
598static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCPtr(PSSMHANDLE pSSM, RTGCPTR GCPtr)
599{
600 RT_NOREF(pSSM, GCPtr);
601 AssertFailed();
602 return VERR_NOT_IMPLEMENTED;
603}
604
605
606static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCUIntPtr(PSSMHANDLE pSSM, RTGCUINTPTR GCPtr)
607{
608 RT_NOREF(pSSM, GCPtr);
609 AssertFailed();
610 return VERR_NOT_IMPLEMENTED;
611}
612
613
614static DECLCALLBACK(int) pdmR3DevHlp_SSMPutRCPtr(PSSMHANDLE pSSM, RTRCPTR RCPtr)
615{
616 RT_NOREF(pSSM, RCPtr);
617 AssertFailed();
618 return VERR_NOT_IMPLEMENTED;
619}
620
621
622static DECLCALLBACK(int) pdmR3DevHlp_SSMPutIOPort(PSSMHANDLE pSSM, RTIOPORT IOPort)
623{
624 RT_NOREF(pSSM, IOPort);
625 AssertFailed();
626 return VERR_NOT_IMPLEMENTED;
627}
628
629
630static DECLCALLBACK(int) pdmR3DevHlp_SSMPutSel(PSSMHANDLE pSSM, RTSEL Sel)
631{
632 RT_NOREF(pSSM, Sel);
633 AssertFailed();
634 return VERR_NOT_IMPLEMENTED;
635}
636
637
638static DECLCALLBACK(int) pdmR3DevHlp_SSMPutMem(PSSMHANDLE pSSM, const void *pv, size_t cb)
639{
640 RT_NOREF(pSSM, pv, cb);
641 AssertFailed();
642 return VERR_NOT_IMPLEMENTED;
643}
644
645
646static DECLCALLBACK(int) pdmR3DevHlp_SSMPutStrZ(PSSMHANDLE pSSM, const char *psz)
647{
648 RT_NOREF(pSSM, psz);
649 AssertFailed();
650 return VERR_NOT_IMPLEMENTED;
651}
652
653
654static DECLCALLBACK(int) pdmR3DevHlp_SSMGetStruct(PSSMHANDLE pSSM, void *pvStruct, PCSSMFIELD paFields)
655{
656 RT_NOREF(pSSM, pvStruct, paFields);
657 AssertFailed();
658 return VERR_NOT_IMPLEMENTED;
659}
660
661
662static DECLCALLBACK(int) pdmR3DevHlp_SSMGetStructEx(PSSMHANDLE pSSM, void *pvStruct, size_t cbStruct, uint32_t fFlags, PCSSMFIELD paFields, void *pvUser)
663{
664 RT_NOREF(pSSM, pvStruct, cbStruct, fFlags, paFields, pvUser);
665 AssertFailed();
666 return VERR_NOT_IMPLEMENTED;
667}
668
669
670static DECLCALLBACK(int) pdmR3DevHlp_SSMGetBool(PSSMHANDLE pSSM, bool *pfBool)
671{
672 RT_NOREF(pSSM, pfBool);
673 AssertFailed();
674 return VERR_NOT_IMPLEMENTED;
675}
676
677
678static DECLCALLBACK(int) pdmR3DevHlp_SSMGetBoolV(PSSMHANDLE pSSM, bool volatile *pfBool)
679{
680 RT_NOREF(pSSM, pfBool);
681 AssertFailed();
682 return VERR_NOT_IMPLEMENTED;
683}
684
685
686static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU8(PSSMHANDLE pSSM, uint8_t *pu8)
687{
688 RT_NOREF(pSSM, pu8);
689 AssertFailed();
690 return VERR_NOT_IMPLEMENTED;
691}
692
693
694static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU8V(PSSMHANDLE pSSM, uint8_t volatile *pu8)
695{
696 RT_NOREF(pSSM, pu8);
697 AssertFailed();
698 return VERR_NOT_IMPLEMENTED;
699}
700
701
702static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS8(PSSMHANDLE pSSM, int8_t *pi8)
703{
704 RT_NOREF(pSSM, pi8);
705 AssertFailed();
706 return VERR_NOT_IMPLEMENTED;
707}
708
709
710static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS8V(PSSMHANDLE pSSM, int8_t volatile *pi8)
711{
712 RT_NOREF(pSSM, pi8);
713 AssertFailed();
714 return VERR_NOT_IMPLEMENTED;
715}
716
717
718static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU16(PSSMHANDLE pSSM, uint16_t *pu16)
719{
720 RT_NOREF(pSSM, pu16);
721 AssertFailed();
722 return VERR_NOT_IMPLEMENTED;
723}
724
725
726static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU16V(PSSMHANDLE pSSM, uint16_t volatile *pu16)
727{
728 RT_NOREF(pSSM, pu16);
729 AssertFailed();
730 return VERR_NOT_IMPLEMENTED;
731}
732
733
734static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS16(PSSMHANDLE pSSM, int16_t *pi16)
735{
736 RT_NOREF(pSSM, pi16);
737 AssertFailed();
738 return VERR_NOT_IMPLEMENTED;
739}
740
741
742static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS16V(PSSMHANDLE pSSM, int16_t volatile *pi16)
743{
744 RT_NOREF(pSSM, pi16);
745 AssertFailed();
746 return VERR_NOT_IMPLEMENTED;
747}
748
749
750static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU32(PSSMHANDLE pSSM, uint32_t *pu32)
751{
752 RT_NOREF(pSSM, pu32);
753 AssertFailed();
754 return VERR_NOT_IMPLEMENTED;
755}
756
757
758static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU32V(PSSMHANDLE pSSM, uint32_t volatile *pu32)
759{
760 RT_NOREF(pSSM, pu32);
761 AssertFailed();
762 return VERR_NOT_IMPLEMENTED;
763}
764
765
766static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS32(PSSMHANDLE pSSM, int32_t *pi32)
767{
768 RT_NOREF(pSSM, pi32);
769 AssertFailed();
770 return VERR_NOT_IMPLEMENTED;
771}
772
773
774static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS32V(PSSMHANDLE pSSM, int32_t volatile *pi32)
775{
776 RT_NOREF(pSSM, pi32);
777 AssertFailed();
778 return VERR_NOT_IMPLEMENTED;
779}
780
781
782static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU64(PSSMHANDLE pSSM, uint64_t *pu64)
783{
784 RT_NOREF(pSSM, pu64);
785 AssertFailed();
786 return VERR_NOT_IMPLEMENTED;
787}
788
789
790static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU64V(PSSMHANDLE pSSM, uint64_t volatile *pu64)
791{
792 RT_NOREF(pSSM, pu64);
793 AssertFailed();
794 return VERR_NOT_IMPLEMENTED;
795}
796
797
798static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS64(PSSMHANDLE pSSM, int64_t *pi64)
799{
800 RT_NOREF(pSSM, pi64);
801 AssertFailed();
802 return VERR_NOT_IMPLEMENTED;
803}
804
805
806static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS64V(PSSMHANDLE pSSM, int64_t volatile *pi64)
807{
808 RT_NOREF(pSSM, pi64);
809 AssertFailed();
810 return VERR_NOT_IMPLEMENTED;
811}
812
813
814static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU128(PSSMHANDLE pSSM, uint128_t *pu128)
815{
816 RT_NOREF(pSSM, pu128);
817 AssertFailed();
818 return VERR_NOT_IMPLEMENTED;
819}
820
821
822static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU128V(PSSMHANDLE pSSM, uint128_t volatile *pu128)
823{
824 RT_NOREF(pSSM, pu128);
825 AssertFailed();
826 return VERR_NOT_IMPLEMENTED;
827}
828
829
830static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS128(PSSMHANDLE pSSM, int128_t *pi128)
831{
832 RT_NOREF(pSSM, pi128);
833 AssertFailed();
834 return VERR_NOT_IMPLEMENTED;
835}
836
837
838static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS128V(PSSMHANDLE pSSM, int128_t volatile *pi128)
839{
840 RT_NOREF(pSSM, pi128);
841 AssertFailed();
842 return VERR_NOT_IMPLEMENTED;
843}
844
845
846static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys32(PSSMHANDLE pSSM, PRTGCPHYS32 pGCPhys)
847{
848 RT_NOREF(pSSM, pGCPhys);
849 AssertFailed();
850 return VERR_NOT_IMPLEMENTED;
851}
852
853
854static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys32V(PSSMHANDLE pSSM, RTGCPHYS32 volatile *pGCPhys)
855{
856 RT_NOREF(pSSM, pGCPhys);
857 AssertFailed();
858 return VERR_NOT_IMPLEMENTED;
859}
860
861
862static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys64(PSSMHANDLE pSSM, PRTGCPHYS64 pGCPhys)
863{
864 RT_NOREF(pSSM, pGCPhys);
865 AssertFailed();
866 return VERR_NOT_IMPLEMENTED;
867}
868
869
870static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys64V(PSSMHANDLE pSSM, RTGCPHYS64 volatile *pGCPhys)
871{
872 RT_NOREF(pSSM, pGCPhys);
873 AssertFailed();
874 return VERR_NOT_IMPLEMENTED;
875}
876
877
878static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys(PSSMHANDLE pSSM, PRTGCPHYS pGCPhys)
879{
880 RT_NOREF(pSSM, pGCPhys);
881 AssertFailed();
882 return VERR_NOT_IMPLEMENTED;
883}
884
885
886static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhysV(PSSMHANDLE pSSM, RTGCPHYS volatile *pGCPhys)
887{
888 RT_NOREF(pSSM, pGCPhys);
889 AssertFailed();
890 return VERR_NOT_IMPLEMENTED;
891}
892
893
894static DECLCALLBACK(int) pdmR3DevHlp_SSMGetUInt(PSSMHANDLE pSSM, PRTUINT pu)
895{
896 RT_NOREF(pSSM, pu);
897 AssertFailed();
898 return VERR_NOT_IMPLEMENTED;
899}
900
901
902static DECLCALLBACK(int) pdmR3DevHlp_SSMGetSInt(PSSMHANDLE pSSM, PRTINT pi)
903{
904 RT_NOREF(pSSM, pi);
905 AssertFailed();
906 return VERR_NOT_IMPLEMENTED;
907}
908
909
910static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCUInt(PSSMHANDLE pSSM, PRTGCUINT pu)
911{
912 RT_NOREF(pSSM, pu);
913 AssertFailed();
914 return VERR_NOT_IMPLEMENTED;
915}
916
917
918static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCUIntReg(PSSMHANDLE pSSM, PRTGCUINTREG pu)
919{
920 RT_NOREF(pSSM, pu);
921 AssertFailed();
922 return VERR_NOT_IMPLEMENTED;
923}
924
925
926static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPtr(PSSMHANDLE pSSM, PRTGCPTR pGCPtr)
927{
928 RT_NOREF(pSSM, pGCPtr);
929 AssertFailed();
930 return VERR_NOT_IMPLEMENTED;
931}
932
933
934static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCUIntPtr(PSSMHANDLE pSSM, PRTGCUINTPTR pGCPtr)
935{
936 RT_NOREF(pSSM, pGCPtr);
937 AssertFailed();
938 return VERR_NOT_IMPLEMENTED;
939}
940
941
942static DECLCALLBACK(int) pdmR3DevHlp_SSMGetRCPtr(PSSMHANDLE pSSM, PRTRCPTR pRCPtr)
943{
944 RT_NOREF(pSSM, pRCPtr);
945 AssertFailed();
946 return VERR_NOT_IMPLEMENTED;
947}
948
949
950static DECLCALLBACK(int) pdmR3DevHlp_SSMGetIOPort(PSSMHANDLE pSSM, PRTIOPORT pIOPort)
951{
952 RT_NOREF(pSSM, pIOPort);
953 AssertFailed();
954 return VERR_NOT_IMPLEMENTED;
955}
956
957
958static DECLCALLBACK(int) pdmR3DevHlp_SSMGetSel(PSSMHANDLE pSSM, PRTSEL pSel)
959{
960 RT_NOREF(pSSM, pSel);
961 AssertFailed();
962 return VERR_NOT_IMPLEMENTED;
963}
964
965
966static DECLCALLBACK(int) pdmR3DevHlp_SSMGetMem(PSSMHANDLE pSSM, void *pv, size_t cb)
967{
968 RT_NOREF(pSSM, pv, cb);
969 AssertFailed();
970 return VERR_NOT_IMPLEMENTED;
971}
972
973
974static DECLCALLBACK(int) pdmR3DevHlp_SSMGetStrZ(PSSMHANDLE pSSM, char *psz, size_t cbMax)
975{
976 RT_NOREF(pSSM, psz, cbMax);
977 AssertFailed();
978 return VERR_NOT_IMPLEMENTED;
979}
980
981
982static DECLCALLBACK(int) pdmR3DevHlp_SSMGetStrZEx(PSSMHANDLE pSSM, char *psz, size_t cbMax, size_t *pcbStr)
983{
984 RT_NOREF(pSSM, psz,cbMax, pcbStr);
985 AssertFailed();
986 return VERR_NOT_IMPLEMENTED;
987}
988
989
990static DECLCALLBACK(int) pdmR3DevHlp_SSMSkip(PSSMHANDLE pSSM, size_t cb)
991{
992 RT_NOREF(pSSM, cb);
993 AssertFailed();
994 return VERR_NOT_IMPLEMENTED;
995}
996
997
998static DECLCALLBACK(int) pdmR3DevHlp_SSMSkipToEndOfUnit(PSSMHANDLE pSSM)
999{
1000 RT_NOREF(pSSM);
1001 AssertFailed();
1002 return VERR_NOT_IMPLEMENTED;
1003}
1004
1005
1006static DECLCALLBACK(int) pdmR3DevHlp_SSMSetLoadError(PSSMHANDLE pSSM, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7)
1007{
1008 RT_NOREF(pSSM, rc, RT_SRC_POS_ARGS, pszFormat);
1009 AssertFailed();
1010 return VERR_NOT_IMPLEMENTED;
1011}
1012
1013
1014static DECLCALLBACK(int) pdmR3DevHlp_SSMSetLoadErrorV(PSSMHANDLE pSSM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(6, 0)
1015{
1016 RT_NOREF(pSSM, rc, RT_SRC_POS_ARGS, pszFormat, va);
1017 AssertFailed();
1018 return VERR_NOT_IMPLEMENTED;
1019}
1020
1021
1022static DECLCALLBACK(int) pdmR3DevHlp_SSMSetCfgError(PSSMHANDLE pSSM, RT_SRC_POS_DECL, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(5, 6)
1023{
1024 RT_NOREF(pSSM, RT_SRC_POS_ARGS, pszFormat);
1025 AssertFailed();
1026 return VERR_NOT_IMPLEMENTED;
1027}
1028
1029
1030static DECLCALLBACK(int) pdmR3DevHlp_SSMSetCfgErrorV(PSSMHANDLE pSSM, RT_SRC_POS_DECL, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(5, 0)
1031{
1032 RT_NOREF(pSSM, RT_SRC_POS_ARGS, pszFormat, va);
1033 AssertFailed();
1034 return VERR_NOT_IMPLEMENTED;
1035}
1036
1037
1038static DECLCALLBACK(int) pdmR3DevHlp_SSMHandleGetStatus(PSSMHANDLE pSSM)
1039{
1040 RT_NOREF(pSSM);
1041 AssertFailed();
1042 return VERR_NOT_IMPLEMENTED;
1043}
1044
1045
1046static DECLCALLBACK(SSMAFTER) pdmR3DevHlp_SSMHandleGetAfter(PSSMHANDLE pSSM)
1047{
1048 RT_NOREF(pSSM);
1049 AssertFailed();
1050 return SSMAFTER_INVALID;
1051}
1052
1053
1054static DECLCALLBACK(bool) pdmR3DevHlp_SSMHandleIsLiveSave(PSSMHANDLE pSSM)
1055{
1056 RT_NOREF(pSSM);
1057 AssertFailed();
1058 return false;
1059}
1060
1061
1062static DECLCALLBACK(uint32_t) pdmR3DevHlp_SSMHandleMaxDowntime(PSSMHANDLE pSSM)
1063{
1064 RT_NOREF(pSSM);
1065 AssertFailed();
1066 return 0;
1067}
1068
1069
1070static DECLCALLBACK(uint32_t) pdmR3DevHlp_SSMHandleHostBits(PSSMHANDLE pSSM)
1071{
1072 RT_NOREF(pSSM);
1073 AssertFailed();
1074 return 0;
1075}
1076
1077
1078static DECLCALLBACK(uint32_t) pdmR3DevHlp_SSMHandleRevision(PSSMHANDLE pSSM)
1079{
1080 RT_NOREF(pSSM);
1081 AssertFailed();
1082 return 0;
1083}
1084
1085
1086static DECLCALLBACK(uint32_t) pdmR3DevHlp_SSMHandleVersion(PSSMHANDLE pSSM)
1087{
1088 RT_NOREF(pSSM);
1089 AssertFailed();
1090 return 0;
1091}
1092
1093
1094static DECLCALLBACK(const char *) pdmR3DevHlp_SSMHandleHostOSAndArch(PSSMHANDLE pSSM)
1095{
1096 RT_NOREF(pSSM);
1097 AssertFailed();
1098 return NULL;
1099}
1100
1101
1102/** @interface_method_impl{PDMDEVHLPR3,pfnTMTimerCreate} */
1103static DECLCALLBACK(int) pdmR3DevHlp_TMTimerCreate(PPDMDEVINS pDevIns, TMCLOCK enmClock, PFNTMTIMERDEV pfnCallback, void *pvUser, uint32_t fFlags, const char *pszDesc, PPTMTIMERR3 ppTimer)
1104{
1105 PDMDEV_ASSERT_DEVINS(pDevIns);
1106 LogFlow(("pdmR3DevHlp_TMTimerCreate: caller='%s'/%d: enmClock=%d pfnCallback=%p pvUser=%p fFlags=%#x pszDesc=%p:{%s} ppTimer=%p\n",
1107 pDevIns->pReg->szName, pDevIns->iInstance, enmClock, pfnCallback, pvUser, fFlags, pszDesc, pszDesc, ppTimer));
1108
1109 int rc = VERR_NOT_IMPLEMENTED;
1110 AssertFailed();
1111
1112 LogFlow(("pdmR3DevHlp_TMTimerCreate: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
1113 return rc;
1114}
1115
1116
1117
1118/** @interface_method_impl{PDMDEVHLPR3,pfnTimerCreate} */
1119static DECLCALLBACK(int) pdmR3DevHlp_TimerCreate(PPDMDEVINS pDevIns, TMCLOCK enmClock, PFNTMTIMERDEV pfnCallback,
1120 void *pvUser, uint32_t fFlags, const char *pszDesc, PTMTIMERHANDLE phTimer)
1121{
1122 PDMDEV_ASSERT_DEVINS(pDevIns);
1123 LogFlow(("pdmR3DevHlp_TimerCreate: caller='%s'/%d: enmClock=%d pfnCallback=%p pvUser=%p fFlags=%#x pszDesc=%p:{%s} phTimer=%p\n",
1124 pDevIns->pReg->szName, pDevIns->iInstance, enmClock, pfnCallback, pvUser, fFlags, pszDesc, pszDesc, phTimer));
1125
1126 int rc = VINF_SUCCESS;
1127 PTMTIMERR3 pTimer = (PTMTIMERR3)RTMemAllocZ(sizeof(TMTIMER));
1128 if (RT_LIKELY(pTimer))
1129 {
1130 pTimer->enmClock = enmClock;
1131 pTimer->pfnCallbackDev = pfnCallback;
1132 pTimer->pvUser = pvUser;
1133 pTimer->fFlags = fFlags;
1134 RTListAppend(&pDevIns->Internal.s.pDut->LstTimers, &pTimer->NdDevTimers);
1135 *phTimer = (TMTIMERHANDLE)pTimer;
1136 }
1137 else
1138 rc = VERR_NO_MEMORY;
1139
1140 LogFlow(("pdmR3DevHlp_TimerCreate: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
1141 return rc;
1142}
1143
1144
1145/** @interface_method_impl{PDMDEVHLPR3,pfnTimerToPtr} */
1146static DECLCALLBACK(PTMTIMERR3) pdmR3DevHlp_TimerToPtr(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
1147{
1148 PDMDEV_ASSERT_DEVINS(pDevIns);
1149 RT_NOREF(pDevIns);
1150 return (PTMTIMERR3)hTimer;
1151}
1152
1153
1154/** @interface_method_impl{PDMDEVHLPR3,pfnTimerFromMicro} */
1155static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerFromMicro(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMicroSecs)
1156{
1157 RT_NOREF(pDevIns, hTimer, cMicroSecs);
1158 AssertFailed();
1159 return 0;
1160}
1161
1162
1163/** @interface_method_impl{PDMDEVHLPR3,pfnTimerFromMilli} */
1164static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerFromMilli(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMilliSecs)
1165{
1166 RT_NOREF(pDevIns, hTimer, cMilliSecs);
1167 AssertFailed();
1168 return 0;
1169}
1170
1171
1172/** @interface_method_impl{PDMDEVHLPR3,pfnTimerFromNano} */
1173static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerFromNano(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cNanoSecs)
1174{
1175 RT_NOREF(pDevIns, hTimer, cNanoSecs);
1176 AssertFailed();
1177 return 0;
1178}
1179
1180/** @interface_method_impl{PDMDEVHLPR3,pfnTimerGet} */
1181static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerGet(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
1182{
1183 RT_NOREF(pDevIns, hTimer);
1184 AssertFailed();
1185 return 0;
1186}
1187
1188
1189/** @interface_method_impl{PDMDEVHLPR3,pfnTimerGetFreq} */
1190static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerGetFreq(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
1191{
1192 PDMDEV_ASSERT_DEVINS(pDevIns);
1193
1194 PTMTIMERR3 pTimer = (PTMTIMERR3)hTimer;
1195 switch (pTimer->enmClock)
1196 {
1197 case TMCLOCK_VIRTUAL:
1198 case TMCLOCK_VIRTUAL_SYNC:
1199 return TMCLOCK_FREQ_VIRTUAL;
1200
1201 case TMCLOCK_REAL:
1202 return TMCLOCK_FREQ_REAL;
1203
1204 default:
1205 AssertMsgFailed(("Invalid enmClock=%d\n", pTimer->enmClock));
1206 return 0;
1207 }
1208}
1209
1210
1211/** @interface_method_impl{PDMDEVHLPR3,pfnTimerGetNano} */
1212static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerGetNano(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
1213{
1214 RT_NOREF(pDevIns, hTimer);
1215 AssertFailed();
1216 return 0;
1217}
1218
1219
1220/** @interface_method_impl{PDMDEVHLPR3,pfnTimerIsActive} */
1221static DECLCALLBACK(bool) pdmR3DevHlp_TimerIsActive(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
1222{
1223 RT_NOREF(pDevIns, hTimer);
1224 AssertFailed();
1225 return false;
1226}
1227
1228
1229/** @interface_method_impl{PDMDEVHLPR3,pfnTimerIsLockOwner} */
1230static DECLCALLBACK(bool) pdmR3DevHlp_TimerIsLockOwner(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
1231{
1232 RT_NOREF(pDevIns, hTimer);
1233 AssertFailed();
1234 return false;
1235}
1236
1237
1238/** @interface_method_impl{PDMDEVHLPR3,pfnTimerLockClock} */
1239static DECLCALLBACK(VBOXSTRICTRC) pdmR3DevHlp_TimerLockClock(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, int rcBusy)
1240{
1241 RT_NOREF(pDevIns, hTimer, rcBusy);
1242 int rc = VERR_NOT_IMPLEMENTED;
1243 AssertFailed();
1244 return rc;
1245}
1246
1247
1248/** @interface_method_impl{PDMDEVHLPR3,pfnTimerLockClock2} */
1249static DECLCALLBACK(VBOXSTRICTRC) pdmR3DevHlp_TimerLockClock2(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer,
1250 PPDMCRITSECT pCritSect, int rcBusy)
1251{
1252 RT_NOREF(pDevIns, hTimer, pCritSect, rcBusy);
1253 int rc = VERR_NOT_IMPLEMENTED;
1254 AssertFailed();
1255 return rc;
1256}
1257
1258
1259/** @interface_method_impl{PDMDEVHLPR3,pfnTimerSet} */
1260static DECLCALLBACK(int) pdmR3DevHlp_TimerSet(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t uExpire)
1261{
1262 RT_NOREF(pDevIns, hTimer, uExpire);
1263 int rc = VERR_NOT_IMPLEMENTED;
1264 AssertFailed();
1265 return rc;
1266}
1267
1268
1269/** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetFrequencyHint} */
1270static DECLCALLBACK(int) pdmR3DevHlp_TimerSetFrequencyHint(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint32_t uHz)
1271{
1272 RT_NOREF(pDevIns, hTimer, uHz);
1273 int rc = VERR_NOT_IMPLEMENTED;
1274 AssertFailed();
1275 return rc;
1276}
1277
1278
1279/** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetMicro} */
1280static DECLCALLBACK(int) pdmR3DevHlp_TimerSetMicro(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMicrosToNext)
1281{
1282 RT_NOREF(pDevIns, hTimer, cMicrosToNext);
1283 int rc = VERR_NOT_IMPLEMENTED;
1284 AssertFailed();
1285 return rc;
1286}
1287
1288
1289/** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetMillies} */
1290static DECLCALLBACK(int) pdmR3DevHlp_TimerSetMillies(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMilliesToNext)
1291{
1292 RT_NOREF(pDevIns, hTimer, cMilliesToNext);
1293 int rc = VERR_NOT_IMPLEMENTED;
1294 AssertFailed();
1295 return rc;
1296}
1297
1298
1299/** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetNano} */
1300static DECLCALLBACK(int) pdmR3DevHlp_TimerSetNano(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cNanosToNext)
1301{
1302 RT_NOREF(pDevIns, hTimer, cNanosToNext);
1303 int rc = VERR_NOT_IMPLEMENTED;
1304 AssertFailed();
1305 return rc;
1306}
1307
1308
1309/** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetRelative} */
1310static DECLCALLBACK(int) pdmR3DevHlp_TimerSetRelative(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cTicksToNext, uint64_t *pu64Now)
1311{
1312 RT_NOREF(pDevIns, hTimer, cTicksToNext, pu64Now);
1313 int rc = VERR_NOT_IMPLEMENTED;
1314 AssertFailed();
1315 return rc;
1316}
1317
1318
1319/** @interface_method_impl{PDMDEVHLPR3,pfnTimerStop} */
1320static DECLCALLBACK(int) pdmR3DevHlp_TimerStop(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
1321{
1322 RT_NOREF(pDevIns, hTimer);
1323
1324#if 1 /** @todo */
1325 int rc = VINF_SUCCESS;
1326#else
1327 int rc = VERR_NOT_IMPLEMENTED;
1328 AssertFailed();
1329#endif
1330
1331 return rc;
1332}
1333
1334
1335/** @interface_method_impl{PDMDEVHLPR3,pfnTimerUnlockClock} */
1336static DECLCALLBACK(void) pdmR3DevHlp_TimerUnlockClock(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
1337{
1338 RT_NOREF(pDevIns, hTimer);
1339 AssertFailed();
1340}
1341
1342
1343/** @interface_method_impl{PDMDEVHLPR3,pfnTimerUnlockClock2} */
1344static DECLCALLBACK(void) pdmR3DevHlp_TimerUnlockClock2(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PPDMCRITSECT pCritSect)
1345{
1346 RT_NOREF(pDevIns, hTimer, pCritSect);
1347 AssertFailed();
1348}
1349
1350
1351/** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetCritSect} */
1352static DECLCALLBACK(int) pdmR3DevHlp_TimerSetCritSect(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PPDMCRITSECT pCritSect)
1353{
1354 PDMDEV_ASSERT_DEVINS(pDevIns);
1355
1356 PTMTIMERR3 pTimer = (PTMTIMERR3)hTimer;
1357 pTimer->pCritSect = pCritSect;
1358 return VINF_SUCCESS;
1359}
1360
1361
1362/** @interface_method_impl{PDMDEVHLPR3,pfnTimerSave} */
1363static DECLCALLBACK(int) pdmR3DevHlp_TimerSave(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PSSMHANDLE pSSM)
1364{
1365 RT_NOREF(pDevIns, hTimer, pSSM);
1366 int rc = VERR_NOT_IMPLEMENTED;
1367 AssertFailed();
1368 return rc;
1369}
1370
1371
1372/** @interface_method_impl{PDMDEVHLPR3,pfnTimerLoad} */
1373static DECLCALLBACK(int) pdmR3DevHlp_TimerLoad(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PSSMHANDLE pSSM)
1374{
1375 RT_NOREF(pDevIns, hTimer, pSSM);
1376 int rc = VERR_NOT_IMPLEMENTED;
1377 AssertFailed();
1378 return rc;
1379}
1380
1381
1382/** @interface_method_impl{PDMDEVHLPR3,pfnTimerDestroy} */
1383static DECLCALLBACK(int) pdmR3DevHlp_TimerDestroy(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
1384{
1385 RT_NOREF(pDevIns, hTimer);
1386 int rc = VERR_NOT_IMPLEMENTED;
1387 AssertFailed();
1388 return rc;
1389}
1390
1391
1392static DECLCALLBACK(int) pdmR3DevHlp_TimerSkipLoad(PSSMHANDLE pSSM, bool *pfActive)
1393{
1394 RT_NOREF(pSSM, pfActive);
1395 int rc = VERR_NOT_IMPLEMENTED;
1396 AssertFailed();
1397 return rc;
1398}
1399
1400
1401/** @interface_method_impl{PDMDEVHLPR3,pfnTMUtcNow} */
1402static DECLCALLBACK(PRTTIMESPEC) pdmR3DevHlp_TMUtcNow(PPDMDEVINS pDevIns, PRTTIMESPEC pTime)
1403{
1404 PDMDEV_ASSERT_DEVINS(pDevIns);
1405 LogFlow(("pdmR3DevHlp_TMUtcNow: caller='%s'/%d: pTime=%p\n",
1406 pDevIns->pReg->szName, pDevIns->iInstance, pTime));
1407
1408 RT_NOREF(pDevIns, pTime);
1409 AssertFailed();
1410
1411 LogFlow(("pdmR3DevHlp_TMUtcNow: caller='%s'/%d: returns %RU64\n", pDevIns->pReg->szName, pDevIns->iInstance, RTTimeSpecGetNano(pTime)));
1412 return pTime;
1413}
1414
1415
1416static DECLCALLBACK(bool) pdmR3DevHlp_CFGMExists(PCFGMNODE pNode, const char *pszName)
1417{
1418 RT_NOREF(pNode, pszName);
1419 AssertFailed();
1420 return false;
1421}
1422
1423
1424static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryType(PCFGMNODE pNode, const char *pszName, PCFGMVALUETYPE penmType)
1425{
1426 RT_NOREF(pNode, pszName, penmType);
1427 AssertFailed();
1428 return VERR_NOT_IMPLEMENTED;
1429}
1430
1431
1432static DECLCALLBACK(int) pdmR3DevHlp_CFGMQuerySize(PCFGMNODE pNode, const char *pszName, size_t *pcb)
1433{
1434 if (!pNode)
1435 return VERR_CFGM_NO_PARENT;
1436
1437 PCTSTDEVCFGITEM pCfgItem;
1438 int rc = tstDev_CfgmR3ResolveItem(pNode->pDut->pTestcaseReg->paDevCfg, pszName, &pCfgItem);
1439 if (RT_SUCCESS(rc))
1440 {
1441 switch (pCfgItem->enmType)
1442 {
1443 case TSTDEVCFGITEMTYPE_INTEGER:
1444 *pcb = sizeof(uint64_t);
1445 break;
1446
1447 case TSTDEVCFGITEMTYPE_STRING:
1448 *pcb = strlen(pCfgItem->pszVal) + 1;
1449 break;
1450
1451 case TSTDEVCFGITEMTYPE_BYTES:
1452 AssertFailed();
1453 break;
1454
1455 default:
1456 rc = VERR_CFGM_IPE_1;
1457 AssertMsgFailed(("Invalid value type %d\n", pCfgItem->enmType));
1458 break;
1459 }
1460 }
1461 return rc;
1462}
1463
1464
1465static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryInteger(PCFGMNODE pNode, const char *pszName, uint64_t *pu64)
1466{
1467 if (!pNode)
1468 return VERR_CFGM_NO_PARENT;
1469
1470 PCTSTDEVCFGITEM pCfgItem;
1471 int rc = tstDev_CfgmR3ResolveItem(pNode->pDut->pTestcaseReg->paDevCfg, pszName, &pCfgItem);
1472 if (RT_SUCCESS(rc))
1473 {
1474 if (pCfgItem->enmType == TSTDEVCFGITEMTYPE_INTEGER)
1475 *pu64 = RTStrToUInt64(pCfgItem->pszVal);
1476 else
1477 rc = VERR_CFGM_NOT_INTEGER;
1478 }
1479
1480 return rc;
1481}
1482
1483
1484static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryIntegerDef(PCFGMNODE pNode, const char *pszName, uint64_t *pu64, uint64_t u64Def)
1485{
1486 int rc = pdmR3DevHlp_CFGMQueryInteger(pNode, pszName, pu64);
1487 if (RT_FAILURE(rc))
1488 {
1489 *pu64 = u64Def;
1490 if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT)
1491 rc = VINF_SUCCESS;
1492 }
1493
1494 return rc;
1495}
1496
1497
1498static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryString(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString)
1499{
1500 if (!pNode)
1501 return VERR_CFGM_NO_PARENT;
1502
1503 PCTSTDEVCFGITEM pCfgItem;
1504 int rc = tstDev_CfgmR3ResolveItem(pNode->pDut->pTestcaseReg->paDevCfg, pszName, &pCfgItem);
1505 if (RT_SUCCESS(rc))
1506 {
1507 switch (pCfgItem->enmType)
1508 {
1509 case TSTDEVCFGITEMTYPE_STRING:
1510 {
1511 size_t cchVal = strlen(pCfgItem->pszVal);
1512 if (cchString <= cchVal + 1)
1513 memcpy(pszString, pCfgItem->pszVal, cchVal);
1514 else
1515 rc = VERR_CFGM_NOT_ENOUGH_SPACE;
1516 break;
1517 }
1518 case TSTDEVCFGITEMTYPE_INTEGER:
1519 case TSTDEVCFGITEMTYPE_BYTES:
1520 default:
1521 rc = VERR_CFGM_IPE_1;
1522 AssertMsgFailed(("Invalid value type %d\n", pCfgItem->enmType));
1523 break;
1524 }
1525 }
1526 else
1527 rc = VERR_CFGM_VALUE_NOT_FOUND;
1528
1529 return rc;
1530}
1531
1532
1533static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryStringDef(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef)
1534{
1535 int rc = pdmR3DevHlp_CFGMQueryString(pNode, pszName, pszString, cchString);
1536 if (RT_FAILURE(rc) && rc != VERR_CFGM_NOT_ENOUGH_SPACE)
1537 {
1538 size_t cchDef = strlen(pszDef);
1539 if (cchString > cchDef)
1540 {
1541 memcpy(pszString, pszDef, cchDef);
1542 memset(pszString + cchDef, 0, cchString - cchDef);
1543 if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT)
1544 rc = VINF_SUCCESS;
1545 }
1546 else if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT)
1547 rc = VERR_CFGM_NOT_ENOUGH_SPACE;
1548 }
1549
1550 return rc;
1551}
1552
1553
1554static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryBytes(PCFGMNODE pNode, const char *pszName, void *pvData, size_t cbData)
1555{
1556 RT_NOREF(pNode, pszName, pvData, cbData);
1557 AssertFailed();
1558 return VERR_NOT_IMPLEMENTED;
1559}
1560
1561
1562static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU64(PCFGMNODE pNode, const char *pszName, uint64_t *pu64)
1563{
1564 return pdmR3DevHlp_CFGMQueryInteger(pNode, pszName, pu64);
1565}
1566
1567
1568static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU64Def(PCFGMNODE pNode, const char *pszName, uint64_t *pu64, uint64_t u64Def)
1569{
1570 return pdmR3DevHlp_CFGMQueryIntegerDef(pNode, pszName, pu64, u64Def);
1571}
1572
1573
1574static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS64(PCFGMNODE pNode, const char *pszName, int64_t *pi64)
1575{
1576 RT_NOREF(pNode, pszName, pi64);
1577 AssertFailed();
1578 return VERR_NOT_IMPLEMENTED;
1579}
1580
1581
1582static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS64Def(PCFGMNODE pNode, const char *pszName, int64_t *pi64, int64_t i64Def)
1583{
1584 RT_NOREF(pNode, pszName, pi64, i64Def);
1585 AssertFailed();
1586 return VERR_NOT_IMPLEMENTED;
1587}
1588
1589
1590static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU32(PCFGMNODE pNode, const char *pszName, uint32_t *pu32)
1591{
1592 uint64_t u64;
1593 int rc = pdmR3DevHlp_CFGMQueryInteger(pNode, pszName, &u64);
1594 if (RT_SUCCESS(rc))
1595 {
1596 if (!(u64 & UINT64_C(0xffffffff00000000)))
1597 *pu32 = (uint32_t)u64;
1598 else
1599 rc = VERR_CFGM_INTEGER_TOO_BIG;
1600 }
1601 return rc;
1602}
1603
1604
1605static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU32Def(PCFGMNODE pNode, const char *pszName, uint32_t *pu32, uint32_t u32Def)
1606{
1607 uint64_t u64;
1608 int rc = pdmR3DevHlp_CFGMQueryIntegerDef(pNode, pszName, &u64, u32Def);
1609 if (RT_SUCCESS(rc))
1610 {
1611 if (!(u64 & UINT64_C(0xffffffff00000000)))
1612 *pu32 = (uint32_t)u64;
1613 else
1614 rc = VERR_CFGM_INTEGER_TOO_BIG;
1615 }
1616 if (RT_FAILURE(rc))
1617 *pu32 = u32Def;
1618 return rc;
1619}
1620
1621
1622static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS32(PCFGMNODE pNode, const char *pszName, int32_t *pi32)
1623{
1624 uint64_t u64;
1625 int rc = pdmR3DevHlp_CFGMQueryInteger(pNode, pszName, &u64);
1626 if (RT_SUCCESS(rc))
1627 {
1628 if ( !(u64 & UINT64_C(0xffffffff80000000))
1629 || (u64 & UINT64_C(0xffffffff80000000)) == UINT64_C(0xffffffff80000000))
1630 *pi32 = (int32_t)u64;
1631 else
1632 rc = VERR_CFGM_INTEGER_TOO_BIG;
1633 }
1634 return rc;
1635}
1636
1637
1638static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS32Def(PCFGMNODE pNode, const char *pszName, int32_t *pi32, int32_t i32Def)
1639{
1640 uint64_t u64;
1641 int rc = pdmR3DevHlp_CFGMQueryIntegerDef(pNode, pszName, &u64, i32Def);
1642 if (RT_SUCCESS(rc))
1643 {
1644 if ( !(u64 & UINT64_C(0xffffffff80000000))
1645 || (u64 & UINT64_C(0xffffffff80000000)) == UINT64_C(0xffffffff80000000))
1646 *pi32 = (int32_t)u64;
1647 else
1648 rc = VERR_CFGM_INTEGER_TOO_BIG;
1649 }
1650 if (RT_FAILURE(rc))
1651 *pi32 = i32Def;
1652 return rc;
1653}
1654
1655
1656static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU16(PCFGMNODE pNode, const char *pszName, uint16_t *pu16)
1657{
1658 uint64_t u64;
1659 int rc = pdmR3DevHlp_CFGMQueryInteger(pNode, pszName, &u64);
1660 if (RT_SUCCESS(rc))
1661 {
1662 if (!(u64 & UINT64_C(0xffffffffffff0000)))
1663 *pu16 = (int16_t)u64;
1664 else
1665 rc = VERR_CFGM_INTEGER_TOO_BIG;
1666 }
1667 return rc;
1668}
1669
1670
1671static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU16Def(PCFGMNODE pNode, const char *pszName, uint16_t *pu16, uint16_t u16Def)
1672{
1673 uint64_t u64;
1674 int rc = pdmR3DevHlp_CFGMQueryIntegerDef(pNode, pszName, &u64, u16Def);
1675 if (RT_SUCCESS(rc))
1676 {
1677 if (!(u64 & UINT64_C(0xffffffffffff0000)))
1678 *pu16 = (int16_t)u64;
1679 else
1680 rc = VERR_CFGM_INTEGER_TOO_BIG;
1681 }
1682 if (RT_FAILURE(rc))
1683 *pu16 = u16Def;
1684 return rc;
1685}
1686
1687
1688static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS16(PCFGMNODE pNode, const char *pszName, int16_t *pi16)
1689{
1690 RT_NOREF(pNode, pszName, pi16);
1691 AssertFailed();
1692 return VERR_NOT_IMPLEMENTED;
1693}
1694
1695
1696static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS16Def(PCFGMNODE pNode, const char *pszName, int16_t *pi16, int16_t i16Def)
1697{
1698 RT_NOREF(pNode, pszName, pi16, i16Def);
1699 AssertFailed();
1700 return VERR_NOT_IMPLEMENTED;
1701}
1702
1703
1704static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU8(PCFGMNODE pNode, const char *pszName, uint8_t *pu8)
1705{
1706 uint64_t u64;
1707 int rc = pdmR3DevHlp_CFGMQueryInteger(pNode, pszName, &u64);
1708 if (RT_SUCCESS(rc))
1709 {
1710 if (!(u64 & UINT64_C(0xffffffffffffff00)))
1711 *pu8 = (uint8_t)u64;
1712 else
1713 rc = VERR_CFGM_INTEGER_TOO_BIG;
1714 }
1715 return rc;
1716}
1717
1718
1719static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU8Def(PCFGMNODE pNode, const char *pszName, uint8_t *pu8, uint8_t u8Def)
1720{
1721 uint64_t u64;
1722 int rc = pdmR3DevHlp_CFGMQueryIntegerDef(pNode, pszName, &u64, u8Def);
1723 if (RT_SUCCESS(rc))
1724 {
1725 if (!(u64 & UINT64_C(0xffffffffffffff00)))
1726 *pu8 = (uint8_t)u64;
1727 else
1728 rc = VERR_CFGM_INTEGER_TOO_BIG;
1729 }
1730 if (RT_FAILURE(rc))
1731 *pu8 = u8Def;
1732 return rc;
1733}
1734
1735
1736static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS8(PCFGMNODE pNode, const char *pszName, int8_t *pi8)
1737{
1738 RT_NOREF(pNode, pszName, pi8);
1739 AssertFailed();
1740 return VERR_NOT_IMPLEMENTED;
1741}
1742
1743
1744static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS8Def(PCFGMNODE pNode, const char *pszName, int8_t *pi8, int8_t i8Def)
1745{
1746 RT_NOREF(pNode, pszName, pi8, i8Def);
1747 AssertFailed();
1748 return VERR_NOT_IMPLEMENTED;
1749}
1750
1751
1752static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryBool(PCFGMNODE pNode, const char *pszName, bool *pf)
1753{
1754 uint64_t u64;
1755 int rc = pdmR3DevHlp_CFGMQueryInteger(pNode, pszName, &u64);
1756 if (RT_SUCCESS(rc))
1757 *pf = u64 ? true : false;
1758 return rc;
1759}
1760
1761
1762static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryBoolDef(PCFGMNODE pNode, const char *pszName, bool *pf, bool fDef)
1763{
1764 uint64_t u64;
1765 int rc = pdmR3DevHlp_CFGMQueryIntegerDef(pNode, pszName, &u64, fDef);
1766 *pf = u64 ? true : false;
1767 return rc;
1768}
1769
1770
1771static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryPort(PCFGMNODE pNode, const char *pszName, PRTIOPORT pPort)
1772{
1773 RT_NOREF(pNode, pszName, pPort);
1774 AssertFailed();
1775 return VERR_NOT_IMPLEMENTED;
1776}
1777
1778
1779static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryPortDef(PCFGMNODE pNode, const char *pszName, PRTIOPORT pPort, RTIOPORT PortDef)
1780{
1781 AssertCompileSize(RTIOPORT, 2);
1782 return pdmR3DevHlp_CFGMQueryU16Def(pNode, pszName, pPort, PortDef);
1783}
1784
1785
1786static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryUInt(PCFGMNODE pNode, const char *pszName, unsigned int *pu)
1787{
1788 RT_NOREF(pNode, pszName, pu);
1789 AssertFailed();
1790 return VERR_NOT_IMPLEMENTED;
1791}
1792
1793
1794static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryUIntDef(PCFGMNODE pNode, const char *pszName, unsigned int *pu, unsigned int uDef)
1795{
1796 RT_NOREF(pNode, pszName, pu, uDef);
1797 AssertFailed();
1798 return VERR_NOT_IMPLEMENTED;
1799}
1800
1801
1802static DECLCALLBACK(int) pdmR3DevHlp_CFGMQuerySInt(PCFGMNODE pNode, const char *pszName, signed int *pi)
1803{
1804 RT_NOREF(pNode, pszName, pi);
1805 AssertFailed();
1806 return VERR_NOT_IMPLEMENTED;
1807}
1808
1809
1810static DECLCALLBACK(int) pdmR3DevHlp_CFGMQuerySIntDef(PCFGMNODE pNode, const char *pszName, signed int *pi, signed int iDef)
1811{
1812 RT_NOREF(pNode, pszName, pi, iDef);
1813 AssertFailed();
1814 return VERR_NOT_IMPLEMENTED;
1815}
1816
1817
1818static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryPtr(PCFGMNODE pNode, const char *pszName, void **ppv)
1819{
1820 uint64_t u64;
1821 int rc = pdmR3DevHlp_CFGMQueryInteger(pNode, pszName, &u64);
1822 if (RT_SUCCESS(rc))
1823 {
1824 uintptr_t u = (uintptr_t)u64;
1825 if (u64 == u)
1826 *ppv = (void *)u;
1827 else
1828 rc = VERR_CFGM_INTEGER_TOO_BIG;
1829 }
1830 return rc;
1831}
1832
1833
1834static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryPtrDef(PCFGMNODE pNode, const char *pszName, void **ppv, void *pvDef)
1835{
1836 RT_NOREF(pNode, pszName, ppv, pvDef);
1837 AssertFailed();
1838 return VERR_NOT_IMPLEMENTED;
1839}
1840
1841
1842static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtr(PCFGMNODE pNode, const char *pszName, PRTGCPTR pGCPtr)
1843{
1844 RT_NOREF(pNode, pszName, pGCPtr);
1845 AssertFailed();
1846 return VERR_NOT_IMPLEMENTED;
1847}
1848
1849
1850static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrDef(PCFGMNODE pNode, const char *pszName, PRTGCPTR pGCPtr, RTGCPTR GCPtrDef)
1851{
1852 RT_NOREF(pNode, pszName, pGCPtr, GCPtrDef);
1853 AssertFailed();
1854 return VERR_NOT_IMPLEMENTED;
1855}
1856
1857
1858static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrU(PCFGMNODE pNode, const char *pszName, PRTGCUINTPTR pGCPtr)
1859{
1860 RT_NOREF(pNode, pszName, pGCPtr);
1861 AssertFailed();
1862 return VERR_NOT_IMPLEMENTED;
1863}
1864
1865
1866static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrUDef(PCFGMNODE pNode, const char *pszName, PRTGCUINTPTR pGCPtr, RTGCUINTPTR GCPtrDef)
1867{
1868 RT_NOREF(pNode, pszName, pGCPtr, GCPtrDef);
1869 AssertFailed();
1870 return VERR_NOT_IMPLEMENTED;
1871}
1872
1873
1874static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrS(PCFGMNODE pNode, const char *pszName, PRTGCINTPTR pGCPtr)
1875{
1876 RT_NOREF(pNode, pszName, pGCPtr);
1877 AssertFailed();
1878 return VERR_NOT_IMPLEMENTED;
1879}
1880
1881
1882static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrSDef(PCFGMNODE pNode, const char *pszName, PRTGCINTPTR pGCPtr, RTGCINTPTR GCPtrDef)
1883{
1884 RT_NOREF(pNode, pszName, pGCPtr, GCPtrDef);
1885 AssertFailed();
1886 return VERR_NOT_IMPLEMENTED;
1887}
1888
1889
1890static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryStringAlloc(PCFGMNODE pNode, const char *pszName, char **ppszString)
1891{
1892 RT_NOREF(pNode, pszName, ppszString);
1893 AssertFailed();
1894 return VERR_NOT_IMPLEMENTED;
1895}
1896
1897
1898static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryStringAllocDef(PCFGMNODE pNode, const char *pszName, char **ppszString, const char *pszDef)
1899{
1900 RT_NOREF(pNode, pszName, ppszString, pszDef);
1901 AssertFailed();
1902 return VERR_NOT_IMPLEMENTED;
1903}
1904
1905
1906static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetParent(PCFGMNODE pNode)
1907{
1908 RT_NOREF(pNode);
1909 AssertFailed();
1910 return NULL;
1911}
1912
1913
1914static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetChild(PCFGMNODE pNode, const char *pszPath)
1915{
1916 RT_NOREF(pNode, pszPath);
1917 AssertFailed();
1918 return NULL;
1919}
1920
1921
1922static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetChildF(PCFGMNODE pNode, const char *pszPathFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3)
1923{
1924 RT_NOREF(pNode, pszPathFormat);
1925 AssertFailed();
1926 return NULL;
1927}
1928
1929
1930static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetChildFV(PCFGMNODE pNode, const char *pszPathFormat, va_list Args) RT_IPRT_FORMAT_ATTR(3, 0)
1931{
1932 RT_NOREF(pNode, pszPathFormat, Args);
1933 AssertFailed();
1934 return NULL;
1935}
1936
1937
1938static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetFirstChild(PCFGMNODE pNode)
1939{
1940 RT_NOREF(pNode);
1941 AssertFailed();
1942 return NULL;
1943}
1944
1945
1946static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetNextChild(PCFGMNODE pCur)
1947{
1948 RT_NOREF(pCur);
1949 AssertFailed();
1950 return NULL;
1951}
1952
1953
1954static DECLCALLBACK(int) pdmR3DevHlp_CFGMGetName(PCFGMNODE pCur, char *pszName, size_t cchName)
1955{
1956 RT_NOREF(pCur, pszName, cchName);
1957 AssertFailed();
1958 return VERR_NOT_IMPLEMENTED;
1959}
1960
1961
1962static DECLCALLBACK(size_t) pdmR3DevHlp_CFGMGetNameLen(PCFGMNODE pCur)
1963{
1964 RT_NOREF(pCur);
1965 AssertFailed();
1966 return 0;
1967}
1968
1969
1970static DECLCALLBACK(bool) pdmR3DevHlp_CFGMAreChildrenValid(PCFGMNODE pNode, const char *pszzValid)
1971{
1972 RT_NOREF(pNode, pszzValid);
1973 AssertFailed();
1974 return false;
1975}
1976
1977
1978static DECLCALLBACK(PCFGMLEAF) pdmR3DevHlp_CFGMGetFirstValue(PCFGMNODE pCur)
1979{
1980 RT_NOREF(pCur);
1981 AssertFailed();
1982 return NULL;
1983}
1984
1985
1986static DECLCALLBACK(PCFGMLEAF) pdmR3DevHlp_CFGMGetNextValue(PCFGMLEAF pCur)
1987{
1988 RT_NOREF(pCur);
1989 AssertFailed();
1990 return NULL;
1991}
1992
1993
1994static DECLCALLBACK(int) pdmR3DevHlp_CFGMGetValueName(PCFGMLEAF pCur, char *pszName, size_t cchName)
1995{
1996 RT_NOREF(pCur, pszName, cchName);
1997 AssertFailed();
1998 return VERR_NOT_IMPLEMENTED;
1999}
2000
2001
2002static DECLCALLBACK(size_t) pdmR3DevHlp_CFGMGetValueNameLen(PCFGMLEAF pCur)
2003{
2004 RT_NOREF(pCur);
2005 AssertFailed();
2006 return 0;
2007}
2008
2009
2010static DECLCALLBACK(CFGMVALUETYPE) pdmR3DevHlp_CFGMGetValueType(PCFGMLEAF pCur)
2011{
2012 RT_NOREF(pCur);
2013 AssertFailed();
2014 return CFGMVALUETYPE_INTEGER;
2015}
2016
2017
2018static DECLCALLBACK(bool) pdmR3DevHlp_CFGMAreValuesValid(PCFGMNODE pNode, const char *pszzValid)
2019{
2020 if (pNode && pNode->pDut->pTestcaseReg->paDevCfg)
2021 {
2022 PCTSTDEVCFGITEM pDevCfgItem = pNode->pDut->pTestcaseReg->paDevCfg;
2023 while (pDevCfgItem->pszKey != NULL)
2024 {
2025 size_t cchKey = strlen(pDevCfgItem->pszKey);
2026
2027 /* search pszzValid for the name */
2028 const char *psz = pszzValid;
2029 while (*psz)
2030 {
2031 size_t cch = strlen(psz);
2032 if ( cch == cchKey
2033 && !memcmp(psz, pDevCfgItem->pszKey, cch))
2034 break;
2035
2036 /* next */
2037 psz += cch + 1;
2038 }
2039
2040 /* if at end of pszzValid we didn't find it => failure */
2041 if (!*psz)
2042 return false;
2043
2044 pDevCfgItem++;
2045 }
2046 }
2047
2048 return true;
2049}
2050
2051
2052static DECLCALLBACK(int) pdmR3DevHlp_CFGMValidateConfig(PCFGMNODE pNode, const char *pszNode,
2053 const char *pszValidValues, const char *pszValidNodes,
2054 const char *pszWho, uint32_t uInstance)
2055{
2056 RT_NOREF(pNode, pszNode, pszValidValues, pszValidNodes, pszWho, uInstance);
2057#if 1
2058 return VINF_SUCCESS;
2059#else
2060 AssertFailed();
2061 return VERR_NOT_IMPLEMENTED;
2062#endif
2063}
2064
2065
2066/** @interface_method_impl{PDMDEVHLPR3,pfnTMTimeVirtGet} */
2067static DECLCALLBACK(uint64_t) pdmR3DevHlp_TMTimeVirtGet(PPDMDEVINS pDevIns)
2068{
2069 PDMDEV_ASSERT_DEVINS(pDevIns);
2070 LogFlow(("pdmR3DevHlp_TMTimeVirtGet: caller='%s'/%d\n",
2071 pDevIns->pReg->szName, pDevIns->iInstance));
2072
2073 uint64_t u64Time = 0;
2074 AssertFailed();
2075
2076 LogFlow(("pdmR3DevHlp_TMTimeVirtGet: caller='%s'/%d: returns %RU64\n", pDevIns->pReg->szName, pDevIns->iInstance, u64Time));
2077 return u64Time;
2078}
2079
2080
2081/** @interface_method_impl{PDMDEVHLPR3,pfnTMTimeVirtGetFreq} */
2082static DECLCALLBACK(uint64_t) pdmR3DevHlp_TMTimeVirtGetFreq(PPDMDEVINS pDevIns)
2083{
2084 PDMDEV_ASSERT_DEVINS(pDevIns);
2085 LogFlow(("pdmR3DevHlp_TMTimeVirtGetFreq: caller='%s'/%d\n",
2086 pDevIns->pReg->szName, pDevIns->iInstance));
2087
2088 uint64_t u64Freq = 0;
2089 AssertFailed();
2090
2091 LogFlow(("pdmR3DevHlp_TMTimeVirtGetFreq: caller='%s'/%d: returns %RU64\n", pDevIns->pReg->szName, pDevIns->iInstance, u64Freq));
2092 return u64Freq;
2093}
2094
2095
2096/** @interface_method_impl{PDMDEVHLPR3,pfnTMTimeVirtGetNano} */
2097static DECLCALLBACK(uint64_t) pdmR3DevHlp_TMTimeVirtGetNano(PPDMDEVINS pDevIns)
2098{
2099 PDMDEV_ASSERT_DEVINS(pDevIns);
2100 LogFlow(("pdmR3DevHlp_TMTimeVirtGetNano: caller='%s'/%d\n",
2101 pDevIns->pReg->szName, pDevIns->iInstance));
2102
2103 uint64_t u64Nano = 0;
2104 AssertFailed();
2105
2106 LogFlow(("pdmR3DevHlp_TMTimeVirtGetNano: caller='%s'/%d: returns %RU64\n", pDevIns->pReg->szName, pDevIns->iInstance, u64Nano));
2107 return u64Nano;
2108}
2109
2110
2111/** @interface_method_impl{PDMDEVHLPR3,pfnGetSupDrvSession} */
2112static DECLCALLBACK(PSUPDRVSESSION) pdmR3DevHlp_GetSupDrvSession(PPDMDEVINS pDevIns)
2113{
2114 PDMDEV_ASSERT_DEVINS(pDevIns);
2115 LogFlow(("pdmR3DevHlp_GetSupDrvSession: caller='%s'/%d\n",
2116 pDevIns->pReg->szName, pDevIns->iInstance));
2117
2118 PSUPDRVSESSION pSession = NIL_RTR0PTR;
2119 AssertFailed();
2120
2121 LogFlow(("pdmR3DevHlp_GetSupDrvSession: caller='%s'/%d: returns %#p\n", pDevIns->pReg->szName, pDevIns->iInstance, pSession));
2122 return pSession;
2123}
2124
2125
2126/** @interface_method_impl{PDMDEVHLPR3,pfnQueryGenericUserObject} */
2127static DECLCALLBACK(void *) pdmR3DevHlp_QueryGenericUserObject(PPDMDEVINS pDevIns, PCRTUUID pUuid)
2128{
2129 PDMDEV_ASSERT_DEVINS(pDevIns);
2130 LogFlow(("pdmR3DevHlp_QueryGenericUserObject: caller='%s'/%d: pUuid=%p:%RTuuid\n",
2131 pDevIns->pReg->szName, pDevIns->iInstance, pUuid, pUuid));
2132
2133#if defined(DEBUG_bird) || defined(DEBUG_ramshankar) || defined(DEBUG_sunlover) || defined(DEBUG_michael) || defined(DEBUG_andy)
2134 AssertMsgFailed(("'%s' wants %RTuuid - external only interface!\n", pDevIns->pReg->szName, pUuid));
2135#endif
2136
2137 void *pvRet = NULL;
2138 AssertFailed();
2139
2140 LogRel(("pdmR3DevHlp_QueryGenericUserObject: caller='%s'/%d: returns %#p for %RTuuid\n",
2141 pDevIns->pReg->szName, pDevIns->iInstance, pvRet, pUuid));
2142 return pvRet;
2143}
2144
2145
2146/** @interface_method_impl{PDMDEVHLPR3,pfnPhysRead} */
2147static DECLCALLBACK(int) pdmR3DevHlp_PhysRead(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead)
2148{
2149 PDMDEV_ASSERT_DEVINS(pDevIns);
2150 LogFlow(("pdmR3DevHlp_PhysRead: caller='%s'/%d: GCPhys=%RGp pvBuf=%p cbRead=%#x\n",
2151 pDevIns->pReg->szName, pDevIns->iInstance, GCPhys, pvBuf, cbRead));
2152
2153 VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED;;
2154 AssertFailed();
2155
2156 Log(("pdmR3DevHlp_PhysRead: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict) ));
2157 return VBOXSTRICTRC_VAL(rcStrict);
2158}
2159
2160
2161/** @interface_method_impl{PDMDEVHLPR3,pfnPhysWrite} */
2162static DECLCALLBACK(int) pdmR3DevHlp_PhysWrite(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite)
2163{
2164 PDMDEV_ASSERT_DEVINS(pDevIns);
2165 LogFlow(("pdmR3DevHlp_PhysWrite: caller='%s'/%d: GCPhys=%RGp pvBuf=%p cbWrite=%#x\n",
2166 pDevIns->pReg->szName, pDevIns->iInstance, GCPhys, pvBuf, cbWrite));
2167
2168 VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED;;
2169 AssertFailed();
2170
2171 Log(("pdmR3DevHlp_PhysWrite: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict) ));
2172 return VBOXSTRICTRC_VAL(rcStrict);
2173}
2174
2175
2176/** @interface_method_impl{PDMDEVHLPR3,pfnPhysGCPhys2CCPtr} */
2177static DECLCALLBACK(int) pdmR3DevHlp_PhysGCPhys2CCPtr(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t fFlags, void **ppv, PPGMPAGEMAPLOCK pLock)
2178{
2179 PDMDEV_ASSERT_DEVINS(pDevIns);
2180 LogFlow(("pdmR3DevHlp_PhysGCPhys2CCPtr: caller='%s'/%d: GCPhys=%RGp fFlags=%#x ppv=%p pLock=%p\n",
2181 pDevIns->pReg->szName, pDevIns->iInstance, GCPhys, fFlags, ppv, pLock));
2182 AssertReturn(!fFlags, VERR_INVALID_PARAMETER);
2183
2184 int rc = VERR_NOT_IMPLEMENTED;;
2185 AssertFailed();
2186
2187 Log(("pdmR3DevHlp_PhysGCPhys2CCPtr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2188 return rc;
2189}
2190
2191
2192/** @interface_method_impl{PDMDEVHLPR3,pfnPhysGCPhys2CCPtrReadOnly} */
2193static DECLCALLBACK(int) pdmR3DevHlp_PhysGCPhys2CCPtrReadOnly(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t fFlags, const void **ppv, PPGMPAGEMAPLOCK pLock)
2194{
2195 PDMDEV_ASSERT_DEVINS(pDevIns);
2196 LogFlow(("pdmR3DevHlp_PhysGCPhys2CCPtrReadOnly: caller='%s'/%d: GCPhys=%RGp fFlags=%#x ppv=%p pLock=%p\n",
2197 pDevIns->pReg->szName, pDevIns->iInstance, GCPhys, fFlags, ppv, pLock));
2198 AssertReturn(!fFlags, VERR_INVALID_PARAMETER);
2199
2200 int rc = VERR_NOT_IMPLEMENTED;;
2201 AssertFailed();
2202
2203 Log(("pdmR3DevHlp_PhysGCPhys2CCPtrReadOnly: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2204 return rc;
2205}
2206
2207
2208/** @interface_method_impl{PDMDEVHLPR3,pfnPhysReleasePageMappingLock} */
2209static DECLCALLBACK(void) pdmR3DevHlp_PhysReleasePageMappingLock(PPDMDEVINS pDevIns, PPGMPAGEMAPLOCK pLock)
2210{
2211 PDMDEV_ASSERT_DEVINS(pDevIns);
2212 LogFlow(("pdmR3DevHlp_PhysReleasePageMappingLock: caller='%s'/%d: pLock=%p\n",
2213 pDevIns->pReg->szName, pDevIns->iInstance, pLock));
2214
2215 AssertFailed();
2216
2217 Log(("pdmR3DevHlp_PhysReleasePageMappingLock: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance));
2218}
2219
2220
2221/** @interface_method_impl{PDMDEVHLPR3,pfnPhysBulkGCPhys2CCPtr} */
2222static DECLCALLBACK(int) pdmR3DevHlp_PhysBulkGCPhys2CCPtr(PPDMDEVINS pDevIns, uint32_t cPages, PCRTGCPHYS paGCPhysPages,
2223 uint32_t fFlags, void **papvPages, PPGMPAGEMAPLOCK paLocks)
2224{
2225 PDMDEV_ASSERT_DEVINS(pDevIns);
2226 LogFlow(("pdmR3DevHlp_PhysBulkGCPhys2CCPtr: caller='%s'/%d: cPages=%#x paGCPhysPages=%p (%RGp,..) fFlags=%#x papvPages=%p paLocks=%p\n",
2227 pDevIns->pReg->szName, pDevIns->iInstance, cPages, paGCPhysPages, paGCPhysPages[0], fFlags, papvPages, paLocks));
2228 AssertReturn(!fFlags, VERR_INVALID_PARAMETER);
2229 AssertReturn(cPages > 0, VERR_INVALID_PARAMETER);
2230
2231 int rc = VERR_NOT_IMPLEMENTED;;
2232 AssertFailed();
2233
2234 Log(("pdmR3DevHlp_PhysBulkGCPhys2CCPtr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2235 return rc;
2236}
2237
2238
2239/** @interface_method_impl{PDMDEVHLPR3,pfnPhysBulkGCPhys2CCPtrReadOnly} */
2240static DECLCALLBACK(int) pdmR3DevHlp_PhysBulkGCPhys2CCPtrReadOnly(PPDMDEVINS pDevIns, uint32_t cPages, PCRTGCPHYS paGCPhysPages,
2241 uint32_t fFlags, const void **papvPages, PPGMPAGEMAPLOCK paLocks)
2242{
2243 PDMDEV_ASSERT_DEVINS(pDevIns);
2244 LogFlow(("pdmR3DevHlp_PhysBulkGCPhys2CCPtrReadOnly: caller='%s'/%d: cPages=%#x paGCPhysPages=%p (%RGp,...) fFlags=%#x papvPages=%p paLocks=%p\n",
2245 pDevIns->pReg->szName, pDevIns->iInstance, cPages, paGCPhysPages, paGCPhysPages[0], fFlags, papvPages, paLocks));
2246 AssertReturn(!fFlags, VERR_INVALID_PARAMETER);
2247 AssertReturn(cPages > 0, VERR_INVALID_PARAMETER);
2248
2249 int rc = VERR_NOT_IMPLEMENTED;;
2250 AssertFailed();
2251
2252 Log(("pdmR3DevHlp_PhysBulkGCPhys2CCPtrReadOnly: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2253 return rc;
2254}
2255
2256
2257/** @interface_method_impl{PDMDEVHLPR3,pfnPhysBulkReleasePageMappingLocks} */
2258static DECLCALLBACK(void) pdmR3DevHlp_PhysBulkReleasePageMappingLocks(PPDMDEVINS pDevIns, uint32_t cPages, PPGMPAGEMAPLOCK paLocks)
2259{
2260 PDMDEV_ASSERT_DEVINS(pDevIns);
2261 LogFlow(("pdmR3DevHlp_PhysBulkReleasePageMappingLocks: caller='%s'/%d: cPages=%#x paLocks=%p\n",
2262 pDevIns->pReg->szName, pDevIns->iInstance, cPages, paLocks));
2263 Assert(cPages > 0);
2264
2265 AssertFailed();
2266
2267 Log(("pdmR3DevHlp_PhysBulkReleasePageMappingLocks: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance));
2268}
2269
2270
2271/** @interface_method_impl{PDMDEVHLPR3,pfnPhysReadGCVirt} */
2272static DECLCALLBACK(int) pdmR3DevHlp_PhysReadGCVirt(PPDMDEVINS pDevIns, void *pvDst, RTGCPTR GCVirtSrc, size_t cb)
2273{
2274 PDMDEV_ASSERT_DEVINS(pDevIns);
2275 LogFlow(("pdmR3DevHlp_PhysReadGCVirt: caller='%s'/%d: pvDst=%p GCVirt=%RGv cb=%#x\n",
2276 pDevIns->pReg->szName, pDevIns->iInstance, pvDst, GCVirtSrc, cb));
2277
2278 int rc = VERR_NOT_IMPLEMENTED;;
2279 AssertFailed();
2280
2281 LogFlow(("pdmR3DevHlp_PhysReadGCVirt: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2282
2283 return rc;
2284}
2285
2286
2287/** @interface_method_impl{PDMDEVHLPR3,pfnPhysWriteGCVirt} */
2288static DECLCALLBACK(int) pdmR3DevHlp_PhysWriteGCVirt(PPDMDEVINS pDevIns, RTGCPTR GCVirtDst, const void *pvSrc, size_t cb)
2289{
2290 PDMDEV_ASSERT_DEVINS(pDevIns);
2291 LogFlow(("pdmR3DevHlp_PhysWriteGCVirt: caller='%s'/%d: GCVirtDst=%RGv pvSrc=%p cb=%#x\n",
2292 pDevIns->pReg->szName, pDevIns->iInstance, GCVirtDst, pvSrc, cb));
2293
2294 int rc = VERR_NOT_IMPLEMENTED;;
2295 AssertFailed();
2296
2297 LogFlow(("pdmR3DevHlp_PhysWriteGCVirt: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2298
2299 return rc;
2300}
2301
2302
2303/** @interface_method_impl{PDMDEVHLPR3,pfnPhysGCPtr2GCPhys} */
2304static DECLCALLBACK(int) pdmR3DevHlp_PhysGCPtr2GCPhys(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTGCPHYS pGCPhys)
2305{
2306 PDMDEV_ASSERT_DEVINS(pDevIns);
2307 LogFlow(("pdmR3DevHlp_PhysGCPtr2GCPhys: caller='%s'/%d: GCPtr=%RGv pGCPhys=%p\n",
2308 pDevIns->pReg->szName, pDevIns->iInstance, GCPtr, pGCPhys));
2309
2310 int rc = VERR_NOT_IMPLEMENTED;
2311 AssertFailed();
2312
2313 LogFlow(("pdmR3DevHlp_PhysGCPtr2GCPhys: caller='%s'/%d: returns %Rrc *pGCPhys=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *pGCPhys));
2314
2315 return rc;
2316}
2317
2318
2319/** @interface_method_impl{PDMDEVHLPR3,pfnMMHeapAlloc} */
2320static DECLCALLBACK(void *) pdmR3DevHlp_MMHeapAlloc(PPDMDEVINS pDevIns, size_t cb)
2321{
2322 PDMDEV_ASSERT_DEVINS(pDevIns);
2323 LogFlow(("pdmR3DevHlp_MMHeapAlloc: caller='%s'/%d: cb=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, cb));
2324
2325 void *pv = NULL;
2326 AssertFailed();
2327
2328 LogFlow(("pdmR3DevHlp_MMHeapAlloc: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pv));
2329 return pv;
2330}
2331
2332
2333/** @interface_method_impl{PDMDEVHLPR3,pfnMMHeapAllocZ} */
2334static DECLCALLBACK(void *) pdmR3DevHlp_MMHeapAllocZ(PPDMDEVINS pDevIns, size_t cb)
2335{
2336 PDMDEV_ASSERT_DEVINS(pDevIns);
2337 LogFlow(("pdmR3DevHlp_MMHeapAllocZ: caller='%s'/%d: cb=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, cb));
2338
2339 void *pv = NULL;
2340 AssertFailed();
2341
2342 LogFlow(("pdmR3DevHlp_MMHeapAllocZ: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pv));
2343 return pv;
2344}
2345
2346
2347/** @interface_method_impl{PDMDEVHLPR3,pfnMMHeapFree} */
2348static DECLCALLBACK(void) pdmR3DevHlp_MMHeapFree(PPDMDEVINS pDevIns, void *pv)
2349{
2350 PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF_PV(pDevIns);
2351 LogFlow(("pdmR3DevHlp_MMHeapFree: caller='%s'/%d: pv=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pv));
2352
2353 PTSTDEVMMHEAPALLOC pHeapAlloc = (PTSTDEVMMHEAPALLOC)((uint8_t *)pv - RT_UOFFSETOF(TSTDEVMMHEAPALLOC, abAlloc[0]));
2354 PTSTDEVDUTINT pThis = pHeapAlloc->pDut;
2355
2356 tstDevDutLockExcl(pThis);
2357 RTListNodeRemove(&pHeapAlloc->NdMmHeap);
2358 tstDevDutUnlockExcl(pThis);
2359
2360 /* Poison */
2361 memset(&pHeapAlloc->abAlloc[0], 0xfc, pHeapAlloc->cbAlloc);
2362 RTMemFree(pHeapAlloc);
2363
2364 LogFlow(("pdmR3DevHlp_MMHeapAlloc: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance));
2365}
2366
2367
2368/** @interface_method_impl{PDMDEVHLPR3,pfnVMState} */
2369static DECLCALLBACK(VMSTATE) pdmR3DevHlp_VMState(PPDMDEVINS pDevIns)
2370{
2371 PDMDEV_ASSERT_DEVINS(pDevIns);
2372
2373 VMSTATE enmVMState = VMSTATE_CREATING;
2374 AssertFailed();
2375
2376 LogFlow(("pdmR3DevHlp_VMState: caller='%s'/%d: returns %d\n", pDevIns->pReg->szName, pDevIns->iInstance,
2377 enmVMState));
2378 return enmVMState;
2379}
2380
2381
2382/** @interface_method_impl{PDMDEVHLPR3,pfnVMTeleportedAndNotFullyResumedYet} */
2383static DECLCALLBACK(bool) pdmR3DevHlp_VMTeleportedAndNotFullyResumedYet(PPDMDEVINS pDevIns)
2384{
2385 PDMDEV_ASSERT_DEVINS(pDevIns);
2386
2387 bool fRc = false;
2388 AssertFailed();
2389
2390 LogFlow(("pdmR3DevHlp_VMState: caller='%s'/%d: returns %RTbool\n", pDevIns->pReg->szName, pDevIns->iInstance,
2391 fRc));
2392 return fRc;
2393}
2394
2395
2396/** @interface_method_impl{PDMDEVHLPR3,pfnVMSetError} */
2397static DECLCALLBACK(int) pdmR3DevHlp_VMSetError(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...)
2398{
2399 PDMDEV_ASSERT_DEVINS(pDevIns);
2400
2401 RT_NOREF(pDevIns, rc, RT_SRC_POS_ARGS, pszFormat);
2402 AssertFailed();
2403
2404 return VERR_NOT_IMPLEMENTED;
2405}
2406
2407
2408/** @interface_method_impl{PDMDEVHLPR3,pfnVMSetErrorV} */
2409static DECLCALLBACK(int) pdmR3DevHlp_VMSetErrorV(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
2410{
2411 PDMDEV_ASSERT_DEVINS(pDevIns);
2412
2413 RT_NOREF(pDevIns, rc, RT_SRC_POS_ARGS, pszFormat, va);
2414 AssertFailed();
2415
2416 return VERR_NOT_IMPLEMENTED;
2417}
2418
2419
2420/** @interface_method_impl{PDMDEVHLPR3,pfnVMSetRuntimeError} */
2421static DECLCALLBACK(int) pdmR3DevHlp_VMSetRuntimeError(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)
2422{
2423 PDMDEV_ASSERT_DEVINS(pDevIns);
2424
2425 RT_NOREF(pDevIns, fFlags, pszErrorId, pszFormat);
2426 int rc = VERR_NOT_IMPLEMENTED;
2427 AssertFailed();
2428
2429 return rc;
2430}
2431
2432
2433/** @interface_method_impl{PDMDEVHLPR3,pfnVMSetRuntimeErrorV} */
2434static DECLCALLBACK(int) pdmR3DevHlp_VMSetRuntimeErrorV(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)
2435{
2436 PDMDEV_ASSERT_DEVINS(pDevIns);
2437
2438 RT_NOREF(pDevIns, fFlags, pszErrorId, pszFormat, va);
2439 int rc = VERR_NOT_IMPLEMENTED;
2440 AssertFailed();
2441
2442 return rc;
2443}
2444
2445
2446/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFStopV} */
2447static DECLCALLBACK(int) pdmR3DevHlp_DBGFStopV(PPDMDEVINS pDevIns, const char *pszFile, unsigned iLine, const char *pszFunction, const char *pszFormat, va_list args)
2448{
2449 PDMDEV_ASSERT_DEVINS(pDevIns);
2450#ifdef LOG_ENABLED
2451 va_list va2;
2452 va_copy(va2, args);
2453 LogFlow(("pdmR3DevHlp_DBGFStopV: caller='%s'/%d: pszFile=%p:{%s} iLine=%d pszFunction=%p:{%s} pszFormat=%p:{%s} (%N)\n",
2454 pDevIns->pReg->szName, pDevIns->iInstance, pszFile, pszFile, iLine, pszFunction, pszFunction, pszFormat, pszFormat, pszFormat, &va2));
2455 va_end(va2);
2456#endif
2457
2458 int rc = VERR_NOT_IMPLEMENTED;
2459 AssertFailed();
2460
2461 LogFlow(("pdmR3DevHlp_DBGFStopV: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2462 return rc;
2463}
2464
2465
2466/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFInfoRegister} */
2467static DECLCALLBACK(int) pdmR3DevHlp_DBGFInfoRegister(PPDMDEVINS pDevIns, const char *pszName, const char *pszDesc, PFNDBGFHANDLERDEV pfnHandler)
2468{
2469 PDMDEV_ASSERT_DEVINS(pDevIns);
2470 LogFlow(("pdmR3DevHlp_DBGFInfoRegister: caller='%s'/%d: pszName=%p:{%s} pszDesc=%p:{%s} pfnHandler=%p\n",
2471 pDevIns->pReg->szName, pDevIns->iInstance, pszName, pszName, pszDesc, pszDesc, pfnHandler));
2472
2473 int rc = VERR_NOT_IMPLEMENTED;
2474 AssertFailed();
2475
2476 LogFlow(("pdmR3DevHlp_DBGFInfoRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2477 return rc;
2478}
2479
2480
2481/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFInfoRegisterArgv} */
2482static DECLCALLBACK(int) pdmR3DevHlp_DBGFInfoRegisterArgv(PPDMDEVINS pDevIns, const char *pszName, const char *pszDesc, PFNDBGFINFOARGVDEV pfnHandler)
2483{
2484 PDMDEV_ASSERT_DEVINS(pDevIns);
2485 LogFlow(("pdmR3DevHlp_DBGFInfoRegisterArgv: caller='%s'/%d: pszName=%p:{%s} pszDesc=%p:{%s} pfnHandler=%p\n",
2486 pDevIns->pReg->szName, pDevIns->iInstance, pszName, pszName, pszDesc, pszDesc, pfnHandler));
2487
2488 int rc = VERR_NOT_IMPLEMENTED;
2489 AssertFailed();
2490
2491 LogFlow(("pdmR3DevHlp_DBGFInfoRegisterArgv: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2492 return rc;
2493}
2494
2495
2496/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFRegRegister} */
2497static DECLCALLBACK(int) pdmR3DevHlp_DBGFRegRegister(PPDMDEVINS pDevIns, PCDBGFREGDESC paRegisters)
2498{
2499 PDMDEV_ASSERT_DEVINS(pDevIns);
2500 LogFlow(("pdmR3DevHlp_DBGFRegRegister: caller='%s'/%d: paRegisters=%p\n",
2501 pDevIns->pReg->szName, pDevIns->iInstance, paRegisters));
2502
2503 int rc = VERR_NOT_IMPLEMENTED;
2504 AssertFailed();
2505
2506 LogFlow(("pdmR3DevHlp_DBGFRegRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2507 return rc;
2508}
2509
2510
2511/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFTraceBuf} */
2512static DECLCALLBACK(RTTRACEBUF) pdmR3DevHlp_DBGFTraceBuf(PPDMDEVINS pDevIns)
2513{
2514 PDMDEV_ASSERT_DEVINS(pDevIns);
2515 RTTRACEBUF hTraceBuf = NIL_RTTRACEBUF;
2516 AssertFailed();
2517 LogFlow(("pdmR3DevHlp_DBGFTraceBuf: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, hTraceBuf));
2518 return hTraceBuf;
2519}
2520
2521
2522/** @interface_method_impl{PDMDEVHLPR3,pfnSTAMRegister} */
2523static DECLCALLBACK(void) pdmR3DevHlp_STAMRegister(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, const char *pszName,
2524 STAMUNIT enmUnit, const char *pszDesc)
2525{
2526 PDMDEV_ASSERT_DEVINS(pDevIns);
2527
2528 RT_NOREF(pDevIns, pvSample, enmType, pszName, enmUnit, pszDesc);
2529 AssertFailed();
2530}
2531
2532
2533/** @interface_method_impl{PDMDEVHLPR3,pfnSTAMRegisterV} */
2534static DECLCALLBACK(void) pdmR3DevHlp_STAMRegisterV(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility,
2535 STAMUNIT enmUnit, const char *pszDesc, const char *pszName, va_list args)
2536{
2537 PDMDEV_ASSERT_DEVINS(pDevIns);
2538
2539 RT_NOREF(pDevIns, pvSample, enmType, enmVisibility, enmUnit, pszDesc, pszName, args);
2540 AssertFailed();
2541}
2542
2543
2544/**
2545 * @interface_method_impl{PDMDEVHLPR3,pfnPCIRegister}
2546 */
2547static DECLCALLBACK(int) pdmR3DevHlp_PCIRegister(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t fFlags,
2548 uint8_t uPciDevNo, uint8_t uPciFunNo, const char *pszName)
2549{
2550 PDMDEV_ASSERT_DEVINS(pDevIns);
2551 LogFlow(("pdmR3DevHlp_PCIRegister: caller='%s'/%d: pPciDev=%p:{.config={%#.256Rhxs} fFlags=%#x uPciDevNo=%#x uPciFunNo=%#x pszName=%p:{%s}\n",
2552 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->abConfig, fFlags, uPciDevNo, uPciFunNo, pszName, pszName ? pszName : ""));
2553
2554 /*
2555 * Validate input.
2556 */
2557 AssertLogRelMsgReturn(pDevIns->pReg->cMaxPciDevices > 0,
2558 ("'%s'/%d: cMaxPciDevices is 0\n", pDevIns->pReg->szName, pDevIns->iInstance),
2559 VERR_WRONG_ORDER);
2560 AssertLogRelMsgReturn(RT_VALID_PTR(pPciDev),
2561 ("'%s'/%d: Invalid pPciDev value: %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pPciDev),
2562 VERR_INVALID_POINTER);
2563 AssertLogRelMsgReturn(PDMPciDevGetVendorId(pPciDev),
2564 ("'%s'/%d: Vendor ID is not set!\n", pDevIns->pReg->szName, pDevIns->iInstance),
2565 VERR_INVALID_POINTER);
2566 AssertLogRelMsgReturn( uPciDevNo < 32
2567 || uPciDevNo == PDMPCIDEVREG_DEV_NO_FIRST_UNUSED
2568 || uPciDevNo == PDMPCIDEVREG_DEV_NO_SAME_AS_PREV,
2569 ("'%s'/%d: Invalid PCI device number: %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, uPciDevNo),
2570 VERR_INVALID_PARAMETER);
2571 AssertLogRelMsgReturn( uPciFunNo < 8
2572 || uPciFunNo == PDMPCIDEVREG_FUN_NO_FIRST_UNUSED,
2573 ("'%s'/%d: Invalid PCI funcion number: %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, uPciFunNo),
2574 VERR_INVALID_PARAMETER);
2575 AssertLogRelMsgReturn(!(fFlags & ~PDMPCIDEVREG_F_VALID_MASK),
2576 ("'%s'/%d: Invalid flags: %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, fFlags),
2577 VERR_INVALID_FLAGS);
2578 if (!pszName)
2579 pszName = pDevIns->pReg->szName;
2580
2581#if 0
2582 AssertLogRelReturn(RT_VALID_PTR(pszName), VERR_INVALID_POINTER);
2583 AssertLogRelReturn(!pPciDev->Int.s.fRegistered, VERR_PDM_NOT_PCI_DEVICE);
2584 AssertLogRelReturn(pPciDev == PDMDEV_GET_PPCIDEV(pDevIns, pPciDev->Int.s.idxSubDev), VERR_PDM_NOT_PCI_DEVICE);
2585 AssertLogRelReturn(pPciDev == PDMDEV_CALC_PPCIDEV(pDevIns, pPciDev->Int.s.idxSubDev), VERR_PDM_NOT_PCI_DEVICE);
2586 AssertMsgReturn(pPciDev->u32Magic == PDMPCIDEV_MAGIC, ("%#x\n", pPciDev->u32Magic), VERR_PDM_NOT_PCI_DEVICE);
2587#endif
2588
2589 int rc = VERR_NOT_IMPLEMENTED;
2590 AssertFailed();
2591
2592 LogFlow(("pdmR3DevHlp_PCIRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2593 return rc;
2594}
2595
2596
2597/** @interface_method_impl{PDMDEVHLPR3,pfnPCIRegisterMsi} */
2598static DECLCALLBACK(int) pdmR3DevHlp_PCIRegisterMsi(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, PPDMMSIREG pMsiReg)
2599{
2600 PDMDEV_ASSERT_DEVINS(pDevIns);
2601 if (!pPciDev) /* NULL is an alias for the default PCI device. */
2602 pPciDev = pDevIns->apPciDevs[0];
2603 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE);
2604 LogFlow(("pdmR3DevHlp_PCIRegisterMsi: caller='%s'/%d: pPciDev=%p:{%#x} pMsgReg=%p:{cMsiVectors=%d, cMsixVectors=%d}\n",
2605 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->uDevFn, pMsiReg, pMsiReg->cMsiVectors, pMsiReg->cMsixVectors));
2606 PDMPCIDEV_ASSERT_VALID_RET(pDevIns, pPciDev);
2607
2608 AssertLogRelMsgReturn(pDevIns->pReg->cMaxPciDevices > 0,
2609 ("'%s'/%d: cMaxPciDevices is 0\n", pDevIns->pReg->szName, pDevIns->iInstance),
2610 VERR_WRONG_ORDER);
2611 AssertLogRelMsgReturn(pMsiReg->cMsixVectors <= pDevIns->pReg->cMaxMsixVectors,
2612 ("'%s'/%d: cMsixVectors=%u cMaxMsixVectors=%u\n",
2613 pDevIns->pReg->szName, pDevIns->iInstance, pMsiReg->cMsixVectors, pDevIns->pReg->cMaxMsixVectors),
2614 VERR_INVALID_FLAGS);
2615
2616 int rc = VERR_NOT_IMPLEMENTED;
2617 AssertFailed();
2618
2619 LogFlow(("pdmR3DevHlp_PCIRegisterMsi: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2620 return rc;
2621}
2622
2623
2624/** @interface_method_impl{PDMDEVHLPR3,pfnPCIIORegionRegister} */
2625static DECLCALLBACK(int) pdmR3DevHlp_PCIIORegionRegister(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion,
2626 RTGCPHYS cbRegion, PCIADDRESSSPACE enmType, uint32_t fFlags,
2627 uint64_t hHandle, PFNPCIIOREGIONMAP pfnMapUnmap)
2628{
2629 PDMDEV_ASSERT_DEVINS(pDevIns);
2630 if (!pPciDev) /* NULL is an alias for the default PCI device. */
2631 pPciDev = pDevIns->apPciDevs[0];
2632 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE);
2633 LogFlow(("pdmR3DevHlp_PCIIORegionRegister: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%d cbRegion=%RGp enmType=%d fFlags=%#x, hHandle=%#RX64 pfnMapUnmap=%p\n",
2634 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->uDevFn, iRegion, cbRegion, enmType, fFlags, hHandle, pfnMapUnmap));
2635 PDMPCIDEV_ASSERT_VALID_RET(pDevIns, pPciDev);
2636
2637 /*
2638 * Validate input.
2639 */
2640 if (iRegion >= VBOX_PCI_NUM_REGIONS)
2641 {
2642 Assert(iRegion < VBOX_PCI_NUM_REGIONS);
2643 LogFlow(("pdmR3DevHlp_PCIIORegionRegister: caller='%s'/%d: returns %Rrc (iRegion)\n", pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
2644 return VERR_INVALID_PARAMETER;
2645 }
2646
2647 switch ((int)enmType)
2648 {
2649 case PCI_ADDRESS_SPACE_IO:
2650 /*
2651 * Sanity check: don't allow to register more than 32K of the PCI I/O space.
2652 */
2653 AssertLogRelMsgReturn(cbRegion <= _32K,
2654 ("caller='%s'/%d: %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, cbRegion),
2655 VERR_INVALID_PARAMETER);
2656 break;
2657
2658 case PCI_ADDRESS_SPACE_MEM:
2659 case PCI_ADDRESS_SPACE_MEM_PREFETCH:
2660 /*
2661 * Sanity check: Don't allow to register more than 2GB of the PCI MMIO space.
2662 */
2663 AssertLogRelMsgReturn(cbRegion <= MM_MMIO_32_MAX,
2664 ("caller='%s'/%d: %RGp (max %RGp)\n",
2665 pDevIns->pReg->szName, pDevIns->iInstance, cbRegion, (RTGCPHYS)MM_MMIO_32_MAX),
2666 VERR_OUT_OF_RANGE);
2667 break;
2668
2669 case PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_MEM:
2670 case PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_MEM_PREFETCH:
2671 /*
2672 * Sanity check: Don't allow to register more than 64GB of the 64-bit PCI MMIO space.
2673 */
2674 AssertLogRelMsgReturn(cbRegion <= MM_MMIO_64_MAX,
2675 ("caller='%s'/%d: %RGp (max %RGp)\n",
2676 pDevIns->pReg->szName, pDevIns->iInstance, cbRegion, MM_MMIO_64_MAX),
2677 VERR_OUT_OF_RANGE);
2678 break;
2679
2680 default:
2681 AssertMsgFailed(("enmType=%#x is unknown\n", enmType));
2682 LogFlow(("pdmR3DevHlp_PCIIORegionRegister: caller='%s'/%d: returns %Rrc (enmType)\n", pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
2683 return VERR_INVALID_PARAMETER;
2684 }
2685
2686 AssertMsgReturn( pfnMapUnmap
2687 || ( hHandle != UINT64_MAX
2688 && (fFlags & PDMPCIDEV_IORGN_F_HANDLE_MASK) != PDMPCIDEV_IORGN_F_NO_HANDLE),
2689 ("caller='%s'/%d: fFlags=%#x hHandle=%#RX64\n", pDevIns->pReg->szName, pDevIns->iInstance, fFlags, hHandle),
2690 VERR_INVALID_PARAMETER);
2691
2692 AssertMsgReturn(!(fFlags & ~PDMPCIDEV_IORGN_F_VALID_MASK), ("fFlags=%#x\n", fFlags), VERR_INVALID_FLAGS);
2693 int rc = VERR_NOT_IMPLEMENTED;
2694 AssertFailed();
2695
2696 LogFlow(("pdmR3DevHlp_PCIIORegionRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2697 return rc;
2698}
2699
2700
2701/** @interface_method_impl{PDMDEVHLPR3,pfnPCIInterceptConfigAccesses} */
2702static DECLCALLBACK(int) pdmR3DevHlp_PCIInterceptConfigAccesses(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev,
2703 PFNPCICONFIGREAD pfnRead, PFNPCICONFIGWRITE pfnWrite)
2704{
2705 PDMDEV_ASSERT_DEVINS(pDevIns);
2706 if (!pPciDev) /* NULL is an alias for the default PCI device. */
2707 pPciDev = pDevIns->apPciDevs[0];
2708 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE);
2709 LogFlow(("pdmR3DevHlp_PCIInterceptConfigAccesses: caller='%s'/%d: pPciDev=%p pfnRead=%p pfnWrite=%p\n",
2710 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pfnRead, pfnWrite));
2711 PDMPCIDEV_ASSERT_VALID_RET(pDevIns, pPciDev);
2712
2713 int rc = VERR_NOT_IMPLEMENTED;
2714 AssertFailed();
2715
2716 LogFlow(("pdmR3DevHlp_PCIInterceptConfigAccesses: caller='%s'/%d: returns %Rrc\n",
2717 pDevIns->pReg->szName, pDevIns->iInstance, rc));
2718 return rc;
2719}
2720
2721
2722/** @interface_method_impl{PDMDEVHLPR3,pfnPCIConfigWrite} */
2723static DECLCALLBACK(VBOXSTRICTRC)
2724pdmR3DevHlp_PCIConfigWrite(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t uAddress, unsigned cb, uint32_t u32Value)
2725{
2726 PDMDEV_ASSERT_DEVINS(pDevIns);
2727 AssertPtrReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE);
2728 LogFlow(("pdmR3DevHlp_PCIConfigWrite: caller='%s'/%d: pPciDev=%p uAddress=%#x cd=%d u32Value=%#x\n",
2729 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, uAddress, cb, u32Value));
2730
2731 VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED;
2732 AssertFailed();
2733
2734 LogFlow(("pdmR3DevHlp_PCIConfigWrite: caller='%s'/%d: returns %Rrc\n",
2735 pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict)));
2736 return rcStrict;
2737}
2738
2739
2740/** @interface_method_impl{PDMDEVHLPR3,pfnPCIConfigRead} */
2741static DECLCALLBACK(VBOXSTRICTRC)
2742pdmR3DevHlp_PCIConfigRead(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t uAddress, unsigned cb, uint32_t *pu32Value)
2743{
2744 PDMDEV_ASSERT_DEVINS(pDevIns);
2745 AssertPtrReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE);
2746 LogFlow(("pdmR3DevHlp_PCIConfigRead: caller='%s'/%d: pPciDev=%p uAddress=%#x cd=%d pu32Value=%p:{%#x}\n",
2747 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, uAddress, cb, pu32Value, *pu32Value));
2748
2749 VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED;
2750 AssertFailed();
2751
2752 LogFlow(("pdmR3DevHlp_PCIConfigRead: caller='%s'/%d: returns %Rrc (*pu32Value=%#x)\n",
2753 pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict), *pu32Value));
2754 return rcStrict;
2755}
2756
2757
2758/** @interface_method_impl{PDMDEVHLPR3,pfnPCIPhysRead} */
2759static DECLCALLBACK(int)
2760pdmR3DevHlp_PCIPhysRead(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead)
2761{
2762 PDMDEV_ASSERT_DEVINS(pDevIns);
2763 if (!pPciDev) /* NULL is an alias for the default PCI device. */
2764 pPciDev = pDevIns->apPciDevs[0];
2765 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE);
2766 PDMPCIDEV_ASSERT_VALID_AND_REGISTERED(pDevIns, pPciDev);
2767
2768#ifndef PDM_DO_NOT_RESPECT_PCI_BM_BIT
2769 /*
2770 * Just check the busmaster setting here and forward the request to the generic read helper.
2771 */
2772 if (PCIDevIsBusmaster(pPciDev))
2773 { /* likely */ }
2774 else
2775 {
2776 Log(("pdmR3DevHlp_PCIPhysRead: caller='%s'/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbRead=%#zx\n",
2777 pDevIns->pReg->szName, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbRead));
2778 memset(pvBuf, 0xff, cbRead);
2779 return VERR_PDM_NOT_PCI_BUS_MASTER;
2780 }
2781#endif
2782
2783 int rc = VERR_NOT_IMPLEMENTED;
2784 AssertFailed();
2785 return rc;
2786}
2787
2788
2789/** @interface_method_impl{PDMDEVHLPR3,pfnPCIPhysWrite} */
2790static DECLCALLBACK(int)
2791pdmR3DevHlp_PCIPhysWrite(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite)
2792{
2793 PDMDEV_ASSERT_DEVINS(pDevIns);
2794 if (!pPciDev) /* NULL is an alias for the default PCI device. */
2795 pPciDev = pDevIns->apPciDevs[0];
2796 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE);
2797 PDMPCIDEV_ASSERT_VALID_AND_REGISTERED(pDevIns, pPciDev);
2798
2799#ifndef PDM_DO_NOT_RESPECT_PCI_BM_BIT
2800 /*
2801 * Just check the busmaster setting here and forward the request to the generic read helper.
2802 */
2803 if (PCIDevIsBusmaster(pPciDev))
2804 { /* likely */ }
2805 else
2806 {
2807 Log(("pdmR3DevHlp_PCIPhysWrite: caller='%s'/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbWrite=%#zx\n",
2808 pDevIns->pReg->szName, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbWrite));
2809 return VERR_PDM_NOT_PCI_BUS_MASTER;
2810 }
2811#endif
2812
2813 RT_NOREF(GCPhys, pvBuf, cbWrite);
2814 int rc = VERR_NOT_IMPLEMENTED;
2815 AssertFailed();
2816 return rc;
2817}
2818
2819
2820/** @interface_method_impl{PDMDEVHLPR3,pfnPCISetIrq} */
2821static DECLCALLBACK(void) pdmR3DevHlp_PCISetIrq(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel)
2822{
2823 PDMDEV_ASSERT_DEVINS(pDevIns);
2824 if (!pPciDev) /* NULL is an alias for the default PCI device. */
2825 pPciDev = pDevIns->apPciDevs[0];
2826 AssertReturnVoid(pPciDev);
2827 LogFlow(("pdmR3DevHlp_PCISetIrq: caller='%s'/%d: pPciDev=%p:{%#x} iIrq=%d iLevel=%d\n",
2828 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->uDevFn, iIrq, iLevel));
2829 PDMPCIDEV_ASSERT_VALID_AND_REGISTERED(pDevIns, pPciDev);
2830
2831 RT_NOREF(iIrq, iLevel);
2832 AssertFailed();
2833
2834 LogFlow(("pdmR3DevHlp_PCISetIrq: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance));
2835}
2836
2837
2838/** @interface_method_impl{PDMDEVHLPR3,pfnPCISetIrqNoWait} */
2839static DECLCALLBACK(void) pdmR3DevHlp_PCISetIrqNoWait(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel)
2840{
2841 pdmR3DevHlp_PCISetIrq(pDevIns, pPciDev, iIrq, iLevel);
2842}
2843
2844
2845/** @interface_method_impl{PDMDEVHLPR3,pfnISASetIrq} */
2846static DECLCALLBACK(void) pdmR3DevHlp_ISASetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel)
2847{
2848 PDMDEV_ASSERT_DEVINS(pDevIns);
2849 LogFlow(("pdmR3DevHlp_ISASetIrq: caller='%s'/%d: iIrq=%d iLevel=%d\n", pDevIns->pReg->szName, pDevIns->iInstance, iIrq, iLevel));
2850
2851 /*
2852 * Validate input.
2853 */
2854 Assert(iIrq < 16);
2855 Assert((uint32_t)iLevel <= PDM_IRQ_LEVEL_FLIP_FLOP);
2856
2857 AssertFailed();
2858
2859 LogFlow(("pdmR3DevHlp_ISASetIrq: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance));
2860}
2861
2862
2863/** @interface_method_impl{PDMDEVHLPR3,pfnISASetIrqNoWait} */
2864static DECLCALLBACK(void) pdmR3DevHlp_ISASetIrqNoWait(PPDMDEVINS pDevIns, int iIrq, int iLevel)
2865{
2866 pdmR3DevHlp_ISASetIrq(pDevIns, iIrq, iLevel);
2867}
2868
2869
2870/** @interface_method_impl{PDMDEVHLPR3,pfnIoApicSendMsi} */
2871static DECLCALLBACK(void) pdmR3DevHlp_IoApicSendMsi(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue)
2872{
2873 PDMDEV_ASSERT_DEVINS(pDevIns);
2874 LogFlow(("pdmR3DevHlp_IoApicSendMsi: caller='%s'/%d: GCPhys=%RGp uValue=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys, uValue));
2875
2876 /*
2877 * Validate input.
2878 */
2879 Assert(GCPhys != 0);
2880 Assert(uValue != 0);
2881
2882 AssertFailed();
2883
2884 LogFlow(("pdmR3DevHlp_IoApicSendMsi: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance));
2885}
2886
2887
2888/** @interface_method_impl{PDMDEVHLPR3,pfnDriverAttach} */
2889static DECLCALLBACK(int) pdmR3DevHlp_DriverAttach(PPDMDEVINS pDevIns, uint32_t iLun, PPDMIBASE pBaseInterface, PPDMIBASE *ppBaseInterface, const char *pszDesc)
2890{
2891 PDMDEV_ASSERT_DEVINS(pDevIns);
2892 LogFlow(("pdmR3DevHlp_DriverAttach: caller='%s'/%d: iLun=%d pBaseInterface=%p ppBaseInterface=%p pszDesc=%p:{%s}\n",
2893 pDevIns->pReg->szName, pDevIns->iInstance, iLun, pBaseInterface, ppBaseInterface, pszDesc, pszDesc));
2894
2895#if 1
2896 int rc = VERR_PDM_NO_ATTACHED_DRIVER;
2897#else
2898 int rc = VERR_NOT_IMPLEMENTED;
2899 AssertFailed();
2900#endif
2901
2902 LogFlow(("pdmR3DevHlp_DriverAttach: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2903 return rc;
2904}
2905
2906
2907/** @interface_method_impl{PDMDEVHLPR3,pfnDriverDetach} */
2908static DECLCALLBACK(int) pdmR3DevHlp_DriverDetach(PPDMDEVINS pDevIns, PPDMDRVINS pDrvIns, uint32_t fFlags)
2909{
2910 PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF_PV(pDevIns);
2911 LogFlow(("pdmR3DevHlp_DriverDetach: caller='%s'/%d: pDrvIns=%p\n",
2912 pDevIns->pReg->szName, pDevIns->iInstance, pDrvIns));
2913
2914 RT_NOREF(fFlags);
2915 int rc = VERR_NOT_IMPLEMENTED;
2916 AssertFailed();
2917
2918 LogFlow(("pdmR3DevHlp_DriverDetach: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2919 return rc;
2920}
2921
2922
2923/** @interface_method_impl{PDMDEVHLPR3,pfnDriverReconfigure} */
2924static DECLCALLBACK(int) pdmR3DevHlp_DriverReconfigure(PPDMDEVINS pDevIns, uint32_t iLun, uint32_t cDepth,
2925 const char * const *papszDrivers, PCFGMNODE *papConfigs, uint32_t fFlags)
2926{
2927 PDMDEV_ASSERT_DEVINS(pDevIns);
2928 LogFlow(("pdmR3DevHlp_DriverReconfigure: caller='%s'/%d: iLun=%u cDepth=%u fFlags=%#x\n",
2929 pDevIns->pReg->szName, pDevIns->iInstance, iLun, cDepth, fFlags));
2930
2931 /*
2932 * Validate input.
2933 */
2934 AssertReturn(cDepth <= 8, VERR_INVALID_PARAMETER);
2935 AssertPtrReturn(papszDrivers, VERR_INVALID_POINTER);
2936 AssertPtrNullReturn(papConfigs, VERR_INVALID_POINTER);
2937 for (uint32_t i = 0; i < cDepth; i++)
2938 {
2939 AssertPtrReturn(papszDrivers[i], VERR_INVALID_POINTER);
2940 size_t cchDriver = strlen(papszDrivers[i]);
2941 AssertPtrReturn(cchDriver > 0 && cchDriver < RT_SIZEOFMEMB(PDMDRVREG, szName), VERR_OUT_OF_RANGE);
2942
2943 if (papConfigs)
2944 AssertPtrNullReturn(papConfigs[i], VERR_INVALID_POINTER);
2945 }
2946 AssertReturn(fFlags == 0, VERR_INVALID_FLAGS);
2947
2948 int rc = VERR_NOT_IMPLEMENTED;
2949 AssertFailed();
2950
2951 LogFlow(("pdmR3DevHlp_DriverReconfigure: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
2952 return rc;
2953}
2954
2955
2956/** @interface_method_impl{PDMDEVHLPR3,pfnQueueCreatePtr} */
2957static DECLCALLBACK(int) pdmR3DevHlp_QueueCreatePtr(PPDMDEVINS pDevIns, size_t cbItem, uint32_t cItems, uint32_t cMilliesInterval,
2958 PFNPDMQUEUEDEV pfnCallback, bool fRZEnabled, const char *pszName, PPDMQUEUE *ppQueue)
2959{
2960 PDMDEV_ASSERT_DEVINS(pDevIns);
2961 LogFlow(("pdmR3DevHlp_QueueCreatePtr: caller='%s'/%d: cbItem=%#x cItems=%#x cMilliesInterval=%u pfnCallback=%p fRZEnabled=%RTbool pszName=%p:{%s} ppQueue=%p\n",
2962 pDevIns->pReg->szName, pDevIns->iInstance, cbItem, cItems, cMilliesInterval, pfnCallback, fRZEnabled, pszName, pszName, ppQueue));
2963
2964 int rc = VERR_NOT_IMPLEMENTED;
2965 AssertFailed();
2966
2967 LogFlow(("pdmR3DevHlp_QueueCreatePtr: caller='%s'/%d: returns %Rrc *ppQueue=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *ppQueue));
2968 return rc;
2969}
2970
2971
2972/** @interface_method_impl{PDMDEVHLPR3,pfnQueueCreate} */
2973static DECLCALLBACK(int) pdmR3DevHlp_QueueCreate(PPDMDEVINS pDevIns, size_t cbItem, uint32_t cItems, uint32_t cMilliesInterval,
2974 PFNPDMQUEUEDEV pfnCallback, bool fRZEnabled, const char *pszName,
2975 PDMQUEUEHANDLE *phQueue)
2976{
2977 PDMDEV_ASSERT_DEVINS(pDevIns);
2978 LogFlow(("pdmR3DevHlp_QueueCreate: caller='%s'/%d: cbItem=%#x cItems=%#x cMilliesInterval=%u pfnCallback=%p fRZEnabled=%RTbool pszName=%p:{%s} phQueue=%p\n",
2979 pDevIns->pReg->szName, pDevIns->iInstance, cbItem, cItems, cMilliesInterval, pfnCallback, fRZEnabled, pszName, pszName, phQueue));
2980
2981 int rc = VERR_NOT_IMPLEMENTED;
2982 AssertFailed();
2983
2984 LogFlow(("pdmR3DevHlp_QueueCreate: caller='%s'/%d: returns %Rrc *ppQueue=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *phQueue));
2985 return rc;
2986}
2987
2988
2989/** @interface_method_impl{PDMDEVHLPR3,pfnQueueToPtr} */
2990static DECLCALLBACK(PPDMQUEUE) pdmR3DevHlp_QueueToPtr(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue)
2991{
2992 PDMDEV_ASSERT_DEVINS(pDevIns);
2993 RT_NOREF(pDevIns);
2994 return (PPDMQUEUE)hQueue;
2995}
2996
2997
2998/** @interface_method_impl{PDMDEVHLPR3,pfnQueueAlloc} */
2999static DECLCALLBACK(PPDMQUEUEITEMCORE) pdmR3DevHlp_QueueAlloc(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue)
3000{
3001 RT_NOREF(pDevIns, hQueue);
3002 AssertFailed();
3003 return NULL;
3004}
3005
3006
3007/** @interface_method_impl{PDMDEVHLPR3,pfnQueueInsert} */
3008static DECLCALLBACK(void) pdmR3DevHlp_QueueInsert(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue, PPDMQUEUEITEMCORE pItem)
3009{
3010 RT_NOREF(pDevIns, hQueue, pItem);
3011 AssertFailed();
3012}
3013
3014
3015/** @interface_method_impl{PDMDEVHLPR3,pfnQueueInsertEx} */
3016static DECLCALLBACK(void) pdmR3DevHlp_QueueInsertEx(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue, PPDMQUEUEITEMCORE pItem,
3017 uint64_t cNanoMaxDelay)
3018{
3019 RT_NOREF(pDevIns, hQueue, pItem, cNanoMaxDelay);
3020 AssertFailed();
3021}
3022
3023
3024/** @interface_method_impl{PDMDEVHLPR3,pfnQueueFlushIfNecessary} */
3025static DECLCALLBACK(bool) pdmR3DevHlp_QueueFlushIfNecessary(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue)
3026{
3027 RT_NOREF(pDevIns, hQueue);
3028 AssertFailed();
3029 return false;
3030}
3031
3032
3033/** @interface_method_impl{PDMDEVHLPR3,pfnTaskCreate} */
3034static DECLCALLBACK(int) pdmR3DevHlp_TaskCreate(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszName,
3035 PFNPDMTASKDEV pfnCallback, void *pvUser, PDMTASKHANDLE *phTask)
3036{
3037 PDMDEV_ASSERT_DEVINS(pDevIns);
3038 LogFlow(("pdmR3DevHlp_TaskTrigger: caller='%s'/%d: pfnCallback=%p fFlags=%#x pszName=%p:{%s} phTask=%p\n",
3039 pDevIns->pReg->szName, pDevIns->iInstance, pfnCallback, fFlags, pszName, pszName, phTask));
3040
3041 RT_NOREF(pDevIns, fFlags, pszName, pfnCallback, pvUser, phTask);
3042 int rc = VERR_NOT_IMPLEMENTED;
3043 AssertFailed();
3044
3045 LogFlow(("pdmR3DevHlp_TaskTrigger: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3046 return rc;
3047}
3048
3049
3050/** @interface_method_impl{PDMDEVHLPR3,pfnTaskTrigger} */
3051static DECLCALLBACK(int) pdmR3DevHlp_TaskTrigger(PPDMDEVINS pDevIns, PDMTASKHANDLE hTask)
3052{
3053 PDMDEV_ASSERT_DEVINS(pDevIns);
3054 LogFlow(("pdmR3DevHlp_TaskTrigger: caller='%s'/%d: hTask=%RU64\n", pDevIns->pReg->szName, pDevIns->iInstance, hTask));
3055
3056 RT_NOREF(pDevIns, hTask);
3057 int rc = VERR_NOT_IMPLEMENTED;
3058 AssertFailed();
3059
3060 LogFlow(("pdmR3DevHlp_TaskTrigger: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3061 return rc;
3062}
3063
3064
3065/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventCreate} */
3066static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventCreate(PPDMDEVINS pDevIns, PSUPSEMEVENT phEvent)
3067{
3068 PDMDEV_ASSERT_DEVINS(pDevIns);
3069 LogFlow(("pdmR3DevHlp_SUPSemEventCreate: caller='%s'/%d: phEvent=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, phEvent));
3070
3071 RT_NOREF(pDevIns, phEvent);
3072 int rc = VERR_NOT_IMPLEMENTED;
3073 AssertFailed();
3074
3075 LogFlow(("pdmR3DevHlp_SUPSemEventCreate: caller='%s'/%d: returns %Rrc *phEvent=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *phEvent));
3076 return rc;
3077}
3078
3079
3080/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventClose} */
3081static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventClose(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent)
3082{
3083 PDMDEV_ASSERT_DEVINS(pDevIns);
3084 LogFlow(("pdmR3DevHlp_SUPSemEventClose: caller='%s'/%d: hEvent=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEvent));
3085
3086 RT_NOREF(pDevIns, hEvent);
3087 int rc = VERR_NOT_IMPLEMENTED;
3088 AssertFailed();
3089
3090 LogFlow(("pdmR3DevHlp_SUPSemEventClose: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3091 return rc;
3092}
3093
3094
3095/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventSignal} */
3096static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventSignal(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent)
3097{
3098 PDMDEV_ASSERT_DEVINS(pDevIns);
3099 LogFlow(("pdmR3DevHlp_SUPSemEventSignal: caller='%s'/%d: hEvent=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEvent));
3100
3101 RT_NOREF(pDevIns, hEvent);
3102 int rc = VERR_NOT_IMPLEMENTED;
3103 AssertFailed();
3104
3105 LogFlow(("pdmR3DevHlp_SUPSemEventSignal: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3106 return rc;
3107}
3108
3109
3110/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventWaitNoResume} */
3111static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventWaitNoResume(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent, uint32_t cMillies)
3112{
3113 PDMDEV_ASSERT_DEVINS(pDevIns);
3114 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNoResume: caller='%s'/%d: hEvent=%p cNsTimeout=%RU32\n",
3115 pDevIns->pReg->szName, pDevIns->iInstance, hEvent, cMillies));
3116
3117 RT_NOREF(pDevIns, hEvent, cMillies);
3118 int rc = VERR_NOT_IMPLEMENTED;
3119 AssertFailed();
3120
3121 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNoResume: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3122 return rc;
3123}
3124
3125
3126/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventWaitNsAbsIntr} */
3127static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventWaitNsAbsIntr(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent, uint64_t uNsTimeout)
3128{
3129 PDMDEV_ASSERT_DEVINS(pDevIns);
3130 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNsAbsIntr: caller='%s'/%d: hEvent=%p uNsTimeout=%RU64\n",
3131 pDevIns->pReg->szName, pDevIns->iInstance, hEvent, uNsTimeout));
3132
3133 RT_NOREF(pDevIns, hEvent, uNsTimeout);
3134 int rc = VERR_NOT_IMPLEMENTED;
3135 AssertFailed();
3136
3137 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNsAbsIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3138 return rc;
3139}
3140
3141
3142/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventWaitNsRelIntr} */
3143static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventWaitNsRelIntr(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent, uint64_t cNsTimeout)
3144{
3145 PDMDEV_ASSERT_DEVINS(pDevIns);
3146 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNsRelIntr: caller='%s'/%d: hEvent=%p cNsTimeout=%RU64\n",
3147 pDevIns->pReg->szName, pDevIns->iInstance, hEvent, cNsTimeout));
3148
3149 RT_NOREF(pDevIns, hEvent, cNsTimeout);
3150 int rc = VERR_NOT_IMPLEMENTED;
3151 AssertFailed();
3152
3153 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNsRelIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3154 return rc;
3155}
3156
3157
3158/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventGetResolution} */
3159static DECLCALLBACK(uint32_t) pdmR3DevHlp_SUPSemEventGetResolution(PPDMDEVINS pDevIns)
3160{
3161 PDMDEV_ASSERT_DEVINS(pDevIns);
3162 LogFlow(("pdmR3DevHlp_SUPSemEventGetResolution: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
3163
3164 RT_NOREF(pDevIns);
3165 uint32_t cNsResolution = 0;
3166 AssertFailed();
3167
3168 LogFlow(("pdmR3DevHlp_SUPSemEventGetResolution: caller='%s'/%d: returns %u\n", pDevIns->pReg->szName, pDevIns->iInstance, cNsResolution));
3169 return cNsResolution;
3170}
3171
3172
3173/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiCreate} */
3174static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiCreate(PPDMDEVINS pDevIns, PSUPSEMEVENTMULTI phEventMulti)
3175{
3176 PDMDEV_ASSERT_DEVINS(pDevIns);
3177 LogFlow(("pdmR3DevHlp_SUPSemEventMultiCreate: caller='%s'/%d: phEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, phEventMulti));
3178
3179 RT_NOREF(pDevIns, phEventMulti);
3180 int rc = VERR_NOT_IMPLEMENTED;
3181 AssertFailed();
3182
3183 LogFlow(("pdmR3DevHlp_SUPSemEventMultiCreate: caller='%s'/%d: returns %Rrc *phEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *phEventMulti));
3184 return rc;
3185}
3186
3187
3188/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiClose} */
3189static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiClose(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti)
3190{
3191 PDMDEV_ASSERT_DEVINS(pDevIns);
3192 LogFlow(("pdmR3DevHlp_SUPSemEventMultiClose: caller='%s'/%d: hEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti));
3193
3194 RT_NOREF(pDevIns, hEventMulti);
3195 int rc = VERR_NOT_IMPLEMENTED;
3196 AssertFailed();
3197
3198 LogFlow(("pdmR3DevHlp_SUPSemEventMultiClose: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3199 return rc;
3200}
3201
3202
3203/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiSignal} */
3204static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiSignal(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti)
3205{
3206 PDMDEV_ASSERT_DEVINS(pDevIns);
3207 LogFlow(("pdmR3DevHlp_SUPSemEventMultiSignal: caller='%s'/%d: hEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti));
3208
3209 RT_NOREF(pDevIns, hEventMulti);
3210 int rc = VERR_NOT_IMPLEMENTED;
3211 AssertFailed();
3212
3213 LogFlow(("pdmR3DevHlp_SUPSemEventMultiSignal: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3214 return rc;
3215}
3216
3217
3218/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiReset} */
3219static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiReset(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti)
3220{
3221 PDMDEV_ASSERT_DEVINS(pDevIns);
3222 LogFlow(("pdmR3DevHlp_SUPSemEventMultiReset: caller='%s'/%d: hEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti));
3223
3224 RT_NOREF(pDevIns, hEventMulti);
3225 int rc = VERR_NOT_IMPLEMENTED;
3226 AssertFailed();
3227
3228 LogFlow(("pdmR3DevHlp_SUPSemEventMultiReset: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3229 return rc;
3230}
3231
3232
3233/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiWaitNoResume} */
3234static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiWaitNoResume(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti,
3235 uint32_t cMillies)
3236{
3237 PDMDEV_ASSERT_DEVINS(pDevIns);
3238 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNoResume: caller='%s'/%d: hEventMulti=%p cMillies=%RU32\n",
3239 pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti, cMillies));
3240
3241 RT_NOREF(pDevIns, hEventMulti, cMillies);
3242 int rc = VERR_NOT_IMPLEMENTED;
3243 AssertFailed();
3244
3245 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNoResume: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3246 return rc;
3247}
3248
3249
3250/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiWaitNsAbsIntr} */
3251static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiWaitNsAbsIntr(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti,
3252 uint64_t uNsTimeout)
3253{
3254 PDMDEV_ASSERT_DEVINS(pDevIns);
3255 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNsAbsIntr: caller='%s'/%d: hEventMulti=%p uNsTimeout=%RU64\n",
3256 pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti, uNsTimeout));
3257
3258 RT_NOREF(pDevIns, hEventMulti, uNsTimeout);
3259 int rc = VERR_NOT_IMPLEMENTED;
3260 AssertFailed();
3261
3262 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNsAbsIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3263 return rc;
3264}
3265
3266
3267/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiWaitNsRelIntr} */
3268static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiWaitNsRelIntr(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti,
3269 uint64_t cNsTimeout)
3270{
3271 PDMDEV_ASSERT_DEVINS(pDevIns);
3272 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNsRelIntr: caller='%s'/%d: hEventMulti=%p cNsTimeout=%RU64\n",
3273 pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti, cNsTimeout));
3274
3275 RT_NOREF(pDevIns, hEventMulti, cNsTimeout);
3276 int rc = VERR_NOT_IMPLEMENTED;
3277 AssertFailed();
3278
3279 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNsRelIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3280 return rc;
3281}
3282
3283
3284/** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiGetResolution} */
3285static DECLCALLBACK(uint32_t) pdmR3DevHlp_SUPSemEventMultiGetResolution(PPDMDEVINS pDevIns)
3286{
3287 PDMDEV_ASSERT_DEVINS(pDevIns);
3288 LogFlow(("pdmR3DevHlp_SUPSemEventMultiGetResolution: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
3289
3290 uint32_t cNsResolution = 0;
3291 AssertFailed();
3292
3293 LogFlow(("pdmR3DevHlp_SUPSemEventMultiGetResolution: caller='%s'/%d: returns %u\n", pDevIns->pReg->szName, pDevIns->iInstance, cNsResolution));
3294 return cNsResolution;
3295}
3296
3297
3298/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectInit} */
3299static DECLCALLBACK(int) pdmR3DevHlp_CritSectInit(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RT_SRC_POS_DECL,
3300 const char *pszNameFmt, va_list va)
3301{
3302 PDMDEV_ASSERT_DEVINS(pDevIns);
3303 LogFlow(("pdmR3DevHlp_CritSectInit: caller='%s'/%d: pCritSect=%p pszNameFmt=%p:{%s}\n",
3304 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect, pszNameFmt, pszNameFmt));
3305
3306 RT_NOREF(RT_SRC_POS_ARGS, pszNameFmt, va);
3307 int rc = RTCritSectInit(&pCritSect->s.CritSect);
3308
3309 LogFlow(("pdmR3DevHlp_CritSectInit: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3310 return rc;
3311}
3312
3313
3314/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectGetNop} */
3315static DECLCALLBACK(PPDMCRITSECT) pdmR3DevHlp_CritSectGetNop(PPDMDEVINS pDevIns)
3316{
3317 PDMDEV_ASSERT_DEVINS(pDevIns);
3318
3319 PPDMCRITSECT pCritSect = &pDevIns->Internal.s.pDut->CritSectNop;
3320
3321 LogFlow(("pdmR3DevHlp_CritSectGetNop: caller='%s'/%d: return %p\n",
3322 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect));
3323 return pCritSect;
3324}
3325
3326
3327/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectGetNopR0} */
3328static DECLCALLBACK(R0PTRTYPE(PPDMCRITSECT)) pdmR3DevHlp_CritSectGetNopR0(PPDMDEVINS pDevIns)
3329{
3330 PDMDEV_ASSERT_DEVINS(pDevIns);
3331
3332 R0PTRTYPE(PPDMCRITSECT) pCritSect = 0;
3333 LogFlow(("pdmR3DevHlp_CritSectGetNopR0: caller='%s'/%d: return %RHv\n",
3334 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect));
3335 return pCritSect;
3336}
3337
3338
3339/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectGetNopRC} */
3340static DECLCALLBACK(RCPTRTYPE(PPDMCRITSECT)) pdmR3DevHlp_CritSectGetNopRC(PPDMDEVINS pDevIns)
3341{
3342 PDMDEV_ASSERT_DEVINS(pDevIns);
3343
3344 RCPTRTYPE(PPDMCRITSECT) pCritSect = 0;
3345 LogFlow(("pdmR3DevHlp_CritSectGetNopRC: caller='%s'/%d: return %RRv\n",
3346 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect));
3347 return pCritSect;
3348}
3349
3350
3351/** @interface_method_impl{PDMDEVHLPR3,pfnSetDeviceCritSect} */
3352static DECLCALLBACK(int) pdmR3DevHlp_SetDeviceCritSect(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
3353{
3354 /*
3355 * Validate input.
3356 */
3357 PDMDEV_ASSERT_DEVINS(pDevIns);
3358 AssertPtrReturn(pCritSect, VERR_INVALID_POINTER);
3359
3360 LogFlow(("pdmR3DevHlp_SetDeviceCritSect: caller='%s'/%d: pCritSect=%p\n",
3361 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect));
3362
3363 pDevIns->pCritSectRoR3 = pCritSect;
3364 LogFlow(("pdmR3DevHlp_SetDeviceCritSect: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS));
3365 return VINF_SUCCESS;
3366}
3367
3368
3369/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectYield} */
3370static DECLCALLBACK(bool) pdmR3DevHlp_CritSectYield(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
3371{
3372 PDMDEV_ASSERT_DEVINS(pDevIns);
3373
3374 RT_NOREF(pDevIns, pCritSect);
3375 AssertFailed();
3376 return false;
3377}
3378
3379
3380/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectEnter} */
3381static DECLCALLBACK(int) pdmR3DevHlp_CritSectEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy)
3382{
3383 PDMDEV_ASSERT_DEVINS(pDevIns);
3384
3385 RT_NOREF(pDevIns, pCritSect, rcBusy);
3386 int rc = VERR_NOT_IMPLEMENTED;
3387 AssertFailed();
3388 return rc;
3389}
3390
3391
3392/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectEnterDebug} */
3393static DECLCALLBACK(int) pdmR3DevHlp_CritSectEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL)
3394{
3395 PDMDEV_ASSERT_DEVINS(pDevIns);
3396
3397 RT_NOREF(pDevIns, rcBusy, uId, RT_SRC_POS_ARGS);
3398 return RTCritSectEnter(&pCritSect->s.CritSect);
3399}
3400
3401
3402/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectTryEnter} */
3403static DECLCALLBACK(int) pdmR3DevHlp_CritSectTryEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
3404{
3405 PDMDEV_ASSERT_DEVINS(pDevIns);
3406
3407 RT_NOREF(pDevIns, pCritSect);
3408 int rc = VERR_NOT_IMPLEMENTED;
3409 AssertFailed();
3410 return rc;
3411}
3412
3413
3414/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectTryEnterDebug} */
3415static DECLCALLBACK(int) pdmR3DevHlp_CritSectTryEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL)
3416{
3417 PDMDEV_ASSERT_DEVINS(pDevIns);
3418
3419 RT_NOREF(pDevIns, pCritSect, uId, RT_SRC_POS_ARGS);
3420 int rc = VERR_NOT_IMPLEMENTED;
3421 AssertFailed();
3422 return rc;
3423}
3424
3425
3426/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectLeave} */
3427static DECLCALLBACK(int) pdmR3DevHlp_CritSectLeave(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
3428{
3429 PDMDEV_ASSERT_DEVINS(pDevIns);
3430
3431 return RTCritSectLeave(&pCritSect->s.CritSect);
3432}
3433
3434
3435/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectIsOwner} */
3436static DECLCALLBACK(bool) pdmR3DevHlp_CritSectIsOwner(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
3437{
3438 PDMDEV_ASSERT_DEVINS(pDevIns);
3439
3440 return RTCritSectIsOwner(&pCritSect->s.CritSect);
3441}
3442
3443
3444/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectIsInitialized} */
3445static DECLCALLBACK(bool) pdmR3DevHlp_CritSectIsInitialized(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
3446{
3447 PDMDEV_ASSERT_DEVINS(pDevIns);
3448
3449 RT_NOREF(pDevIns, pCritSect);
3450 AssertFailed();
3451 return false;
3452}
3453
3454
3455/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectHasWaiters} */
3456static DECLCALLBACK(bool) pdmR3DevHlp_CritSectHasWaiters(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
3457{
3458 PDMDEV_ASSERT_DEVINS(pDevIns);
3459 RT_NOREF(pDevIns, pCritSect);
3460 AssertFailed();
3461 return false;
3462}
3463
3464
3465/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectGetRecursion} */
3466static DECLCALLBACK(uint32_t) pdmR3DevHlp_CritSectGetRecursion(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
3467{
3468 PDMDEV_ASSERT_DEVINS(pDevIns);
3469
3470 RT_NOREF(pDevIns, pCritSect);
3471 AssertFailed();
3472 return 0;
3473}
3474
3475
3476/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectScheduleExitEvent} */
3477static DECLCALLBACK(int) pdmR3DevHlp_CritSectScheduleExitEvent(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect,
3478 SUPSEMEVENT hEventToSignal)
3479{
3480 PDMDEV_ASSERT_DEVINS(pDevIns);
3481
3482 RT_NOREF(pDevIns, pCritSect, hEventToSignal);
3483 int rc = VERR_NOT_IMPLEMENTED;
3484 AssertFailed();
3485 return rc;
3486}
3487
3488
3489/** @interface_method_impl{PDMDEVHLPR3,pfnCritSectDelete} */
3490static DECLCALLBACK(int) pdmR3DevHlp_CritSectDelete(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
3491{
3492 PDMDEV_ASSERT_DEVINS(pDevIns);
3493
3494 RT_NOREF(pDevIns, pCritSect);
3495 int rc = VERR_NOT_IMPLEMENTED;
3496 AssertFailed();
3497 return rc;
3498}
3499
3500
3501static DECLCALLBACK(int) pdmR3DevHlp_ThreadCreate(PPDMDEVINS pDevIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADDEV pfnThread,
3502 PFNPDMTHREADWAKEUPDEV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName)
3503{
3504 PDMDEV_ASSERT_DEVINS(pDevIns);
3505 LogFlow(("pdmR3DevHlp_ThreadCreate: caller='%s'/%d: ppThread=%p pvUser=%p pfnThread=%p pfnWakeup=%p cbStack=%#zx enmType=%d pszName=%p:{%s}\n",
3506 pDevIns->pReg->szName, pDevIns->iInstance, ppThread, pvUser, pfnThread, pfnWakeup, cbStack, enmType, pszName, pszName));
3507
3508 RT_NOREF(ppThread, pvUser, pfnThread, pfnWakeup, cbStack, enmType, pszName);
3509 int rc = VERR_NOT_IMPLEMENTED;
3510 AssertFailed();
3511
3512 LogFlow(("pdmR3DevHlp_ThreadCreate: caller='%s'/%d: returns %Rrc *ppThread=%RTthrd\n", pDevIns->pReg->szName, pDevIns->iInstance,
3513 rc, *ppThread));
3514 return rc;
3515}
3516
3517
3518static DECLCALLBACK(int) pdmR3DevHlp_ThreadDestroy(PPDMTHREAD pThread, int *pRcThread)
3519{
3520 RT_NOREF(pThread, pRcThread);
3521 int rc = VERR_NOT_IMPLEMENTED;
3522 AssertFailed();
3523 return rc;
3524}
3525
3526
3527static DECLCALLBACK(int) pdmR3DevHlp_ThreadIAmSuspending(PPDMTHREAD pThread)
3528{
3529 RT_NOREF(pThread);
3530 int rc = VERR_NOT_IMPLEMENTED;
3531 AssertFailed();
3532 return rc;
3533}
3534
3535
3536static DECLCALLBACK(int) pdmR3DevHlp_ThreadIamRunning(PPDMTHREAD pThread)
3537{
3538 RT_NOREF(pThread);
3539 int rc = VERR_NOT_IMPLEMENTED;
3540 AssertFailed();
3541 return rc;
3542}
3543
3544
3545static DECLCALLBACK(int) pdmR3DevHlp_ThreadSleep(PPDMTHREAD pThread, RTMSINTERVAL cMillies)
3546{
3547 RT_NOREF(pThread, cMillies);
3548 int rc = VERR_NOT_IMPLEMENTED;
3549 AssertFailed();
3550 return rc;
3551}
3552
3553
3554static DECLCALLBACK(int) pdmR3DevHlp_ThreadSuspend(PPDMTHREAD pThread)
3555{
3556 RT_NOREF(pThread);
3557 int rc = VERR_NOT_IMPLEMENTED;
3558 AssertFailed();
3559 return rc;
3560}
3561
3562
3563static DECLCALLBACK(int) pdmR3DevHlp_ThreadResume(PPDMTHREAD pThread)
3564{
3565 RT_NOREF(pThread);
3566 int rc = VERR_NOT_IMPLEMENTED;
3567 AssertFailed();
3568 return rc;
3569}
3570
3571
3572/** @interface_method_impl{PDMDEVHLPR3,pfnSetAsyncNotification} */
3573static DECLCALLBACK(int) pdmR3DevHlp_SetAsyncNotification(PPDMDEVINS pDevIns, PFNPDMDEVASYNCNOTIFY pfnAsyncNotify)
3574{
3575 PDMDEV_ASSERT_DEVINS(pDevIns);
3576 LogFlow(("pdmR3DevHlp_SetAsyncNotification: caller='%s'/%d: pfnAsyncNotify=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pfnAsyncNotify));
3577
3578 int rc = VERR_NOT_IMPLEMENTED;
3579 AssertStmt(pfnAsyncNotify, rc = VERR_INVALID_PARAMETER);
3580#if 0
3581 AssertStmt(!pDevIns->Internal.s.pfnAsyncNotify, rc = VERR_WRONG_ORDER);
3582 AssertStmt(pDevIns->Internal.s.fIntFlags & (PDMDEVINSINT_FLAGS_SUSPENDED | PDMDEVINSINT_FLAGS_RESET), rc = VERR_WRONG_ORDER);
3583#endif
3584
3585 AssertFailed();
3586
3587 LogFlow(("pdmR3DevHlp_SetAsyncNotification: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3588 return rc;
3589}
3590
3591
3592/** @interface_method_impl{PDMDEVHLPR3,pfnAsyncNotificationCompleted} */
3593static DECLCALLBACK(void) pdmR3DevHlp_AsyncNotificationCompleted(PPDMDEVINS pDevIns)
3594{
3595 PDMDEV_ASSERT_DEVINS(pDevIns);
3596
3597 AssertFailed();
3598}
3599
3600
3601/** @interface_method_impl{PDMDEVHLPR3,pfnRTCRegister} */
3602static DECLCALLBACK(int) pdmR3DevHlp_RTCRegister(PPDMDEVINS pDevIns, PCPDMRTCREG pRtcReg, PCPDMRTCHLP *ppRtcHlp)
3603{
3604 PDMDEV_ASSERT_DEVINS(pDevIns);
3605 LogFlow(("pdmR3DevHlp_RTCRegister: caller='%s'/%d: pRtcReg=%p:{.u32Version=%#x, .pfnWrite=%p, .pfnRead=%p} ppRtcHlp=%p\n",
3606 pDevIns->pReg->szName, pDevIns->iInstance, pRtcReg, pRtcReg->u32Version, pRtcReg->pfnWrite,
3607 pRtcReg->pfnWrite, ppRtcHlp));
3608
3609 /*
3610 * Validate input.
3611 */
3612 if (pRtcReg->u32Version != PDM_RTCREG_VERSION)
3613 {
3614 AssertMsgFailed(("u32Version=%#x expected %#x\n", pRtcReg->u32Version,
3615 PDM_RTCREG_VERSION));
3616 LogFlow(("pdmR3DevHlp_RTCRegister: caller='%s'/%d: returns %Rrc (version)\n",
3617 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
3618 return VERR_INVALID_PARAMETER;
3619 }
3620 if ( !pRtcReg->pfnWrite
3621 || !pRtcReg->pfnRead)
3622 {
3623 Assert(pRtcReg->pfnWrite);
3624 Assert(pRtcReg->pfnRead);
3625 LogFlow(("pdmR3DevHlp_RTCRegister: caller='%s'/%d: returns %Rrc (callbacks)\n",
3626 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
3627 return VERR_INVALID_PARAMETER;
3628 }
3629
3630 if (!ppRtcHlp)
3631 {
3632 Assert(ppRtcHlp);
3633 LogFlow(("pdmR3DevHlp_RTCRegister: caller='%s'/%d: returns %Rrc (ppRtcHlp)\n",
3634 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
3635 return VERR_INVALID_PARAMETER;
3636 }
3637
3638 int rc = VERR_NOT_IMPLEMENTED;
3639 AssertFailed();
3640
3641 LogFlow(("pdmR3DevHlp_RTCRegister: caller='%s'/%d: returns %Rrc\n",
3642 pDevIns->pReg->szName, pDevIns->iInstance, rc));
3643 return rc;
3644}
3645
3646
3647/** @interface_method_impl{PDMDEVHLPR3,pfnDMARegister} */
3648static DECLCALLBACK(int) pdmR3DevHlp_DMARegister(PPDMDEVINS pDevIns, unsigned uChannel, PFNDMATRANSFERHANDLER pfnTransferHandler, void *pvUser)
3649{
3650 PDMDEV_ASSERT_DEVINS(pDevIns);
3651 LogFlow(("pdmR3DevHlp_DMARegister: caller='%s'/%d: uChannel=%d pfnTransferHandler=%p pvUser=%p\n",
3652 pDevIns->pReg->szName, pDevIns->iInstance, uChannel, pfnTransferHandler, pvUser));
3653
3654 int rc = VERR_NOT_IMPLEMENTED;
3655 AssertFailed();
3656
3657 LogFlow(("pdmR3DevHlp_DMARegister: caller='%s'/%d: returns %Rrc\n",
3658 pDevIns->pReg->szName, pDevIns->iInstance, rc));
3659 return rc;
3660}
3661
3662
3663/** @interface_method_impl{PDMDEVHLPR3,pfnDMAReadMemory} */
3664static DECLCALLBACK(int) pdmR3DevHlp_DMAReadMemory(PPDMDEVINS pDevIns, unsigned uChannel, void *pvBuffer, uint32_t off, uint32_t cbBlock, uint32_t *pcbRead)
3665{
3666 PDMDEV_ASSERT_DEVINS(pDevIns);
3667 LogFlow(("pdmR3DevHlp_DMAReadMemory: caller='%s'/%d: uChannel=%d pvBuffer=%p off=%#x cbBlock=%#x pcbRead=%p\n",
3668 pDevIns->pReg->szName, pDevIns->iInstance, uChannel, pvBuffer, off, cbBlock, pcbRead));
3669
3670 int rc = VERR_NOT_IMPLEMENTED;
3671 AssertFailed();
3672
3673 LogFlow(("pdmR3DevHlp_DMAReadMemory: caller='%s'/%d: returns %Rrc\n",
3674 pDevIns->pReg->szName, pDevIns->iInstance, rc));
3675 return rc;
3676}
3677
3678
3679/** @interface_method_impl{PDMDEVHLPR3,pfnDMAWriteMemory} */
3680static DECLCALLBACK(int) pdmR3DevHlp_DMAWriteMemory(PPDMDEVINS pDevIns, unsigned uChannel, const void *pvBuffer, uint32_t off, uint32_t cbBlock, uint32_t *pcbWritten)
3681{
3682 PDMDEV_ASSERT_DEVINS(pDevIns);
3683 LogFlow(("pdmR3DevHlp_DMAWriteMemory: caller='%s'/%d: uChannel=%d pvBuffer=%p off=%#x cbBlock=%#x pcbWritten=%p\n",
3684 pDevIns->pReg->szName, pDevIns->iInstance, uChannel, pvBuffer, off, cbBlock, pcbWritten));
3685
3686 int rc = VERR_NOT_IMPLEMENTED;
3687 AssertFailed();
3688
3689 LogFlow(("pdmR3DevHlp_DMAWriteMemory: caller='%s'/%d: returns %Rrc\n",
3690 pDevIns->pReg->szName, pDevIns->iInstance, rc));
3691 return rc;
3692}
3693
3694
3695/** @interface_method_impl{PDMDEVHLPR3,pfnDMASetDREQ} */
3696static DECLCALLBACK(int) pdmR3DevHlp_DMASetDREQ(PPDMDEVINS pDevIns, unsigned uChannel, unsigned uLevel)
3697{
3698 PDMDEV_ASSERT_DEVINS(pDevIns);
3699 LogFlow(("pdmR3DevHlp_DMASetDREQ: caller='%s'/%d: uChannel=%d uLevel=%d\n",
3700 pDevIns->pReg->szName, pDevIns->iInstance, uChannel, uLevel));
3701
3702 int rc = VERR_NOT_IMPLEMENTED;
3703 AssertFailed();
3704
3705 LogFlow(("pdmR3DevHlp_DMASetDREQ: caller='%s'/%d: returns %Rrc\n",
3706 pDevIns->pReg->szName, pDevIns->iInstance, rc));
3707 return rc;
3708}
3709
3710/** @interface_method_impl{PDMDEVHLPR3,pfnDMAGetChannelMode} */
3711static DECLCALLBACK(uint8_t) pdmR3DevHlp_DMAGetChannelMode(PPDMDEVINS pDevIns, unsigned uChannel)
3712{
3713 PDMDEV_ASSERT_DEVINS(pDevIns);
3714 LogFlow(("pdmR3DevHlp_DMAGetChannelMode: caller='%s'/%d: uChannel=%d\n",
3715 pDevIns->pReg->szName, pDevIns->iInstance, uChannel));
3716
3717 uint8_t u8Mode = (3 << 2); /* Invalid mode. */
3718 AssertFailed();
3719
3720 LogFlow(("pdmR3DevHlp_DMAGetChannelMode: caller='%s'/%d: returns %#04x\n",
3721 pDevIns->pReg->szName, pDevIns->iInstance, u8Mode));
3722 return u8Mode;
3723}
3724
3725/** @interface_method_impl{PDMDEVHLPR3,pfnDMASchedule} */
3726static DECLCALLBACK(void) pdmR3DevHlp_DMASchedule(PPDMDEVINS pDevIns)
3727{
3728 PDMDEV_ASSERT_DEVINS(pDevIns);
3729 LogFlow(("pdmR3DevHlp_DMASchedule: caller='%s'/%d\n",
3730 pDevIns->pReg->szName, pDevIns->iInstance));
3731
3732 AssertFailed();
3733}
3734
3735
3736/** @interface_method_impl{PDMDEVHLPR3,pfnCMOSWrite} */
3737static DECLCALLBACK(int) pdmR3DevHlp_CMOSWrite(PPDMDEVINS pDevIns, unsigned iReg, uint8_t u8Value)
3738{
3739 PDMDEV_ASSERT_DEVINS(pDevIns);
3740 LogFlow(("pdmR3DevHlp_CMOSWrite: caller='%s'/%d: iReg=%#04x u8Value=%#04x\n",
3741 pDevIns->pReg->szName, pDevIns->iInstance, iReg, u8Value));
3742
3743 int rc = VERR_NOT_IMPLEMENTED;
3744 AssertFailed();
3745
3746 LogFlow(("pdmR3DevHlp_CMOSWrite: caller='%s'/%d: return %Rrc\n",
3747 pDevIns->pReg->szName, pDevIns->iInstance, rc));
3748 return rc;
3749}
3750
3751
3752/** @interface_method_impl{PDMDEVHLPR3,pfnCMOSRead} */
3753static DECLCALLBACK(int) pdmR3DevHlp_CMOSRead(PPDMDEVINS pDevIns, unsigned iReg, uint8_t *pu8Value)
3754{
3755 PDMDEV_ASSERT_DEVINS(pDevIns);
3756 LogFlow(("pdmR3DevHlp_CMOSWrite: caller='%s'/%d: iReg=%#04x pu8Value=%p\n",
3757 pDevIns->pReg->szName, pDevIns->iInstance, iReg, pu8Value));
3758
3759 int rc = VERR_NOT_IMPLEMENTED;
3760 AssertFailed();
3761
3762 LogFlow(("pdmR3DevHlp_CMOSWrite: caller='%s'/%d: return %Rrc\n",
3763 pDevIns->pReg->szName, pDevIns->iInstance, rc));
3764 return rc;
3765}
3766
3767
3768/** @interface_method_impl{PDMDEVHLPR3,pfnAssertEMT} */
3769static DECLCALLBACK(bool) pdmR3DevHlp_AssertEMT(PPDMDEVINS pDevIns, const char *pszFile, unsigned iLine, const char *pszFunction)
3770{
3771 PDMDEV_ASSERT_DEVINS(pDevIns);
3772
3773 char szMsg[100];
3774 RTStrPrintf(szMsg, sizeof(szMsg), "AssertEMT '%s'/%d\n", pDevIns->pReg->szName, pDevIns->iInstance);
3775 RTAssertMsg1Weak(szMsg, iLine, pszFile, pszFunction);
3776 AssertBreakpoint();
3777 return false;
3778}
3779
3780
3781/** @interface_method_impl{PDMDEVHLPR3,pfnAssertOther} */
3782static DECLCALLBACK(bool) pdmR3DevHlp_AssertOther(PPDMDEVINS pDevIns, const char *pszFile, unsigned iLine, const char *pszFunction)
3783{
3784 PDMDEV_ASSERT_DEVINS(pDevIns);
3785
3786 char szMsg[100];
3787 RTStrPrintf(szMsg, sizeof(szMsg), "AssertOther '%s'/%d\n", pDevIns->pReg->szName, pDevIns->iInstance);
3788 RTAssertMsg1Weak(szMsg, iLine, pszFile, pszFunction);
3789 AssertBreakpoint();
3790 return false;
3791}
3792
3793
3794/** @interface_method_impl{PDMDEVHLPR3,pfnLdrGetRCInterfaceSymbols} */
3795static DECLCALLBACK(int) pdmR3DevHlp_LdrGetRCInterfaceSymbols(PPDMDEVINS pDevIns, void *pvInterface, size_t cbInterface,
3796 const char *pszSymPrefix, const char *pszSymList)
3797{
3798 PDMDEV_ASSERT_DEVINS(pDevIns);
3799 LogFlow(("pdmR3DevHlp_PDMLdrGetRCInterfaceSymbols: caller='%s'/%d: pvInterface=%p cbInterface=%zu pszSymPrefix=%p:{%s} pszSymList=%p:{%s}\n",
3800 pDevIns->pReg->szName, pDevIns->iInstance, pvInterface, cbInterface, pszSymPrefix, pszSymPrefix, pszSymList, pszSymList));
3801
3802 int rc = VERR_NOT_IMPLEMENTED;
3803 AssertFailed();
3804
3805 LogFlow(("pdmR3DevHlp_PDMLdrGetRCInterfaceSymbols: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName,
3806 pDevIns->iInstance, rc));
3807 return rc;
3808}
3809
3810
3811/** @interface_method_impl{PDMDEVHLPR3,pfnLdrGetR0InterfaceSymbols} */
3812static DECLCALLBACK(int) pdmR3DevHlp_LdrGetR0InterfaceSymbols(PPDMDEVINS pDevIns, void *pvInterface, size_t cbInterface,
3813 const char *pszSymPrefix, const char *pszSymList)
3814{
3815 PDMDEV_ASSERT_DEVINS(pDevIns);
3816 LogFlow(("pdmR3DevHlp_PDMLdrGetR0InterfaceSymbols: caller='%s'/%d: pvInterface=%p cbInterface=%zu pszSymPrefix=%p:{%s} pszSymList=%p:{%s}\n",
3817 pDevIns->pReg->szName, pDevIns->iInstance, pvInterface, cbInterface, pszSymPrefix, pszSymPrefix, pszSymList, pszSymList));
3818
3819 int rc = VERR_NOT_IMPLEMENTED;
3820 AssertFailed();
3821
3822 LogFlow(("pdmR3DevHlp_PDMLdrGetR0InterfaceSymbols: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName,
3823 pDevIns->iInstance, rc));
3824 return rc;
3825}
3826
3827
3828/** @interface_method_impl{PDMDEVHLPR3,pfnCallR0} */
3829static DECLCALLBACK(int) pdmR3DevHlp_CallR0(PPDMDEVINS pDevIns, uint32_t uOperation, uint64_t u64Arg)
3830{
3831 PDMDEV_ASSERT_DEVINS(pDevIns);
3832 LogFlow(("pdmR3DevHlp_CallR0: caller='%s'/%d: uOperation=%#x u64Arg=%#RX64\n",
3833 pDevIns->pReg->szName, pDevIns->iInstance, uOperation, u64Arg));
3834
3835 int rc = VERR_NOT_IMPLEMENTED;
3836 AssertFailed();
3837
3838 LogFlow(("pdmR3DevHlp_CallR0: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName,
3839 pDevIns->iInstance, rc));
3840 return rc;
3841}
3842
3843
3844/** @interface_method_impl{PDMDEVHLPR3,pfnVMGetSuspendReason} */
3845static DECLCALLBACK(VMSUSPENDREASON) pdmR3DevHlp_VMGetSuspendReason(PPDMDEVINS pDevIns)
3846{
3847 PDMDEV_ASSERT_DEVINS(pDevIns);
3848
3849 VMSUSPENDREASON enmReason = VMSUSPENDREASON_INVALID;
3850 AssertFailed();
3851
3852 LogFlow(("pdmR3DevHlp_VMGetSuspendReason: caller='%s'/%d: returns %d\n",
3853 pDevIns->pReg->szName, pDevIns->iInstance, enmReason));
3854 return enmReason;
3855}
3856
3857
3858/** @interface_method_impl{PDMDEVHLPR3,pfnVMGetResumeReason} */
3859static DECLCALLBACK(VMRESUMEREASON) pdmR3DevHlp_VMGetResumeReason(PPDMDEVINS pDevIns)
3860{
3861 PDMDEV_ASSERT_DEVINS(pDevIns);
3862
3863 VMRESUMEREASON enmReason = VMRESUMEREASON_INVALID;
3864 AssertFailed();
3865
3866 LogFlow(("pdmR3DevHlp_VMGetResumeReason: caller='%s'/%d: returns %d\n",
3867 pDevIns->pReg->szName, pDevIns->iInstance, enmReason));
3868 return enmReason;
3869}
3870
3871
3872/** @interface_method_impl{PDMDEVHLPR3,pfnGetUVM} */
3873static DECLCALLBACK(PUVM) pdmR3DevHlp_GetUVM(PPDMDEVINS pDevIns)
3874{
3875 PDMDEV_ASSERT_DEVINS(pDevIns);
3876
3877 AssertFailed();
3878 LogFlow(("pdmR3DevHlp_GetUVM: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, NULL));
3879 return NULL;
3880}
3881
3882
3883/** @interface_method_impl{PDMDEVHLPR3,pfnGetVM} */
3884static DECLCALLBACK(PVMCC) pdmR3DevHlp_GetVM(PPDMDEVINS pDevIns)
3885{
3886 PDMDEV_ASSERT_DEVINS(pDevIns);
3887
3888 AssertFailed();
3889 LogFlow(("pdmR3DevHlp_GetVM: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, NULL));
3890 return NULL;
3891}
3892
3893
3894/** @interface_method_impl{PDMDEVHLPR3,pfnGetVMCPU} */
3895static DECLCALLBACK(PVMCPU) pdmR3DevHlp_GetVMCPU(PPDMDEVINS pDevIns)
3896{
3897 PDMDEV_ASSERT_DEVINS(pDevIns);
3898
3899 AssertFailed();
3900 LogFlow(("pdmR3DevHlp_GetVMCPU: caller='%s'/%d for CPU %u\n", pDevIns->pReg->szName, pDevIns->iInstance, NULL));
3901 return NULL;
3902}
3903
3904
3905/** @interface_method_impl{PDMDEVHLPR3,pfnGetCurrentCpuId} */
3906static DECLCALLBACK(VMCPUID) pdmR3DevHlp_GetCurrentCpuId(PPDMDEVINS pDevIns)
3907{
3908 PDMDEV_ASSERT_DEVINS(pDevIns);
3909
3910 VMCPUID idCpu = 0;
3911 AssertFailed();
3912
3913 LogFlow(("pdmR3DevHlp_GetCurrentCpuId: caller='%s'/%d for CPU %u\n", pDevIns->pReg->szName, pDevIns->iInstance, idCpu));
3914 return idCpu;
3915}
3916
3917
3918/** @interface_method_impl{PDMDEVHLPR3,pfnPCIBusRegister} */
3919static DECLCALLBACK(int) pdmR3DevHlp_PCIBusRegister(PPDMDEVINS pDevIns, PPDMPCIBUSREGR3 pPciBusReg,
3920 PCPDMPCIHLPR3 *ppPciHlp, uint32_t *piBus)
3921{
3922 PDMDEV_ASSERT_DEVINS(pDevIns);
3923 LogFlow(("pdmR3DevHlp_PCIBusRegister: caller='%s'/%d: pPciBusReg=%p:{.u32Version=%#x, .pfnRegisterR3=%p, .pfnIORegionRegisterR3=%p, "
3924 ".pfnInterceptConfigAccesses=%p, pfnConfigRead=%p, pfnConfigWrite=%p, .pfnSetIrqR3=%p, .u32EndVersion=%#x} ppPciHlpR3=%p piBus=%p\n",
3925 pDevIns->pReg->szName, pDevIns->iInstance, pPciBusReg, pPciBusReg->u32Version, pPciBusReg->pfnRegisterR3,
3926 pPciBusReg->pfnIORegionRegisterR3, pPciBusReg->pfnInterceptConfigAccesses, pPciBusReg->pfnConfigRead,
3927 pPciBusReg->pfnConfigWrite, pPciBusReg->pfnSetIrqR3, pPciBusReg->u32EndVersion, ppPciHlp, piBus));
3928
3929 /*
3930 * Validate the structure and output parameters.
3931 */
3932 AssertLogRelMsgReturn(pPciBusReg->u32Version == PDM_PCIBUSREGR3_VERSION,
3933 ("u32Version=%#x expected %#x\n", pPciBusReg->u32Version, PDM_PCIBUSREGR3_VERSION),
3934 VERR_INVALID_PARAMETER);
3935 AssertPtrReturn(pPciBusReg->pfnRegisterR3, VERR_INVALID_PARAMETER);
3936 AssertPtrNullReturn(pPciBusReg->pfnRegisterMsiR3, VERR_INVALID_POINTER);
3937 AssertPtrReturn(pPciBusReg->pfnIORegionRegisterR3, VERR_INVALID_POINTER);
3938 AssertPtrReturn(pPciBusReg->pfnInterceptConfigAccesses, VERR_INVALID_POINTER);
3939 AssertPtrReturn(pPciBusReg->pfnConfigWrite, VERR_INVALID_POINTER);
3940 AssertPtrReturn(pPciBusReg->pfnConfigRead, VERR_INVALID_POINTER);
3941 AssertPtrReturn(pPciBusReg->pfnSetIrqR3, VERR_INVALID_POINTER);
3942 AssertLogRelMsgReturn(pPciBusReg->u32EndVersion == PDM_PCIBUSREGR3_VERSION,
3943 ("u32Version=%#x expected %#x\n", pPciBusReg->u32Version, PDM_PCIBUSREGR3_VERSION),
3944 VERR_INVALID_PARAMETER);
3945 AssertPtrReturn(ppPciHlp, VERR_INVALID_POINTER);
3946 AssertPtrNullReturn(piBus, VERR_INVALID_POINTER);
3947
3948 int rc = VERR_NOT_IMPLEMENTED;
3949 AssertFailed();
3950
3951 Log(("PDM: Registered PCI bus device '%s'/%d pDevIns=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns));
3952
3953 LogFlow(("pdmR3DevHlp_PCIBusRegister: caller='%s'/%d: returns %Rrc *piBus=%u\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *piBus));
3954 return rc;
3955}
3956
3957
3958/** @interface_method_impl{PDMDEVHLPR3,pfnPICRegister} */
3959static DECLCALLBACK(int) pdmR3DevHlp_PICRegister(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp)
3960{
3961 PDMDEV_ASSERT_DEVINS(pDevIns);
3962 LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: pPicReg=%p:{.u32Version=%#x, .pfnSetIrq=%p, .pfnGetInterrupt=%p, .u32TheEnd=%#x } ppPicHlp=%p\n",
3963 pDevIns->pReg->szName, pDevIns->iInstance, pPicReg, pPicReg->u32Version, pPicReg->pfnSetIrq, pPicReg->pfnGetInterrupt, pPicReg->u32TheEnd, ppPicHlp));
3964
3965 /*
3966 * Validate input.
3967 */
3968 AssertMsgReturn(pPicReg->u32Version == PDM_PICREG_VERSION,
3969 ("%s/%d: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pPicReg->u32Version, PDM_PICREG_VERSION),
3970 VERR_INVALID_PARAMETER);
3971 AssertPtrReturn(pPicReg->pfnSetIrq, VERR_INVALID_POINTER);
3972 AssertPtrReturn(pPicReg->pfnGetInterrupt, VERR_INVALID_POINTER);
3973 AssertMsgReturn(pPicReg->u32TheEnd == PDM_PICREG_VERSION,
3974 ("%s/%d: u32TheEnd=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pPicReg->u32TheEnd, PDM_PICREG_VERSION),
3975 VERR_INVALID_PARAMETER);
3976 AssertPtrReturn(ppPicHlp, VERR_INVALID_POINTER);
3977
3978 int rc = VERR_NOT_IMPLEMENTED;
3979 AssertFailed();
3980 Log(("PDM: Registered PIC device '%s'/%d pDevIns=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns));
3981
3982 LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3983 return rc;
3984}
3985
3986
3987/** @interface_method_impl{PDMDEVHLPR3,pfnApicRegister} */
3988static DECLCALLBACK(int) pdmR3DevHlp_ApicRegister(PPDMDEVINS pDevIns)
3989{
3990 PDMDEV_ASSERT_DEVINS(pDevIns);
3991
3992 int rc = VERR_NOT_IMPLEMENTED;
3993 AssertFailed();
3994
3995 LogFlow(("pdmR3DevHlp_ApicRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
3996 return rc;
3997}
3998
3999
4000/** @interface_method_impl{PDMDEVHLPR3,pfnIoApicRegister} */
4001static DECLCALLBACK(int) pdmR3DevHlp_IoApicRegister(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLP *ppIoApicHlp)
4002{
4003 PDMDEV_ASSERT_DEVINS(pDevIns);
4004 LogFlow(("pdmR3DevHlp_IoApicRegister: caller='%s'/%d: pIoApicReg=%p:{.u32Version=%#x, .pfnSetIrq=%p, .pfnSendMsi=%p, .pfnSetEoi=%p, .u32TheEnd=%#x } ppIoApicHlp=%p\n",
4005 pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg, pIoApicReg->u32Version, pIoApicReg->pfnSetIrq, pIoApicReg->pfnSendMsi, pIoApicReg->pfnSetEoi, pIoApicReg->u32TheEnd, ppIoApicHlp));
4006
4007 /*
4008 * Validate input.
4009 */
4010 AssertMsgReturn(pIoApicReg->u32Version == PDM_IOAPICREG_VERSION,
4011 ("%s/%d: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg->u32Version, PDM_IOAPICREG_VERSION),
4012 VERR_VERSION_MISMATCH);
4013 AssertPtrReturn(pIoApicReg->pfnSetIrq, VERR_INVALID_POINTER);
4014 AssertPtrReturn(pIoApicReg->pfnSendMsi, VERR_INVALID_POINTER);
4015 AssertPtrReturn(pIoApicReg->pfnSetEoi, VERR_INVALID_POINTER);
4016 AssertMsgReturn(pIoApicReg->u32TheEnd == PDM_IOAPICREG_VERSION,
4017 ("%s/%d: u32TheEnd=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg->u32TheEnd, PDM_IOAPICREG_VERSION),
4018 VERR_VERSION_MISMATCH);
4019 AssertPtrReturn(ppIoApicHlp, VERR_INVALID_POINTER);
4020
4021 int rc = VERR_NOT_IMPLEMENTED;
4022 AssertFailed();
4023
4024 LogFlow(("pdmR3DevHlp_IoApicRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
4025 return rc;
4026}
4027
4028
4029/** @interface_method_impl{PDMDEVHLPR3,pfnHpetRegister} */
4030static DECLCALLBACK(int) pdmR3DevHlp_HpetRegister(PPDMDEVINS pDevIns, PPDMHPETREG pHpetReg, PCPDMHPETHLPR3 *ppHpetHlpR3)
4031{
4032 PDMDEV_ASSERT_DEVINS(pDevIns);
4033 LogFlow(("pdmR3DevHlp_HpetRegister: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
4034
4035 /*
4036 * Validate input.
4037 */
4038 AssertMsgReturn(pHpetReg->u32Version == PDM_HPETREG_VERSION,
4039 ("%s/%u: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pHpetReg->u32Version, PDM_HPETREG_VERSION),
4040 VERR_VERSION_MISMATCH);
4041 AssertPtrReturn(ppHpetHlpR3, VERR_INVALID_POINTER);
4042
4043 int rc = VERR_NOT_IMPLEMENTED;
4044 AssertFailed();
4045
4046 LogFlow(("pdmR3DevHlp_HpetRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
4047 return rc;
4048}
4049
4050
4051/** @interface_method_impl{PDMDEVHLPR3,pfnPciRawRegister} */
4052static DECLCALLBACK(int) pdmR3DevHlp_PciRawRegister(PPDMDEVINS pDevIns, PPDMPCIRAWREG pPciRawReg, PCPDMPCIRAWHLPR3 *ppPciRawHlpR3)
4053{
4054 PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF_PV(pDevIns);
4055 LogFlow(("pdmR3DevHlp_PciRawRegister: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
4056
4057 /*
4058 * Validate input.
4059 */
4060 if (pPciRawReg->u32Version != PDM_PCIRAWREG_VERSION)
4061 {
4062 AssertMsgFailed(("u32Version=%#x expected %#x\n", pPciRawReg->u32Version, PDM_PCIRAWREG_VERSION));
4063 LogFlow(("pdmR3DevHlp_PciRawRegister: caller='%s'/%d: returns %Rrc (version)\n", pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
4064 return VERR_INVALID_PARAMETER;
4065 }
4066
4067 if (!ppPciRawHlpR3)
4068 {
4069 Assert(ppPciRawHlpR3);
4070 LogFlow(("pdmR3DevHlp_PciRawRegister: caller='%s'/%d: returns %Rrc (ppPciRawHlpR3)\n", pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
4071 return VERR_INVALID_PARAMETER;
4072 }
4073
4074 int rc = VERR_NOT_IMPLEMENTED;
4075 AssertFailed();
4076
4077 LogFlow(("pdmR3DevHlp_PciRawRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
4078 return rc;
4079}
4080
4081
4082/** @interface_method_impl{PDMDEVHLPR3,pfnDMACRegister} */
4083static DECLCALLBACK(int) pdmR3DevHlp_DMACRegister(PPDMDEVINS pDevIns, PPDMDMACREG pDmacReg, PCPDMDMACHLP *ppDmacHlp)
4084{
4085 PDMDEV_ASSERT_DEVINS(pDevIns);
4086 LogFlow(("pdmR3DevHlp_DMACRegister: caller='%s'/%d: pDmacReg=%p:{.u32Version=%#x, .pfnRun=%p, .pfnRegister=%p, .pfnReadMemory=%p, .pfnWriteMemory=%p, .pfnSetDREQ=%p, .pfnGetChannelMode=%p} ppDmacHlp=%p\n",
4087 pDevIns->pReg->szName, pDevIns->iInstance, pDmacReg, pDmacReg->u32Version, pDmacReg->pfnRun, pDmacReg->pfnRegister,
4088 pDmacReg->pfnReadMemory, pDmacReg->pfnWriteMemory, pDmacReg->pfnSetDREQ, pDmacReg->pfnGetChannelMode, ppDmacHlp));
4089
4090 /*
4091 * Validate input.
4092 */
4093 if (pDmacReg->u32Version != PDM_DMACREG_VERSION)
4094 {
4095 AssertMsgFailed(("u32Version=%#x expected %#x\n", pDmacReg->u32Version,
4096 PDM_DMACREG_VERSION));
4097 LogFlow(("pdmR3DevHlp_DMACRegister: caller='%s'/%d: returns %Rrc (version)\n",
4098 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
4099 return VERR_INVALID_PARAMETER;
4100 }
4101 if ( !pDmacReg->pfnRun
4102 || !pDmacReg->pfnRegister
4103 || !pDmacReg->pfnReadMemory
4104 || !pDmacReg->pfnWriteMemory
4105 || !pDmacReg->pfnSetDREQ
4106 || !pDmacReg->pfnGetChannelMode)
4107 {
4108 Assert(pDmacReg->pfnRun);
4109 Assert(pDmacReg->pfnRegister);
4110 Assert(pDmacReg->pfnReadMemory);
4111 Assert(pDmacReg->pfnWriteMemory);
4112 Assert(pDmacReg->pfnSetDREQ);
4113 Assert(pDmacReg->pfnGetChannelMode);
4114 LogFlow(("pdmR3DevHlp_DMACRegister: caller='%s'/%d: returns %Rrc (callbacks)\n",
4115 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
4116 return VERR_INVALID_PARAMETER;
4117 }
4118
4119 if (!ppDmacHlp)
4120 {
4121 Assert(ppDmacHlp);
4122 LogFlow(("pdmR3DevHlp_DMACRegister: caller='%s'/%d: returns %Rrc (ppDmacHlp)\n",
4123 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
4124 return VERR_INVALID_PARAMETER;
4125 }
4126
4127 int rc = VERR_NOT_IMPLEMENTED;
4128 AssertFailed();
4129
4130 LogFlow(("pdmR3DevHlp_DMACRegister: caller='%s'/%d: returns %Rrc\n",
4131 pDevIns->pReg->szName, pDevIns->iInstance, rc));
4132 return rc;
4133}
4134
4135
4136/**
4137 * @copydoc PDMDEVHLPR3::pfnRegisterVMMDevHeap
4138 */
4139static DECLCALLBACK(int) pdmR3DevHlp_RegisterVMMDevHeap(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbHeap)
4140{
4141 PDMDEV_ASSERT_DEVINS(pDevIns);
4142 LogFlow(("pdmR3DevHlp_RegisterVMMDevHeap: caller='%s'/%d: GCPhys=%RGp pvHeap=%p cbHeap=%#x\n",
4143 pDevIns->pReg->szName, pDevIns->iInstance, GCPhys, pvHeap, cbHeap));
4144
4145 int rc = VERR_NOT_IMPLEMENTED;
4146 AssertFailed();
4147
4148 LogFlow(("pdmR3DevHlp_RegisterVMMDevHeap: caller='%s'/%d: returns %Rrc\n",
4149 pDevIns->pReg->szName, pDevIns->iInstance, rc));
4150 return rc;
4151}
4152
4153
4154/**
4155 * @interface_method_impl{PDMDEVHLPR3,pfnFirmwareRegister}
4156 */
4157static DECLCALLBACK(int) pdmR3DevHlp_FirmwareRegister(PPDMDEVINS pDevIns, PCPDMFWREG pFwReg, PCPDMFWHLPR3 *ppFwHlp)
4158{
4159 PDMDEV_ASSERT_DEVINS(pDevIns);
4160 LogFlow(("pdmR3DevHlp_FirmwareRegister: caller='%s'/%d: pFWReg=%p:{.u32Version=%#x, .pfnIsHardReset=%p, .u32TheEnd=%#x} ppFwHlp=%p\n",
4161 pDevIns->pReg->szName, pDevIns->iInstance, pFwReg, pFwReg->u32Version, pFwReg->pfnIsHardReset, pFwReg->u32TheEnd, ppFwHlp));
4162
4163 /*
4164 * Validate input.
4165 */
4166 if (pFwReg->u32Version != PDM_FWREG_VERSION)
4167 {
4168 AssertMsgFailed(("u32Version=%#x expected %#x\n", pFwReg->u32Version, PDM_FWREG_VERSION));
4169 LogFlow(("pdmR3DevHlp_FirmwareRegister: caller='%s'/%d: returns %Rrc (version)\n",
4170 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
4171 return VERR_INVALID_PARAMETER;
4172 }
4173 if (!pFwReg->pfnIsHardReset)
4174 {
4175 Assert(pFwReg->pfnIsHardReset);
4176 LogFlow(("pdmR3DevHlp_FirmwareRegister: caller='%s'/%d: returns %Rrc (callbacks)\n",
4177 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
4178 return VERR_INVALID_PARAMETER;
4179 }
4180
4181 if (!ppFwHlp)
4182 {
4183 Assert(ppFwHlp);
4184 LogFlow(("pdmR3DevHlp_FirmwareRegister: caller='%s'/%d: returns %Rrc (ppFwHlp)\n",
4185 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER));
4186 return VERR_INVALID_PARAMETER;
4187 }
4188
4189 int rc = VERR_NOT_IMPLEMENTED;
4190 AssertFailed();
4191
4192 LogFlow(("pdmR3DevHlp_FirmwareRegister: caller='%s'/%d: returns %Rrc\n",
4193 pDevIns->pReg->szName, pDevIns->iInstance, rc));
4194 return rc;
4195}
4196
4197
4198/** @interface_method_impl{PDMDEVHLPR3,pfnVMReset} */
4199static DECLCALLBACK(int) pdmR3DevHlp_VMReset(PPDMDEVINS pDevIns, uint32_t fFlags)
4200{
4201 PDMDEV_ASSERT_DEVINS(pDevIns);
4202 LogFlow(("pdmR3DevHlp_VMReset: caller='%s'/%d: fFlags=%#x\n",
4203 pDevIns->pReg->szName, pDevIns->iInstance, fFlags));
4204
4205 int rc = VERR_NOT_IMPLEMENTED;
4206 AssertFailed();
4207
4208 LogFlow(("pdmR3DevHlp_VMReset: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
4209 return rc;
4210}
4211
4212
4213/** @interface_method_impl{PDMDEVHLPR3,pfnVMSuspend} */
4214static DECLCALLBACK(int) pdmR3DevHlp_VMSuspend(PPDMDEVINS pDevIns)
4215{
4216 PDMDEV_ASSERT_DEVINS(pDevIns);
4217 LogFlow(("pdmR3DevHlp_VMSuspend: caller='%s'/%d:\n",
4218 pDevIns->pReg->szName, pDevIns->iInstance));
4219
4220 int rc = VERR_NOT_IMPLEMENTED;
4221 AssertFailed();
4222
4223 LogFlow(("pdmR3DevHlp_VMSuspend: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
4224 return rc;
4225}
4226
4227
4228/** @interface_method_impl{PDMDEVHLPR3,pfnVMSuspendSaveAndPowerOff} */
4229static DECLCALLBACK(int) pdmR3DevHlp_VMSuspendSaveAndPowerOff(PPDMDEVINS pDevIns)
4230{
4231 PDMDEV_ASSERT_DEVINS(pDevIns);
4232 LogFlow(("pdmR3DevHlp_VMSuspendSaveAndPowerOff: caller='%s'/%d:\n",
4233 pDevIns->pReg->szName, pDevIns->iInstance));
4234
4235 int rc = VERR_NOT_IMPLEMENTED;
4236 AssertFailed();
4237
4238 LogFlow(("pdmR3DevHlp_VMSuspendSaveAndPowerOff: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
4239 return rc;
4240}
4241
4242
4243/** @interface_method_impl{PDMDEVHLPR3,pfnVMPowerOff} */
4244static DECLCALLBACK(int) pdmR3DevHlp_VMPowerOff(PPDMDEVINS pDevIns)
4245{
4246 PDMDEV_ASSERT_DEVINS(pDevIns);
4247 LogFlow(("pdmR3DevHlp_VMPowerOff: caller='%s'/%d:\n",
4248 pDevIns->pReg->szName, pDevIns->iInstance));
4249
4250 int rc = VERR_NOT_IMPLEMENTED;
4251 AssertFailed();
4252
4253 LogFlow(("pdmR3DevHlp_VMPowerOff: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
4254 return rc;
4255}
4256
4257
4258/** @interface_method_impl{PDMDEVHLPR3,pfnA20IsEnabled} */
4259static DECLCALLBACK(bool) pdmR3DevHlp_A20IsEnabled(PPDMDEVINS pDevIns)
4260{
4261 PDMDEV_ASSERT_DEVINS(pDevIns);
4262
4263 bool fRc = false;
4264 AssertFailed();
4265
4266 LogFlow(("pdmR3DevHlp_A20IsEnabled: caller='%s'/%d: returns %d\n", pDevIns->pReg->szName, pDevIns->iInstance, fRc));
4267 return fRc;
4268}
4269
4270
4271/** @interface_method_impl{PDMDEVHLPR3,pfnA20Set} */
4272static DECLCALLBACK(void) pdmR3DevHlp_A20Set(PPDMDEVINS pDevIns, bool fEnable)
4273{
4274 PDMDEV_ASSERT_DEVINS(pDevIns);
4275 LogFlow(("pdmR3DevHlp_A20Set: caller='%s'/%d: fEnable=%d\n", pDevIns->pReg->szName, pDevIns->iInstance, fEnable));
4276 AssertFailed();
4277}
4278
4279
4280/** @interface_method_impl{PDMDEVHLPR3,pfnGetCpuId} */
4281static DECLCALLBACK(void) pdmR3DevHlp_GetCpuId(PPDMDEVINS pDevIns, uint32_t iLeaf,
4282 uint32_t *pEax, uint32_t *pEbx, uint32_t *pEcx, uint32_t *pEdx)
4283{
4284 PDMDEV_ASSERT_DEVINS(pDevIns);
4285 LogFlow(("pdmR3DevHlp_GetCpuId: caller='%s'/%d: iLeaf=%d pEax=%p pEbx=%p pEcx=%p pEdx=%p\n",
4286 pDevIns->pReg->szName, pDevIns->iInstance, iLeaf, pEax, pEbx, pEcx, pEdx));
4287 AssertPtr(pEax); AssertPtr(pEbx); AssertPtr(pEcx); AssertPtr(pEdx);
4288
4289 AssertFailed();
4290
4291 LogFlow(("pdmR3DevHlp_GetCpuId: caller='%s'/%d: returns void - *pEax=%#x *pEbx=%#x *pEcx=%#x *pEdx=%#x\n",
4292 pDevIns->pReg->szName, pDevIns->iInstance, *pEax, *pEbx, *pEcx, *pEdx));
4293}
4294
4295const PDMDEVHLPR3 g_tstDevPdmDevHlpR3 =
4296{
4297 PDM_DEVHLPR3_VERSION,
4298 pdmR3DevHlp_IoPortCreateEx,
4299 pdmR3DevHlp_IoPortMap,
4300 pdmR3DevHlp_IoPortUnmap,
4301 pdmR3DevHlp_IoPortGetMappingAddress,
4302 pdmR3DevHlp_MmioCreateEx,
4303 pdmR3DevHlp_MmioMap,
4304 pdmR3DevHlp_MmioUnmap,
4305 pdmR3DevHlp_MmioReduce,
4306 pdmR3DevHlp_MmioGetMappingAddress,
4307 pdmR3DevHlp_Mmio2Create,
4308 pdmR3DevHlp_Mmio2Destroy,
4309 pdmR3DevHlp_Mmio2Map,
4310 pdmR3DevHlp_Mmio2Unmap,
4311 pdmR3DevHlp_Mmio2Reduce,
4312 pdmR3DevHlp_Mmio2GetMappingAddress,
4313 pdmR3DevHlp_Mmio2ChangeRegionNo,
4314 pdmR3DevHlp_ROMRegister,
4315 pdmR3DevHlp_ROMProtectShadow,
4316 pdmR3DevHlp_SSMRegister,
4317 pdmR3DevHlp_SSMPutStruct,
4318 pdmR3DevHlp_SSMPutStructEx,
4319 pdmR3DevHlp_SSMPutBool,
4320 pdmR3DevHlp_SSMPutU8,
4321 pdmR3DevHlp_SSMPutS8,
4322 pdmR3DevHlp_SSMPutU16,
4323 pdmR3DevHlp_SSMPutS16,
4324 pdmR3DevHlp_SSMPutU32,
4325 pdmR3DevHlp_SSMPutS32,
4326 pdmR3DevHlp_SSMPutU64,
4327 pdmR3DevHlp_SSMPutS64,
4328 pdmR3DevHlp_SSMPutU128,
4329 pdmR3DevHlp_SSMPutS128,
4330 pdmR3DevHlp_SSMPutUInt,
4331 pdmR3DevHlp_SSMPutSInt,
4332 pdmR3DevHlp_SSMPutGCUInt,
4333 pdmR3DevHlp_SSMPutGCUIntReg,
4334 pdmR3DevHlp_SSMPutGCPhys32,
4335 pdmR3DevHlp_SSMPutGCPhys64,
4336 pdmR3DevHlp_SSMPutGCPhys,
4337 pdmR3DevHlp_SSMPutGCPtr,
4338 pdmR3DevHlp_SSMPutGCUIntPtr,
4339 pdmR3DevHlp_SSMPutRCPtr,
4340 pdmR3DevHlp_SSMPutIOPort,
4341 pdmR3DevHlp_SSMPutSel,
4342 pdmR3DevHlp_SSMPutMem,
4343 pdmR3DevHlp_SSMPutStrZ,
4344 pdmR3DevHlp_SSMGetStruct,
4345 pdmR3DevHlp_SSMGetStructEx,
4346 pdmR3DevHlp_SSMGetBool,
4347 pdmR3DevHlp_SSMGetBoolV,
4348 pdmR3DevHlp_SSMGetU8,
4349 pdmR3DevHlp_SSMGetU8V,
4350 pdmR3DevHlp_SSMGetS8,
4351 pdmR3DevHlp_SSMGetS8V,
4352 pdmR3DevHlp_SSMGetU16,
4353 pdmR3DevHlp_SSMGetU16V,
4354 pdmR3DevHlp_SSMGetS16,
4355 pdmR3DevHlp_SSMGetS16V,
4356 pdmR3DevHlp_SSMGetU32,
4357 pdmR3DevHlp_SSMGetU32V,
4358 pdmR3DevHlp_SSMGetS32,
4359 pdmR3DevHlp_SSMGetS32V,
4360 pdmR3DevHlp_SSMGetU64,
4361 pdmR3DevHlp_SSMGetU64V,
4362 pdmR3DevHlp_SSMGetS64,
4363 pdmR3DevHlp_SSMGetS64V,
4364 pdmR3DevHlp_SSMGetU128,
4365 pdmR3DevHlp_SSMGetU128V,
4366 pdmR3DevHlp_SSMGetS128,
4367 pdmR3DevHlp_SSMGetS128V,
4368 pdmR3DevHlp_SSMGetGCPhys32,
4369 pdmR3DevHlp_SSMGetGCPhys32V,
4370 pdmR3DevHlp_SSMGetGCPhys64,
4371 pdmR3DevHlp_SSMGetGCPhys64V,
4372 pdmR3DevHlp_SSMGetGCPhys,
4373 pdmR3DevHlp_SSMGetGCPhysV,
4374 pdmR3DevHlp_SSMGetUInt,
4375 pdmR3DevHlp_SSMGetSInt,
4376 pdmR3DevHlp_SSMGetGCUInt,
4377 pdmR3DevHlp_SSMGetGCUIntReg,
4378 pdmR3DevHlp_SSMGetGCPtr,
4379 pdmR3DevHlp_SSMGetGCUIntPtr,
4380 pdmR3DevHlp_SSMGetRCPtr,
4381 pdmR3DevHlp_SSMGetIOPort,
4382 pdmR3DevHlp_SSMGetSel,
4383 pdmR3DevHlp_SSMGetMem,
4384 pdmR3DevHlp_SSMGetStrZ,
4385 pdmR3DevHlp_SSMGetStrZEx,
4386 pdmR3DevHlp_SSMSkip,
4387 pdmR3DevHlp_SSMSkipToEndOfUnit,
4388 pdmR3DevHlp_SSMSetLoadError,
4389 pdmR3DevHlp_SSMSetLoadErrorV,
4390 pdmR3DevHlp_SSMSetCfgError,
4391 pdmR3DevHlp_SSMSetCfgErrorV,
4392 pdmR3DevHlp_SSMHandleGetStatus,
4393 pdmR3DevHlp_SSMHandleGetAfter,
4394 pdmR3DevHlp_SSMHandleIsLiveSave,
4395 pdmR3DevHlp_SSMHandleMaxDowntime,
4396 pdmR3DevHlp_SSMHandleHostBits,
4397 pdmR3DevHlp_SSMHandleRevision,
4398 pdmR3DevHlp_SSMHandleVersion,
4399 pdmR3DevHlp_SSMHandleHostOSAndArch,
4400 pdmR3DevHlp_TMTimerCreate,
4401 pdmR3DevHlp_TimerCreate,
4402 pdmR3DevHlp_TimerToPtr,
4403 pdmR3DevHlp_TimerFromMicro,
4404 pdmR3DevHlp_TimerFromMilli,
4405 pdmR3DevHlp_TimerFromNano,
4406 pdmR3DevHlp_TimerGet,
4407 pdmR3DevHlp_TimerGetFreq,
4408 pdmR3DevHlp_TimerGetNano,
4409 pdmR3DevHlp_TimerIsActive,
4410 pdmR3DevHlp_TimerIsLockOwner,
4411 pdmR3DevHlp_TimerLockClock,
4412 pdmR3DevHlp_TimerLockClock2,
4413 pdmR3DevHlp_TimerSet,
4414 pdmR3DevHlp_TimerSetFrequencyHint,
4415 pdmR3DevHlp_TimerSetMicro,
4416 pdmR3DevHlp_TimerSetMillies,
4417 pdmR3DevHlp_TimerSetNano,
4418 pdmR3DevHlp_TimerSetRelative,
4419 pdmR3DevHlp_TimerStop,
4420 pdmR3DevHlp_TimerUnlockClock,
4421 pdmR3DevHlp_TimerUnlockClock2,
4422 pdmR3DevHlp_TimerSetCritSect,
4423 pdmR3DevHlp_TimerSave,
4424 pdmR3DevHlp_TimerLoad,
4425 pdmR3DevHlp_TimerDestroy,
4426 pdmR3DevHlp_TimerSkipLoad,
4427 pdmR3DevHlp_TMUtcNow,
4428 pdmR3DevHlp_CFGMExists,
4429 pdmR3DevHlp_CFGMQueryType,
4430 pdmR3DevHlp_CFGMQuerySize,
4431 pdmR3DevHlp_CFGMQueryInteger,
4432 pdmR3DevHlp_CFGMQueryIntegerDef,
4433 pdmR3DevHlp_CFGMQueryString,
4434 pdmR3DevHlp_CFGMQueryStringDef,
4435 pdmR3DevHlp_CFGMQueryBytes,
4436 pdmR3DevHlp_CFGMQueryU64,
4437 pdmR3DevHlp_CFGMQueryU64Def,
4438 pdmR3DevHlp_CFGMQueryS64,
4439 pdmR3DevHlp_CFGMQueryS64Def,
4440 pdmR3DevHlp_CFGMQueryU32,
4441 pdmR3DevHlp_CFGMQueryU32Def,
4442 pdmR3DevHlp_CFGMQueryS32,
4443 pdmR3DevHlp_CFGMQueryS32Def,
4444 pdmR3DevHlp_CFGMQueryU16,
4445 pdmR3DevHlp_CFGMQueryU16Def,
4446 pdmR3DevHlp_CFGMQueryS16,
4447 pdmR3DevHlp_CFGMQueryS16Def,
4448 pdmR3DevHlp_CFGMQueryU8,
4449 pdmR3DevHlp_CFGMQueryU8Def,
4450 pdmR3DevHlp_CFGMQueryS8,
4451 pdmR3DevHlp_CFGMQueryS8Def,
4452 pdmR3DevHlp_CFGMQueryBool,
4453 pdmR3DevHlp_CFGMQueryBoolDef,
4454 pdmR3DevHlp_CFGMQueryPort,
4455 pdmR3DevHlp_CFGMQueryPortDef,
4456 pdmR3DevHlp_CFGMQueryUInt,
4457 pdmR3DevHlp_CFGMQueryUIntDef,
4458 pdmR3DevHlp_CFGMQuerySInt,
4459 pdmR3DevHlp_CFGMQuerySIntDef,
4460 pdmR3DevHlp_CFGMQueryPtr,
4461 pdmR3DevHlp_CFGMQueryPtrDef,
4462 pdmR3DevHlp_CFGMQueryGCPtr,
4463 pdmR3DevHlp_CFGMQueryGCPtrDef,
4464 pdmR3DevHlp_CFGMQueryGCPtrU,
4465 pdmR3DevHlp_CFGMQueryGCPtrUDef,
4466 pdmR3DevHlp_CFGMQueryGCPtrS,
4467 pdmR3DevHlp_CFGMQueryGCPtrSDef,
4468 pdmR3DevHlp_CFGMQueryStringAlloc,
4469 pdmR3DevHlp_CFGMQueryStringAllocDef,
4470 pdmR3DevHlp_CFGMGetParent,
4471 pdmR3DevHlp_CFGMGetChild,
4472 pdmR3DevHlp_CFGMGetChildF,
4473 pdmR3DevHlp_CFGMGetChildFV,
4474 pdmR3DevHlp_CFGMGetFirstChild,
4475 pdmR3DevHlp_CFGMGetNextChild,
4476 pdmR3DevHlp_CFGMGetName,
4477 pdmR3DevHlp_CFGMGetNameLen,
4478 pdmR3DevHlp_CFGMAreChildrenValid,
4479 pdmR3DevHlp_CFGMGetFirstValue,
4480 pdmR3DevHlp_CFGMGetNextValue,
4481 pdmR3DevHlp_CFGMGetValueName,
4482 pdmR3DevHlp_CFGMGetValueNameLen,
4483 pdmR3DevHlp_CFGMGetValueType,
4484 pdmR3DevHlp_CFGMAreValuesValid,
4485 pdmR3DevHlp_CFGMValidateConfig,
4486 pdmR3DevHlp_PhysRead,
4487 pdmR3DevHlp_PhysWrite,
4488 pdmR3DevHlp_PhysGCPhys2CCPtr,
4489 pdmR3DevHlp_PhysGCPhys2CCPtrReadOnly,
4490 pdmR3DevHlp_PhysReleasePageMappingLock,
4491 pdmR3DevHlp_PhysReadGCVirt,
4492 pdmR3DevHlp_PhysWriteGCVirt,
4493 pdmR3DevHlp_PhysGCPtr2GCPhys,
4494 pdmR3DevHlp_MMHeapAlloc,
4495 pdmR3DevHlp_MMHeapAllocZ,
4496 pdmR3DevHlp_MMHeapFree,
4497 pdmR3DevHlp_VMState,
4498 pdmR3DevHlp_VMTeleportedAndNotFullyResumedYet,
4499 pdmR3DevHlp_VMSetError,
4500 pdmR3DevHlp_VMSetErrorV,
4501 pdmR3DevHlp_VMSetRuntimeError,
4502 pdmR3DevHlp_VMSetRuntimeErrorV,
4503 pdmR3DevHlp_DBGFStopV,
4504 pdmR3DevHlp_DBGFInfoRegister,
4505 pdmR3DevHlp_DBGFInfoRegisterArgv,
4506 pdmR3DevHlp_DBGFRegRegister,
4507 pdmR3DevHlp_DBGFTraceBuf,
4508 pdmR3DevHlp_STAMRegister,
4509 pdmR3DevHlp_STAMRegisterV,
4510 pdmR3DevHlp_PCIRegister,
4511 pdmR3DevHlp_PCIRegisterMsi,
4512 pdmR3DevHlp_PCIIORegionRegister,
4513 pdmR3DevHlp_PCIInterceptConfigAccesses,
4514 pdmR3DevHlp_PCIConfigWrite,
4515 pdmR3DevHlp_PCIConfigRead,
4516 pdmR3DevHlp_PCIPhysRead,
4517 pdmR3DevHlp_PCIPhysWrite,
4518 pdmR3DevHlp_PCISetIrq,
4519 pdmR3DevHlp_PCISetIrqNoWait,
4520 pdmR3DevHlp_ISASetIrq,
4521 pdmR3DevHlp_ISASetIrqNoWait,
4522 pdmR3DevHlp_IoApicSendMsi,
4523 pdmR3DevHlp_DriverAttach,
4524 pdmR3DevHlp_DriverDetach,
4525 pdmR3DevHlp_DriverReconfigure,
4526 pdmR3DevHlp_QueueCreatePtr,
4527 pdmR3DevHlp_QueueCreate,
4528 pdmR3DevHlp_QueueToPtr,
4529 pdmR3DevHlp_QueueAlloc,
4530 pdmR3DevHlp_QueueInsert,
4531 pdmR3DevHlp_QueueInsertEx,
4532 pdmR3DevHlp_QueueFlushIfNecessary,
4533 pdmR3DevHlp_TaskCreate,
4534 pdmR3DevHlp_TaskTrigger,
4535 pdmR3DevHlp_SUPSemEventCreate,
4536 pdmR3DevHlp_SUPSemEventClose,
4537 pdmR3DevHlp_SUPSemEventSignal,
4538 pdmR3DevHlp_SUPSemEventWaitNoResume,
4539 pdmR3DevHlp_SUPSemEventWaitNsAbsIntr,
4540 pdmR3DevHlp_SUPSemEventWaitNsRelIntr,
4541 pdmR3DevHlp_SUPSemEventGetResolution,
4542 pdmR3DevHlp_SUPSemEventMultiCreate,
4543 pdmR3DevHlp_SUPSemEventMultiClose,
4544 pdmR3DevHlp_SUPSemEventMultiSignal,
4545 pdmR3DevHlp_SUPSemEventMultiReset,
4546 pdmR3DevHlp_SUPSemEventMultiWaitNoResume,
4547 pdmR3DevHlp_SUPSemEventMultiWaitNsAbsIntr,
4548 pdmR3DevHlp_SUPSemEventMultiWaitNsRelIntr,
4549 pdmR3DevHlp_SUPSemEventMultiGetResolution,
4550 pdmR3DevHlp_CritSectInit,
4551 pdmR3DevHlp_CritSectGetNop,
4552 pdmR3DevHlp_CritSectGetNopR0,
4553 pdmR3DevHlp_CritSectGetNopRC,
4554 pdmR3DevHlp_SetDeviceCritSect,
4555 pdmR3DevHlp_CritSectYield,
4556 pdmR3DevHlp_CritSectEnter,
4557 pdmR3DevHlp_CritSectEnterDebug,
4558 pdmR3DevHlp_CritSectTryEnter,
4559 pdmR3DevHlp_CritSectTryEnterDebug,
4560 pdmR3DevHlp_CritSectLeave,
4561 pdmR3DevHlp_CritSectIsOwner,
4562 pdmR3DevHlp_CritSectIsInitialized,
4563 pdmR3DevHlp_CritSectHasWaiters,
4564 pdmR3DevHlp_CritSectGetRecursion,
4565 pdmR3DevHlp_CritSectScheduleExitEvent,
4566 pdmR3DevHlp_CritSectDelete,
4567 pdmR3DevHlp_ThreadCreate,
4568 pdmR3DevHlp_ThreadDestroy,
4569 pdmR3DevHlp_ThreadIAmSuspending,
4570 pdmR3DevHlp_ThreadIamRunning,
4571 pdmR3DevHlp_ThreadSleep,
4572 pdmR3DevHlp_ThreadSuspend,
4573 pdmR3DevHlp_ThreadResume,
4574 pdmR3DevHlp_SetAsyncNotification,
4575 pdmR3DevHlp_AsyncNotificationCompleted,
4576 pdmR3DevHlp_RTCRegister,
4577 pdmR3DevHlp_PCIBusRegister,
4578 pdmR3DevHlp_PICRegister,
4579 pdmR3DevHlp_ApicRegister,
4580 pdmR3DevHlp_IoApicRegister,
4581 pdmR3DevHlp_HpetRegister,
4582 pdmR3DevHlp_PciRawRegister,
4583 pdmR3DevHlp_DMACRegister,
4584 pdmR3DevHlp_DMARegister,
4585 pdmR3DevHlp_DMAReadMemory,
4586 pdmR3DevHlp_DMAWriteMemory,
4587 pdmR3DevHlp_DMASetDREQ,
4588 pdmR3DevHlp_DMAGetChannelMode,
4589 pdmR3DevHlp_DMASchedule,
4590 pdmR3DevHlp_CMOSWrite,
4591 pdmR3DevHlp_CMOSRead,
4592 pdmR3DevHlp_AssertEMT,
4593 pdmR3DevHlp_AssertOther,
4594 pdmR3DevHlp_LdrGetRCInterfaceSymbols,
4595 pdmR3DevHlp_LdrGetR0InterfaceSymbols,
4596 pdmR3DevHlp_CallR0,
4597 pdmR3DevHlp_VMGetSuspendReason,
4598 pdmR3DevHlp_VMGetResumeReason,
4599 pdmR3DevHlp_PhysBulkGCPhys2CCPtr,
4600 pdmR3DevHlp_PhysBulkGCPhys2CCPtrReadOnly,
4601 pdmR3DevHlp_PhysBulkReleasePageMappingLocks,
4602 NULL,
4603 NULL,
4604 NULL,
4605 NULL,
4606 NULL,
4607 NULL,
4608 NULL,
4609 NULL,
4610 NULL,
4611 NULL,
4612 pdmR3DevHlp_GetUVM,
4613 pdmR3DevHlp_GetVM,
4614 pdmR3DevHlp_GetVMCPU,
4615 pdmR3DevHlp_GetCurrentCpuId,
4616 pdmR3DevHlp_RegisterVMMDevHeap,
4617 pdmR3DevHlp_FirmwareRegister,
4618 pdmR3DevHlp_VMReset,
4619 pdmR3DevHlp_VMSuspend,
4620 pdmR3DevHlp_VMSuspendSaveAndPowerOff,
4621 pdmR3DevHlp_VMPowerOff,
4622 pdmR3DevHlp_A20IsEnabled,
4623 pdmR3DevHlp_A20Set,
4624 pdmR3DevHlp_GetCpuId,
4625 pdmR3DevHlp_TMTimeVirtGet,
4626 pdmR3DevHlp_TMTimeVirtGetFreq,
4627 pdmR3DevHlp_TMTimeVirtGetNano,
4628 pdmR3DevHlp_GetSupDrvSession,
4629 pdmR3DevHlp_QueryGenericUserObject,
4630 PDM_DEVHLPR3_VERSION /* the end */
4631};
4632
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette