1 | /* $Id: tstDevicePdmDevHlpR0.cpp 92081 2021-10-26 12:15:14Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * tstDevice - Test framework for PDM devices/drivers, PDM fake R0 helper implementation.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2021 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 | #undef IN_RING3
|
---|
24 | #undef IN_SUP_R3
|
---|
25 | #define IN_RING0
|
---|
26 | #define IN_SUP_R0
|
---|
27 | #define LINUX_VERSION_CODE 0
|
---|
28 | #define KERNEL_VERSION(a,b,c) 1
|
---|
29 | #include <VBox/types.h>
|
---|
30 | #include <VBox/version.h>
|
---|
31 | #include <VBox/vmm/pdmpci.h>
|
---|
32 |
|
---|
33 | #include <iprt/assert.h>
|
---|
34 | #include <iprt/mem.h>
|
---|
35 | #include <iprt/rand.h>
|
---|
36 | #include <iprt/string.h>
|
---|
37 |
|
---|
38 | #include "tstDeviceInternal.h"
|
---|
39 |
|
---|
40 |
|
---|
41 | /*********************************************************************************************************************************
|
---|
42 | * Defined Constants And Macros *
|
---|
43 | *********************************************************************************************************************************/
|
---|
44 |
|
---|
45 | /* Temporarily until the stubs got implemented. */
|
---|
46 | #define VBOX_TSTDEV_NOT_IMPLEMENTED_STUBS_FAKE_SUCCESS 1
|
---|
47 |
|
---|
48 | /** @def PDMDEV_ASSERT_DEVINS
|
---|
49 | * Asserts the validity of the device instance.
|
---|
50 | */
|
---|
51 | #ifdef VBOX_STRICT
|
---|
52 | # define PDMDEV_ASSERT_DEVINS(pDevIns) \
|
---|
53 | do { \
|
---|
54 | AssertPtr(pDevIns); \
|
---|
55 | Assert(pDevIns->u32Version == PDM_DEVINS_VERSION); \
|
---|
56 | Assert(pDevIns->CTX_SUFF(pvInstanceDataFor) == (void *)&pDevIns->achInstanceData[0]); \
|
---|
57 | } while (0)
|
---|
58 | #else
|
---|
59 | # define PDMDEV_ASSERT_DEVINS(pDevIns) do { } while (0)
|
---|
60 | #endif
|
---|
61 |
|
---|
62 |
|
---|
63 | /** Frequency of the real clock. */
|
---|
64 | #define TMCLOCK_FREQ_REAL UINT32_C(1000)
|
---|
65 | /** Frequency of the virtual clock. */
|
---|
66 | #define TMCLOCK_FREQ_VIRTUAL UINT32_C(1000000000)
|
---|
67 |
|
---|
68 | #undef RT_VALID_PTR
|
---|
69 | #define RT_VALID_PTR(ptr) true
|
---|
70 |
|
---|
71 |
|
---|
72 | /*********************************************************************************************************************************
|
---|
73 | * Structures and Typedefs *
|
---|
74 | *********************************************************************************************************************************/
|
---|
75 |
|
---|
76 |
|
---|
77 |
|
---|
78 | /*********************************************************************************************************************************
|
---|
79 | * Global Variables *
|
---|
80 | *********************************************************************************************************************************/
|
---|
81 |
|
---|
82 |
|
---|
83 |
|
---|
84 | /*********************************************************************************************************************************
|
---|
85 | * Internal Functions *
|
---|
86 | *********************************************************************************************************************************/
|
---|
87 |
|
---|
88 | /** @interface_method_impl{PDMDEVHLPR0,pfnIoPortSetUpContextEx} */
|
---|
89 | static DECLCALLBACK(int) pdmR0DevHlp_IoPortSetUpContextEx(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts,
|
---|
90 | PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn,
|
---|
91 | PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr,
|
---|
92 | void *pvUser)
|
---|
93 | {
|
---|
94 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
95 | LogFlow(("pdmR0DevHlp_IoPortSetUpContextEx: caller='%s'/%d: hIoPorts=%#x pfnOut=%p pfnIn=%p pfnOutStr=%p pfnInStr=%p pvUser=%p\n",
|
---|
96 | pDevIns->pReg->szName, pDevIns->iInstance, hIoPorts, pfnOut, pfnIn, pfnOutStr, pfnInStr, pvUser));
|
---|
97 |
|
---|
98 | int rc = VERR_NOT_IMPLEMENTED;
|
---|
99 | AssertFailed();
|
---|
100 |
|
---|
101 | LogFlow(("pdmR0DevHlp_IoPortSetUpContextEx: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
102 | return rc;
|
---|
103 | }
|
---|
104 |
|
---|
105 |
|
---|
106 | /** @interface_method_impl{PDMDEVHLPR0,pfnMmioSetUpContextEx} */
|
---|
107 | static DECLCALLBACK(int) pdmR0DevHlp_MmioSetUpContextEx(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, PFNIOMMMIONEWWRITE pfnWrite,
|
---|
108 | PFNIOMMMIONEWREAD pfnRead, PFNIOMMMIONEWFILL pfnFill, void *pvUser)
|
---|
109 | {
|
---|
110 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
111 | LogFlow(("pdmR0DevHlp_MmioSetUpContextEx: caller='%s'/%d: hRegion=%#x pfnWrite=%p pfnRead=%p pfnFill=%p pvUser=%p\n",
|
---|
112 | pDevIns->pReg->szName, pDevIns->iInstance, hRegion, pfnWrite, pfnRead, pfnFill, pvUser));
|
---|
113 |
|
---|
114 | int rc = VERR_NOT_IMPLEMENTED;
|
---|
115 | AssertFailed();
|
---|
116 |
|
---|
117 | LogFlow(("pdmR0DevHlp_MmioSetUpContextEx: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
118 | return rc;
|
---|
119 | }
|
---|
120 |
|
---|
121 |
|
---|
122 | /** @interface_method_impl{PDMDEVHLPR0,pfnMmio2SetUpContext} */
|
---|
123 | static DECLCALLBACK(int) pdmR0DevHlp_Mmio2SetUpContext(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion,
|
---|
124 | size_t offSub, size_t cbSub, void **ppvMapping)
|
---|
125 | {
|
---|
126 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
127 | LogFlow(("pdmR0DevHlp_Mmio2SetUpContext: caller='%s'/%d: hRegion=%#x offSub=%#zx cbSub=%#zx ppvMapping=%p\n",
|
---|
128 | pDevIns->pReg->szName, pDevIns->iInstance, hRegion, offSub, cbSub, ppvMapping));
|
---|
129 | *ppvMapping = NULL;
|
---|
130 |
|
---|
131 | int rc = VERR_NOT_IMPLEMENTED;
|
---|
132 | AssertFailed();
|
---|
133 |
|
---|
134 | LogFlow(("pdmR0DevHlp_Mmio2SetUpContext: caller='%s'/%d: returns %Rrc (%p)\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *ppvMapping));
|
---|
135 | return rc;
|
---|
136 | }
|
---|
137 |
|
---|
138 |
|
---|
139 | /** @interface_method_impl{PDMDEVHLPR0,pfnPCIPhysRead} */
|
---|
140 | static DECLCALLBACK(int) pdmR0DevHlp_PCIPhysRead(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys,
|
---|
141 | void *pvBuf, size_t cbRead, uint32_t fFlags)
|
---|
142 | {
|
---|
143 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
144 | if (!pPciDev) /* NULL is an alias for the default PCI device. */
|
---|
145 | pPciDev = pDevIns->apPciDevs[0];
|
---|
146 | AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE);
|
---|
147 | PDMPCIDEV_ASSERT_VALID_AND_REGISTERED(pDevIns, pPciDev);
|
---|
148 |
|
---|
149 | #ifndef PDM_DO_NOT_RESPECT_PCI_BM_BIT
|
---|
150 | /*
|
---|
151 | * Just check the busmaster setting here and forward the request to the generic read helper.
|
---|
152 | */
|
---|
153 | if (PCIDevIsBusmaster(pPciDev))
|
---|
154 | { /* likely */ }
|
---|
155 | else
|
---|
156 | {
|
---|
157 | LogFunc(("caller=%p/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbRead=%#zx\n", pDevIns, pDevIns->iInstance,
|
---|
158 | VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbRead));
|
---|
159 | memset(pvBuf, 0xff, cbRead);
|
---|
160 | return VERR_PDM_NOT_PCI_BUS_MASTER;
|
---|
161 | }
|
---|
162 | #endif
|
---|
163 |
|
---|
164 | return pDevIns->pHlpR0->pfnPhysRead(pDevIns, GCPhys, pvBuf, cbRead, fFlags);
|
---|
165 | }
|
---|
166 |
|
---|
167 |
|
---|
168 | /** @interface_method_impl{PDMDEVHLPR0,pfnPCIPhysWrite} */
|
---|
169 | static DECLCALLBACK(int) pdmR0DevHlp_PCIPhysWrite(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys,
|
---|
170 | const void *pvBuf, size_t cbWrite, uint32_t fFlags)
|
---|
171 | {
|
---|
172 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
173 | if (!pPciDev) /* NULL is an alias for the default PCI device. */
|
---|
174 | pPciDev = pDevIns->apPciDevs[0];
|
---|
175 | AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE);
|
---|
176 | PDMPCIDEV_ASSERT_VALID_AND_REGISTERED(pDevIns, pPciDev);
|
---|
177 |
|
---|
178 | #ifndef PDM_DO_NOT_RESPECT_PCI_BM_BIT
|
---|
179 | /*
|
---|
180 | * Just check the busmaster setting here and forward the request to the generic read helper.
|
---|
181 | */
|
---|
182 | if (PCIDevIsBusmaster(pPciDev))
|
---|
183 | { /* likely */ }
|
---|
184 | else
|
---|
185 | {
|
---|
186 | LogFunc(("caller=%p/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbWrite=%#zx\n", pDevIns, pDevIns->iInstance,
|
---|
187 | VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbWrite));
|
---|
188 | return VERR_PDM_NOT_PCI_BUS_MASTER;
|
---|
189 | }
|
---|
190 | #endif
|
---|
191 |
|
---|
192 | return pDevIns->pHlpR0->pfnPhysWrite(pDevIns, GCPhys, pvBuf, cbWrite, fFlags);
|
---|
193 | }
|
---|
194 |
|
---|
195 |
|
---|
196 | /** @interface_method_impl{PDMDEVHLPR0,pfnPCISetIrq} */
|
---|
197 | static DECLCALLBACK(void) pdmR0DevHlp_PCISetIrq(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel)
|
---|
198 | {
|
---|
199 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
200 | if (!pPciDev) /* NULL is an alias for the default PCI device. */
|
---|
201 | pPciDev = pDevIns->apPciDevs[0];
|
---|
202 | AssertReturnVoid(pPciDev);
|
---|
203 | LogFlow(("pdmR0DevHlp_PCISetIrq: caller=%p/%d: pPciDev=%p:{%#x} iIrq=%d iLevel=%d\n",
|
---|
204 | pDevIns, pDevIns->iInstance, pPciDev, pPciDev->uDevFn, iIrq, iLevel));
|
---|
205 | PDMPCIDEV_ASSERT_VALID_AND_REGISTERED(pDevIns, pPciDev);
|
---|
206 |
|
---|
207 | AssertFailed();
|
---|
208 |
|
---|
209 | LogFlow(("pdmR0DevHlp_PCISetIrq: caller=%p/%d: returns void; uTagSrc=%#x\n", pDevIns, pDevIns->iInstance, 0 /*uTagSrc*/));
|
---|
210 | }
|
---|
211 |
|
---|
212 |
|
---|
213 | /** @interface_method_impl{PDMDEVHLPR0,pfnISASetIrq} */
|
---|
214 | static DECLCALLBACK(void) pdmR0DevHlp_ISASetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel)
|
---|
215 | {
|
---|
216 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
217 | LogFlow(("pdmR0DevHlp_ISASetIrq: caller=%p/%d: iIrq=%d iLevel=%d\n", pDevIns, pDevIns->iInstance, iIrq, iLevel));
|
---|
218 |
|
---|
219 | AssertFailed();
|
---|
220 |
|
---|
221 | LogFlow(("pdmR0DevHlp_ISASetIrq: caller=%p/%d: returns void; uTagSrc=%#x\n", pDevIns, pDevIns->iInstance, 0 /*uTagSrc*/));
|
---|
222 | }
|
---|
223 |
|
---|
224 |
|
---|
225 | /** @interface_method_impl{PDMDEVHLPR0,pfnPhysRead} */
|
---|
226 | static DECLCALLBACK(int) pdmR0DevHlp_PhysRead(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead, uint32_t fFlags)
|
---|
227 | {
|
---|
228 | RT_NOREF(fFlags);
|
---|
229 |
|
---|
230 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
231 | LogFlow(("pdmR0DevHlp_PhysRead: caller=%p/%d: GCPhys=%RGp pvBuf=%p cbRead=%#x\n",
|
---|
232 | pDevIns, pDevIns->iInstance, GCPhys, pvBuf, cbRead));
|
---|
233 |
|
---|
234 | VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED;
|
---|
235 | AssertFailed();
|
---|
236 |
|
---|
237 | Log(("pdmR0DevHlp_PhysRead: caller=%p/%d: returns %Rrc\n", pDevIns, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict) ));
|
---|
238 | return VBOXSTRICTRC_VAL(rcStrict);
|
---|
239 | }
|
---|
240 |
|
---|
241 |
|
---|
242 | /** @interface_method_impl{PDMDEVHLPR0,pfnPhysWrite} */
|
---|
243 | static DECLCALLBACK(int) pdmR0DevHlp_PhysWrite(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite, uint32_t fFlags)
|
---|
244 | {
|
---|
245 | RT_NOREF(fFlags);
|
---|
246 |
|
---|
247 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
248 | LogFlow(("pdmR0DevHlp_PhysWrite: caller=%p/%d: GCPhys=%RGp pvBuf=%p cbWrite=%#x\n",
|
---|
249 | pDevIns, pDevIns->iInstance, GCPhys, pvBuf, cbWrite));
|
---|
250 |
|
---|
251 | VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED;
|
---|
252 | AssertFailed();
|
---|
253 |
|
---|
254 | Log(("pdmR0DevHlp_PhysWrite: caller=%p/%d: returns %Rrc\n", pDevIns, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict) ));
|
---|
255 | return VBOXSTRICTRC_VAL(rcStrict);
|
---|
256 | }
|
---|
257 |
|
---|
258 |
|
---|
259 | /** @interface_method_impl{PDMDEVHLPR0,pfnA20IsEnabled} */
|
---|
260 | static DECLCALLBACK(bool) pdmR0DevHlp_A20IsEnabled(PPDMDEVINS pDevIns)
|
---|
261 | {
|
---|
262 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
263 | LogFlow(("pdmR0DevHlp_A20IsEnabled: caller=%p/%d:\n", pDevIns, pDevIns->iInstance));
|
---|
264 |
|
---|
265 | bool fEnabled = false;
|
---|
266 | AssertFailed();
|
---|
267 |
|
---|
268 | Log(("pdmR0DevHlp_A20IsEnabled: caller=%p/%d: returns %RTbool\n", pDevIns, pDevIns->iInstance, fEnabled));
|
---|
269 | return fEnabled;
|
---|
270 | }
|
---|
271 |
|
---|
272 |
|
---|
273 | /** @interface_method_impl{PDMDEVHLPR0,pfnVMState} */
|
---|
274 | static DECLCALLBACK(VMSTATE) pdmR0DevHlp_VMState(PPDMDEVINS pDevIns)
|
---|
275 | {
|
---|
276 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
277 |
|
---|
278 | VMSTATE enmVMState = VMSTATE_CREATING;// pDevIns->Internal.s.pGVM->enmVMState;
|
---|
279 |
|
---|
280 | LogFlow(("pdmR0DevHlp_VMState: caller=%p/%d: returns %d\n", pDevIns, pDevIns->iInstance, enmVMState));
|
---|
281 | return enmVMState;
|
---|
282 | }
|
---|
283 |
|
---|
284 |
|
---|
285 | /** @interface_method_impl{PDMDEVHLPR0,pfnGetVM} */
|
---|
286 | static DECLCALLBACK(PVMCC) pdmR0DevHlp_GetVM(PPDMDEVINS pDevIns)
|
---|
287 | {
|
---|
288 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
289 | LogFlow(("pdmR0DevHlp_GetVM: caller='%p'/%d\n", pDevIns, pDevIns->iInstance));
|
---|
290 | AssertFailed();
|
---|
291 | return NULL; //pDevIns->Internal.s.pGVM;
|
---|
292 | }
|
---|
293 |
|
---|
294 |
|
---|
295 | /** @interface_method_impl{PDMDEVHLPR0,pfnGetVMCPU} */
|
---|
296 | static DECLCALLBACK(PVMCPUCC) pdmR0DevHlp_GetVMCPU(PPDMDEVINS pDevIns)
|
---|
297 | {
|
---|
298 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
299 | LogFlow(("pdmR0DevHlp_GetVMCPU: caller='%p'/%d\n", pDevIns, pDevIns->iInstance));
|
---|
300 | AssertFailed();
|
---|
301 | return NULL; //VMMGetCpu(pDevIns->Internal.s.pGVM);
|
---|
302 | }
|
---|
303 |
|
---|
304 |
|
---|
305 | /** @interface_method_impl{PDMDEVHLPRC,pfnGetCurrentCpuId} */
|
---|
306 | static DECLCALLBACK(VMCPUID) pdmR0DevHlp_GetCurrentCpuId(PPDMDEVINS pDevIns)
|
---|
307 | {
|
---|
308 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
309 | LogFlow(("pdmR0DevHlp_GetCurrentCpuId: caller='%p'/%d for CPU %u\n", pDevIns, pDevIns->iInstance, 0 /*idCpu*/));
|
---|
310 | AssertFailed();
|
---|
311 | return 0; //idCpu;
|
---|
312 | }
|
---|
313 |
|
---|
314 |
|
---|
315 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerFromMicro} */
|
---|
316 | static DECLCALLBACK(uint64_t) pdmR0DevHlp_TimerFromMicro(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMicroSecs)
|
---|
317 | {
|
---|
318 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
319 | AssertFailed();
|
---|
320 | return 0; //TMTimerFromMicro(pDevIns->Internal.s.pGVM, hTimer, cMicroSecs);
|
---|
321 | }
|
---|
322 |
|
---|
323 |
|
---|
324 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerFromMilli} */
|
---|
325 | static DECLCALLBACK(uint64_t) pdmR0DevHlp_TimerFromMilli(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMilliSecs)
|
---|
326 | {
|
---|
327 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
328 | AssertFailed();
|
---|
329 | return 0;
|
---|
330 | }
|
---|
331 |
|
---|
332 |
|
---|
333 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerFromNano} */
|
---|
334 | static DECLCALLBACK(uint64_t) pdmR0DevHlp_TimerFromNano(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cNanoSecs)
|
---|
335 | {
|
---|
336 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
337 | AssertFailed();
|
---|
338 | return 0;
|
---|
339 | }
|
---|
340 |
|
---|
341 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerGet} */
|
---|
342 | static DECLCALLBACK(uint64_t) pdmR0DevHlp_TimerGet(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
|
---|
343 | {
|
---|
344 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
345 | AssertFailed();
|
---|
346 | return 0;
|
---|
347 | }
|
---|
348 |
|
---|
349 |
|
---|
350 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerGetFreq} */
|
---|
351 | static DECLCALLBACK(uint64_t) pdmR0DevHlp_TimerGetFreq(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
|
---|
352 | {
|
---|
353 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
354 | AssertFailed();
|
---|
355 | return 0;
|
---|
356 | }
|
---|
357 |
|
---|
358 |
|
---|
359 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerGetNano} */
|
---|
360 | static DECLCALLBACK(uint64_t) pdmR0DevHlp_TimerGetNano(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
|
---|
361 | {
|
---|
362 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
363 | AssertFailed();
|
---|
364 | return 0;
|
---|
365 | }
|
---|
366 |
|
---|
367 |
|
---|
368 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerIsActive} */
|
---|
369 | static DECLCALLBACK(bool) pdmR0DevHlp_TimerIsActive(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
|
---|
370 | {
|
---|
371 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
372 | AssertFailed();
|
---|
373 | return false;
|
---|
374 | }
|
---|
375 |
|
---|
376 |
|
---|
377 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerIsLockOwner} */
|
---|
378 | static DECLCALLBACK(bool) pdmR0DevHlp_TimerIsLockOwner(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
|
---|
379 | {
|
---|
380 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
381 | AssertFailed();
|
---|
382 | return false;
|
---|
383 | }
|
---|
384 |
|
---|
385 |
|
---|
386 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerLockClock} */
|
---|
387 | static DECLCALLBACK(VBOXSTRICTRC) pdmR0DevHlp_TimerLockClock(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, int rcBusy)
|
---|
388 | {
|
---|
389 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
390 | AssertFailed();
|
---|
391 | return VERR_NOT_IMPLEMENTED;
|
---|
392 | }
|
---|
393 |
|
---|
394 |
|
---|
395 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerLockClock2} */
|
---|
396 | static DECLCALLBACK(VBOXSTRICTRC) pdmR0DevHlp_TimerLockClock2(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer,
|
---|
397 | PPDMCRITSECT pCritSect, int rcBusy)
|
---|
398 | {
|
---|
399 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
400 | AssertFailed();
|
---|
401 | return VERR_NOT_IMPLEMENTED;
|
---|
402 | }
|
---|
403 |
|
---|
404 |
|
---|
405 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerSet} */
|
---|
406 | static DECLCALLBACK(int) pdmR0DevHlp_TimerSet(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t uExpire)
|
---|
407 | {
|
---|
408 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
409 | AssertFailed();
|
---|
410 | return VERR_NOT_IMPLEMENTED;
|
---|
411 | }
|
---|
412 |
|
---|
413 |
|
---|
414 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerSetFrequencyHint} */
|
---|
415 | static DECLCALLBACK(int) pdmR0DevHlp_TimerSetFrequencyHint(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint32_t uHz)
|
---|
416 | {
|
---|
417 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
418 | AssertFailed();
|
---|
419 | return VERR_NOT_IMPLEMENTED;
|
---|
420 | }
|
---|
421 |
|
---|
422 |
|
---|
423 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerSetMicro} */
|
---|
424 | static DECLCALLBACK(int) pdmR0DevHlp_TimerSetMicro(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMicrosToNext)
|
---|
425 | {
|
---|
426 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
427 | AssertFailed();
|
---|
428 | return VERR_NOT_IMPLEMENTED;
|
---|
429 | }
|
---|
430 |
|
---|
431 |
|
---|
432 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerSetMillies} */
|
---|
433 | static DECLCALLBACK(int) pdmR0DevHlp_TimerSetMillies(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMilliesToNext)
|
---|
434 | {
|
---|
435 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
436 | AssertFailed();
|
---|
437 | return VERR_NOT_IMPLEMENTED;
|
---|
438 | }
|
---|
439 |
|
---|
440 |
|
---|
441 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerSetNano} */
|
---|
442 | static DECLCALLBACK(int) pdmR0DevHlp_TimerSetNano(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cNanosToNext)
|
---|
443 | {
|
---|
444 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
445 | AssertFailed();
|
---|
446 | return VERR_NOT_IMPLEMENTED;
|
---|
447 | }
|
---|
448 |
|
---|
449 |
|
---|
450 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerSetRelative} */
|
---|
451 | static DECLCALLBACK(int) pdmR0DevHlp_TimerSetRelative(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cTicksToNext, uint64_t *pu64Now)
|
---|
452 | {
|
---|
453 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
454 | AssertFailed();
|
---|
455 | return VERR_NOT_IMPLEMENTED;
|
---|
456 | }
|
---|
457 |
|
---|
458 |
|
---|
459 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerStop} */
|
---|
460 | static DECLCALLBACK(int) pdmR0DevHlp_TimerStop(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
|
---|
461 | {
|
---|
462 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
463 | AssertFailed();
|
---|
464 | return VERR_NOT_IMPLEMENTED;
|
---|
465 | }
|
---|
466 |
|
---|
467 |
|
---|
468 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerUnlockClock} */
|
---|
469 | static DECLCALLBACK(void) pdmR0DevHlp_TimerUnlockClock(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer)
|
---|
470 | {
|
---|
471 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
472 | AssertFailed();
|
---|
473 | }
|
---|
474 |
|
---|
475 |
|
---|
476 | /** @interface_method_impl{PDMDEVHLPR0,pfnTimerUnlockClock2} */
|
---|
477 | static DECLCALLBACK(void) pdmR0DevHlp_TimerUnlockClock2(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PPDMCRITSECT pCritSect)
|
---|
478 | {
|
---|
479 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
480 | AssertFailed();
|
---|
481 | }
|
---|
482 |
|
---|
483 |
|
---|
484 | /** @interface_method_impl{PDMDEVHLPR0,pfnTMTimeVirtGet} */
|
---|
485 | static DECLCALLBACK(uint64_t) pdmR0DevHlp_TMTimeVirtGet(PPDMDEVINS pDevIns)
|
---|
486 | {
|
---|
487 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
488 | LogFlow(("pdmR0DevHlp_TMTimeVirtGet: caller='%p'/%d\n", pDevIns, pDevIns->iInstance));
|
---|
489 | AssertFailed();
|
---|
490 | return 0;
|
---|
491 | }
|
---|
492 |
|
---|
493 |
|
---|
494 | /** @interface_method_impl{PDMDEVHLPR0,pfnTMTimeVirtGetFreq} */
|
---|
495 | static DECLCALLBACK(uint64_t) pdmR0DevHlp_TMTimeVirtGetFreq(PPDMDEVINS pDevIns)
|
---|
496 | {
|
---|
497 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
498 | LogFlow(("pdmR0DevHlp_TMTimeVirtGetFreq: caller='%p'/%d\n", pDevIns, pDevIns->iInstance));
|
---|
499 | AssertFailed();
|
---|
500 | return 0;
|
---|
501 | }
|
---|
502 |
|
---|
503 |
|
---|
504 | /** @interface_method_impl{PDMDEVHLPR0,pfnTMTimeVirtGetNano} */
|
---|
505 | static DECLCALLBACK(uint64_t) pdmR0DevHlp_TMTimeVirtGetNano(PPDMDEVINS pDevIns)
|
---|
506 | {
|
---|
507 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
508 | LogFlow(("pdmR0DevHlp_TMTimeVirtGetNano: caller='%p'/%d\n", pDevIns, pDevIns->iInstance));
|
---|
509 | AssertFailed();
|
---|
510 | return 0;
|
---|
511 | }
|
---|
512 |
|
---|
513 |
|
---|
514 | /** Converts a queue handle to a ring-0 queue pointer. */
|
---|
515 | DECLINLINE(PPDMQUEUE) pdmR0DevHlp_QueueToPtr(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue)
|
---|
516 | {
|
---|
517 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
518 | AssertFailed();
|
---|
519 | return NULL;
|
---|
520 | }
|
---|
521 |
|
---|
522 |
|
---|
523 | /** @interface_method_impl{PDMDEVHLPR0,pfnQueueAlloc} */
|
---|
524 | static DECLCALLBACK(PPDMQUEUEITEMCORE) pdmR0DevHlp_QueueAlloc(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue)
|
---|
525 | {
|
---|
526 | AssertFailed();
|
---|
527 | return NULL; //PDMQueueAlloc(pdmR0DevHlp_QueueToPtr(pDevIns, hQueue));
|
---|
528 | }
|
---|
529 |
|
---|
530 |
|
---|
531 | /** @interface_method_impl{PDMDEVHLPR0,pfnQueueInsert} */
|
---|
532 | static DECLCALLBACK(void) pdmR0DevHlp_QueueInsert(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue, PPDMQUEUEITEMCORE pItem)
|
---|
533 | {
|
---|
534 | AssertFailed();
|
---|
535 | //return PDMQueueInsert(pdmR0DevHlp_QueueToPtr(pDevIns, hQueue), pItem);
|
---|
536 | }
|
---|
537 |
|
---|
538 |
|
---|
539 | /** @interface_method_impl{PDMDEVHLPR0,pfnQueueFlushIfNecessary} */
|
---|
540 | static DECLCALLBACK(bool) pdmR0DevHlp_QueueFlushIfNecessary(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue)
|
---|
541 | {
|
---|
542 | AssertFailed();
|
---|
543 | return false; //PDMQueueFlushIfNecessary(pdmR0DevHlp_QueueToPtr(pDevIns, hQueue));
|
---|
544 | }
|
---|
545 |
|
---|
546 |
|
---|
547 | /** @interface_method_impl{PDMDEVHLPR0,pfnTaskTrigger} */
|
---|
548 | static DECLCALLBACK(int) pdmR0DevHlp_TaskTrigger(PPDMDEVINS pDevIns, PDMTASKHANDLE hTask)
|
---|
549 | {
|
---|
550 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
551 | LogFlow(("pdmR0DevHlp_TaskTrigger: caller='%s'/%d: hTask=%RU64\n", pDevIns->pReg->szName, pDevIns->iInstance, hTask));
|
---|
552 |
|
---|
553 | AssertFailed();
|
---|
554 | int rc = VERR_NOT_IMPLEMENTED; //PDMTaskTrigger(pDevIns->Internal.s.pGVM, PDMTASKTYPE_DEV, pDevIns->pDevInsForR3, hTask);
|
---|
555 |
|
---|
556 | LogFlow(("pdmR0DevHlp_TaskTrigger: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
557 | return rc;
|
---|
558 | }
|
---|
559 |
|
---|
560 |
|
---|
561 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventSignal} */
|
---|
562 | static DECLCALLBACK(int) pdmR0DevHlp_SUPSemEventSignal(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent)
|
---|
563 | {
|
---|
564 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
565 | LogFlow(("pdmR0DevHlp_SUPSemEventSignal: caller='%s'/%d: hEvent=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEvent));
|
---|
566 |
|
---|
567 | AssertFailed();
|
---|
568 | int rc = VERR_NOT_IMPLEMENTED; //SUPSemEventSignal(pDevIns->Internal.s.pGVM->pSession, hEvent);
|
---|
569 |
|
---|
570 | LogFlow(("pdmR0DevHlp_SUPSemEventSignal: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
571 | return rc;
|
---|
572 | }
|
---|
573 |
|
---|
574 |
|
---|
575 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventWaitNoResume} */
|
---|
576 | static DECLCALLBACK(int) pdmR0DevHlp_SUPSemEventWaitNoResume(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent, uint32_t cMillies)
|
---|
577 | {
|
---|
578 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
579 | LogFlow(("pdmR0DevHlp_SUPSemEventWaitNoResume: caller='%s'/%d: hEvent=%p cNsTimeout=%RU32\n",
|
---|
580 | pDevIns->pReg->szName, pDevIns->iInstance, hEvent, cMillies));
|
---|
581 |
|
---|
582 | AssertFailed();
|
---|
583 | int rc = VERR_NOT_IMPLEMENTED; //SUPSemEventWaitNoResume(pDevIns->Internal.s.pGVM->pSession, hEvent, cMillies);
|
---|
584 |
|
---|
585 | LogFlow(("pdmR0DevHlp_SUPSemEventWaitNoResume: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
586 | return rc;
|
---|
587 | }
|
---|
588 |
|
---|
589 |
|
---|
590 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventWaitNsAbsIntr} */
|
---|
591 | static DECLCALLBACK(int) pdmR0DevHlp_SUPSemEventWaitNsAbsIntr(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent, uint64_t uNsTimeout)
|
---|
592 | {
|
---|
593 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
594 | LogFlow(("pdmR0DevHlp_SUPSemEventWaitNsAbsIntr: caller='%s'/%d: hEvent=%p uNsTimeout=%RU64\n",
|
---|
595 | pDevIns->pReg->szName, pDevIns->iInstance, hEvent, uNsTimeout));
|
---|
596 |
|
---|
597 | AssertFailed();
|
---|
598 | int rc = VERR_NOT_IMPLEMENTED; //SUPSemEventWaitNsAbsIntr(pDevIns->Internal.s.pGVM->pSession, hEvent, uNsTimeout);
|
---|
599 |
|
---|
600 | LogFlow(("pdmR0DevHlp_SUPSemEventWaitNsAbsIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
601 | return rc;
|
---|
602 | }
|
---|
603 |
|
---|
604 |
|
---|
605 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventWaitNsRelIntr} */
|
---|
606 | static DECLCALLBACK(int) pdmR0DevHlp_SUPSemEventWaitNsRelIntr(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent, uint64_t cNsTimeout)
|
---|
607 | {
|
---|
608 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
609 | LogFlow(("pdmR0DevHlp_SUPSemEventWaitNsRelIntr: caller='%s'/%d: hEvent=%p cNsTimeout=%RU64\n",
|
---|
610 | pDevIns->pReg->szName, pDevIns->iInstance, hEvent, cNsTimeout));
|
---|
611 |
|
---|
612 | AssertFailed();
|
---|
613 | int rc = VERR_NOT_IMPLEMENTED; //SUPSemEventWaitNsRelIntr(pDevIns->Internal.s.pGVM->pSession, hEvent, cNsTimeout);
|
---|
614 |
|
---|
615 | LogFlow(("pdmR0DevHlp_SUPSemEventWaitNsRelIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
616 | return rc;
|
---|
617 | }
|
---|
618 |
|
---|
619 |
|
---|
620 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventGetResolution} */
|
---|
621 | static DECLCALLBACK(uint32_t) pdmR0DevHlp_SUPSemEventGetResolution(PPDMDEVINS pDevIns)
|
---|
622 | {
|
---|
623 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
624 | LogFlow(("pdmR0DevHlp_SUPSemEventGetResolution: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
|
---|
625 |
|
---|
626 | AssertFailed();
|
---|
627 | uint32_t cNsResolution = 0; //SUPSemEventGetResolution(pDevIns->Internal.s.pGVM->pSession);
|
---|
628 |
|
---|
629 | LogFlow(("pdmR0DevHlp_SUPSemEventGetResolution: caller='%s'/%d: returns %u\n", pDevIns->pReg->szName, pDevIns->iInstance, cNsResolution));
|
---|
630 | return cNsResolution;
|
---|
631 | }
|
---|
632 |
|
---|
633 |
|
---|
634 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventMultiSignal} */
|
---|
635 | static DECLCALLBACK(int) pdmR0DevHlp_SUPSemEventMultiSignal(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti)
|
---|
636 | {
|
---|
637 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
638 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiSignal: caller='%s'/%d: hEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti));
|
---|
639 |
|
---|
640 | AssertFailed();
|
---|
641 | int rc = VERR_NOT_IMPLEMENTED; //SUPSemEventMultiSignal(pDevIns->Internal.s.pGVM->pSession, hEventMulti);
|
---|
642 |
|
---|
643 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiSignal: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
644 | return rc;
|
---|
645 | }
|
---|
646 |
|
---|
647 |
|
---|
648 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventMultiReset} */
|
---|
649 | static DECLCALLBACK(int) pdmR0DevHlp_SUPSemEventMultiReset(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti)
|
---|
650 | {
|
---|
651 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
652 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiReset: caller='%s'/%d: hEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti));
|
---|
653 |
|
---|
654 | AssertFailed();
|
---|
655 | int rc = VERR_NOT_IMPLEMENTED; //SUPSemEventMultiReset(pDevIns->Internal.s.pGVM->pSession, hEventMulti);
|
---|
656 |
|
---|
657 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiReset: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
658 | return rc;
|
---|
659 | }
|
---|
660 |
|
---|
661 |
|
---|
662 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventMultiWaitNoResume} */
|
---|
663 | static DECLCALLBACK(int) pdmR0DevHlp_SUPSemEventMultiWaitNoResume(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti,
|
---|
664 | uint32_t cMillies)
|
---|
665 | {
|
---|
666 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
667 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiWaitNoResume: caller='%s'/%d: hEventMulti=%p cMillies=%RU32\n",
|
---|
668 | pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti, cMillies));
|
---|
669 |
|
---|
670 | AssertFailed();
|
---|
671 | int rc = VERR_NOT_IMPLEMENTED; //SUPSemEventMultiWaitNoResume(pDevIns->Internal.s.pGVM->pSession, hEventMulti, cMillies);
|
---|
672 |
|
---|
673 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiWaitNoResume: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
674 | return rc;
|
---|
675 | }
|
---|
676 |
|
---|
677 |
|
---|
678 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventMultiWaitNsAbsIntr} */
|
---|
679 | static DECLCALLBACK(int) pdmR0DevHlp_SUPSemEventMultiWaitNsAbsIntr(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti,
|
---|
680 | uint64_t uNsTimeout)
|
---|
681 | {
|
---|
682 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
683 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiWaitNsAbsIntr: caller='%s'/%d: hEventMulti=%p uNsTimeout=%RU64\n",
|
---|
684 | pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti, uNsTimeout));
|
---|
685 |
|
---|
686 | AssertFailed();
|
---|
687 | int rc = VERR_NOT_IMPLEMENTED; //SUPSemEventMultiWaitNsAbsIntr(pDevIns->Internal.s.pGVM->pSession, hEventMulti, uNsTimeout);
|
---|
688 |
|
---|
689 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiWaitNsAbsIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
690 | return rc;
|
---|
691 | }
|
---|
692 |
|
---|
693 |
|
---|
694 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventMultiWaitNsRelIntr} */
|
---|
695 | static DECLCALLBACK(int) pdmR0DevHlp_SUPSemEventMultiWaitNsRelIntr(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti,
|
---|
696 | uint64_t cNsTimeout)
|
---|
697 | {
|
---|
698 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
699 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiWaitNsRelIntr: caller='%s'/%d: hEventMulti=%p cNsTimeout=%RU64\n",
|
---|
700 | pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti, cNsTimeout));
|
---|
701 |
|
---|
702 | AssertFailed();
|
---|
703 | int rc = VERR_NOT_IMPLEMENTED; //SUPSemEventMultiWaitNsRelIntr(pDevIns->Internal.s.pGVM->pSession, hEventMulti, cNsTimeout);
|
---|
704 |
|
---|
705 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiWaitNsRelIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
706 | return rc;
|
---|
707 | }
|
---|
708 |
|
---|
709 |
|
---|
710 | /** @interface_method_impl{PDMDEVHLPR0,pfnSUPSemEventMultiGetResolution} */
|
---|
711 | static DECLCALLBACK(uint32_t) pdmR0DevHlp_SUPSemEventMultiGetResolution(PPDMDEVINS pDevIns)
|
---|
712 | {
|
---|
713 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
714 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiGetResolution: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
|
---|
715 |
|
---|
716 | AssertFailed();
|
---|
717 | uint32_t cNsResolution = 0; //SUPSemEventMultiGetResolution(pDevIns->Internal.s.pGVM->pSession);
|
---|
718 |
|
---|
719 | LogFlow(("pdmR0DevHlp_SUPSemEventMultiGetResolution: caller='%s'/%d: returns %u\n", pDevIns->pReg->szName, pDevIns->iInstance, cNsResolution));
|
---|
720 | return cNsResolution;
|
---|
721 | }
|
---|
722 |
|
---|
723 |
|
---|
724 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectGetNop} */
|
---|
725 | static DECLCALLBACK(PPDMCRITSECT) pdmR0DevHlp_CritSectGetNop(PPDMDEVINS pDevIns)
|
---|
726 | {
|
---|
727 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
728 | //PGVM pGVM = pDevIns->Internal.s.pGVM;
|
---|
729 |
|
---|
730 | AssertFailed();
|
---|
731 | PPDMCRITSECT pCritSect = NULL; //&pGVM->pdm.s.NopCritSect;
|
---|
732 | LogFlow(("pdmR0DevHlp_CritSectGetNop: caller='%s'/%d: return %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pCritSect));
|
---|
733 | return pCritSect;
|
---|
734 | }
|
---|
735 |
|
---|
736 |
|
---|
737 | /** @interface_method_impl{PDMDEVHLPR0,pfnSetDeviceCritSect} */
|
---|
738 | static DECLCALLBACK(int) pdmR0DevHlp_SetDeviceCritSect(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
|
---|
739 | {
|
---|
740 | /*
|
---|
741 | * Validate input.
|
---|
742 | *
|
---|
743 | * Note! We only allow the automatically created default critical section
|
---|
744 | * to be replaced by this API.
|
---|
745 | */
|
---|
746 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
747 | AssertPtrReturn(pCritSect, VERR_INVALID_POINTER);
|
---|
748 | LogFlow(("pdmR0DevHlp_SetDeviceCritSect: caller='%s'/%d: pCritSect=%p\n",
|
---|
749 | pDevIns->pReg->szName, pDevIns->iInstance, pCritSect));
|
---|
750 | #if 0
|
---|
751 | AssertReturn(PDMCritSectIsInitialized(pCritSect), VERR_INVALID_PARAMETER);
|
---|
752 | PGVM pGVM = pDevIns->Internal.s.pGVM;
|
---|
753 |
|
---|
754 | VM_ASSERT_EMT(pGVM);
|
---|
755 | VM_ASSERT_STATE_RETURN(pGVM, VMSTATE_CREATING, VERR_WRONG_ORDER);
|
---|
756 |
|
---|
757 | /*
|
---|
758 | * Check that ring-3 has already done this, then effect the change.
|
---|
759 | */
|
---|
760 | AssertReturn(pDevIns->pDevInsForR3R0->Internal.s.fIntFlags & PDMDEVINSINT_FLAGS_CHANGED_CRITSECT, VERR_WRONG_ORDER);
|
---|
761 | pDevIns->pCritSectRoR0 = pCritSect;
|
---|
762 | #endif
|
---|
763 | AssertFailed();
|
---|
764 |
|
---|
765 | LogFlow(("pdmR0DevHlp_SetDeviceCritSect: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS));
|
---|
766 | return VINF_SUCCESS;
|
---|
767 | }
|
---|
768 |
|
---|
769 |
|
---|
770 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectEnter} */
|
---|
771 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy)
|
---|
772 | {
|
---|
773 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
774 | AssertFailed();
|
---|
775 | return VERR_NOT_IMPLEMENTED; //PDMCritSectEnter(pDevIns->Internal.s.pGVM, pCritSect, rcBusy);
|
---|
776 | }
|
---|
777 |
|
---|
778 |
|
---|
779 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectEnterDebug} */
|
---|
780 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
781 | {
|
---|
782 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
783 | AssertFailed();
|
---|
784 | return VERR_NOT_IMPLEMENTED; //PDMCritSectEnterDebug(pDevIns->Internal.s.pGVM, pCritSect, rcBusy, uId, RT_SRC_POS_ARGS);
|
---|
785 | }
|
---|
786 |
|
---|
787 |
|
---|
788 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectTryEnter} */
|
---|
789 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectTryEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
|
---|
790 | {
|
---|
791 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
792 | AssertFailed();
|
---|
793 | return VERR_NOT_IMPLEMENTED; //PDMCritSectTryEnter(pDevIns->Internal.s.pGVM, pCritSect);
|
---|
794 | }
|
---|
795 |
|
---|
796 |
|
---|
797 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectTryEnterDebug} */
|
---|
798 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectTryEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
799 | {
|
---|
800 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
801 | AssertFailed();
|
---|
802 | return VERR_NOT_IMPLEMENTED; //PDMCritSectTryEnterDebug(pDevIns->Internal.s.pGVM, pCritSect, uId, RT_SRC_POS_ARGS);
|
---|
803 | }
|
---|
804 |
|
---|
805 |
|
---|
806 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectLeave} */
|
---|
807 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectLeave(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect)
|
---|
808 | {
|
---|
809 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
810 | AssertFailed();
|
---|
811 | return VERR_NOT_IMPLEMENTED; //PDMCritSectLeave(pDevIns->Internal.s.pGVM, pCritSect);
|
---|
812 | }
|
---|
813 |
|
---|
814 |
|
---|
815 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectIsOwner} */
|
---|
816 | static DECLCALLBACK(bool) pdmR0DevHlp_CritSectIsOwner(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
|
---|
817 | {
|
---|
818 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
819 | AssertFailed();
|
---|
820 | return VERR_NOT_IMPLEMENTED; //PDMCritSectIsOwner(pDevIns->Internal.s.pGVM, pCritSect);
|
---|
821 | }
|
---|
822 |
|
---|
823 |
|
---|
824 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectIsInitialized} */
|
---|
825 | static DECLCALLBACK(bool) pdmR0DevHlp_CritSectIsInitialized(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
|
---|
826 | {
|
---|
827 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
828 | RT_NOREF(pDevIns);
|
---|
829 | AssertFailed();
|
---|
830 | return VERR_NOT_IMPLEMENTED; //PDMCritSectIsInitialized(pCritSect);
|
---|
831 | }
|
---|
832 |
|
---|
833 |
|
---|
834 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectHasWaiters} */
|
---|
835 | static DECLCALLBACK(bool) pdmR0DevHlp_CritSectHasWaiters(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
|
---|
836 | {
|
---|
837 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
838 | AssertFailed();
|
---|
839 | return VERR_NOT_IMPLEMENTED; //PDMCritSectHasWaiters(pDevIns->Internal.s.pGVM, pCritSect);
|
---|
840 | }
|
---|
841 |
|
---|
842 |
|
---|
843 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectGetRecursion} */
|
---|
844 | static DECLCALLBACK(uint32_t) pdmR0DevHlp_CritSectGetRecursion(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect)
|
---|
845 | {
|
---|
846 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
847 | RT_NOREF(pDevIns);
|
---|
848 | AssertFailed();
|
---|
849 | return VERR_NOT_IMPLEMENTED; //PDMCritSectGetRecursion(pCritSect);
|
---|
850 | }
|
---|
851 |
|
---|
852 |
|
---|
853 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectScheduleExitEvent} */
|
---|
854 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectScheduleExitEvent(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect,
|
---|
855 | SUPSEMEVENT hEventToSignal)
|
---|
856 | {
|
---|
857 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
858 | RT_NOREF(pDevIns);
|
---|
859 | AssertFailed();
|
---|
860 | return VERR_NOT_IMPLEMENTED; //PDMHCCritSectScheduleExitEvent(pCritSect, hEventToSignal);
|
---|
861 | }
|
---|
862 |
|
---|
863 |
|
---|
864 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwEnterShared} */
|
---|
865 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwEnterShared(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect, int rcBusy)
|
---|
866 | {
|
---|
867 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
868 | AssertFailed();
|
---|
869 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwEnterShared(pDevIns->Internal.s.pGVM, pCritSect, rcBusy);
|
---|
870 | }
|
---|
871 |
|
---|
872 |
|
---|
873 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwEnterSharedDebug} */
|
---|
874 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwEnterSharedDebug(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect, int rcBusy,
|
---|
875 | RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
876 | {
|
---|
877 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
878 | AssertFailed();
|
---|
879 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwEnterSharedDebug(pDevIns->Internal.s.pGVM, pCritSect, rcBusy, uId, RT_SRC_POS_ARGS);
|
---|
880 | }
|
---|
881 |
|
---|
882 |
|
---|
883 |
|
---|
884 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwTryEnterShared} */
|
---|
885 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwTryEnterShared(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect)
|
---|
886 | {
|
---|
887 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
888 | AssertFailed();
|
---|
889 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwTryEnterShared(pDevIns->Internal.s.pGVM, pCritSect);
|
---|
890 | }
|
---|
891 |
|
---|
892 |
|
---|
893 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwTryEnterSharedDebug} */
|
---|
894 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwTryEnterSharedDebug(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect,
|
---|
895 | RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
896 | {
|
---|
897 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
898 | AssertFailed();
|
---|
899 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwTryEnterSharedDebug(pDevIns->Internal.s.pGVM, pCritSect, uId, RT_SRC_POS_ARGS);
|
---|
900 | }
|
---|
901 |
|
---|
902 |
|
---|
903 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwLeaveShared} */
|
---|
904 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwLeaveShared(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect)
|
---|
905 | {
|
---|
906 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
907 | AssertFailed();
|
---|
908 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwLeaveShared(pDevIns->Internal.s.pGVM, pCritSect);
|
---|
909 | }
|
---|
910 |
|
---|
911 |
|
---|
912 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwEnterExcl} */
|
---|
913 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwEnterExcl(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect, int rcBusy)
|
---|
914 | {
|
---|
915 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
916 | AssertFailed();
|
---|
917 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwEnterExcl(pDevIns->Internal.s.pGVM, pCritSect, rcBusy);
|
---|
918 | }
|
---|
919 |
|
---|
920 |
|
---|
921 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwEnterExclDebug} */
|
---|
922 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwEnterExclDebug(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect, int rcBusy,
|
---|
923 | RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
924 | {
|
---|
925 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
926 | AssertFailed();
|
---|
927 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwEnterExclDebug(pDevIns->Internal.s.pGVM, pCritSect, rcBusy, uId, RT_SRC_POS_ARGS);
|
---|
928 | }
|
---|
929 |
|
---|
930 |
|
---|
931 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwTryEnterExcl} */
|
---|
932 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwTryEnterExcl(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect)
|
---|
933 | {
|
---|
934 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
935 | AssertFailed();
|
---|
936 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwTryEnterExcl(pDevIns->Internal.s.pGVM, pCritSect);
|
---|
937 | }
|
---|
938 |
|
---|
939 |
|
---|
940 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwTryEnterExclDebug} */
|
---|
941 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwTryEnterExclDebug(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect,
|
---|
942 | RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
943 | {
|
---|
944 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
945 | AssertFailed();
|
---|
946 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwTryEnterExclDebug(pDevIns->Internal.s.pGVM, pCritSect, uId, RT_SRC_POS_ARGS);
|
---|
947 | }
|
---|
948 |
|
---|
949 |
|
---|
950 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwLeaveExcl} */
|
---|
951 | static DECLCALLBACK(int) pdmR0DevHlp_CritSectRwLeaveExcl(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect)
|
---|
952 | {
|
---|
953 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
954 | AssertFailed();
|
---|
955 | return VERR_NOT_IMPLEMENTED; //PDMCritSectRwLeaveExcl(pDevIns->Internal.s.pGVM, pCritSect);
|
---|
956 | }
|
---|
957 |
|
---|
958 |
|
---|
959 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwIsWriteOwner} */
|
---|
960 | static DECLCALLBACK(bool) pdmR0DevHlp_CritSectRwIsWriteOwner(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect)
|
---|
961 | {
|
---|
962 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
963 | AssertFailed();
|
---|
964 | return false; //PDMCritSectRwIsWriteOwner(pDevIns->Internal.s.pGVM, pCritSect);
|
---|
965 | }
|
---|
966 |
|
---|
967 |
|
---|
968 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwIsReadOwner} */
|
---|
969 | static DECLCALLBACK(bool) pdmR0DevHlp_CritSectRwIsReadOwner(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect, bool fWannaHear)
|
---|
970 | {
|
---|
971 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
972 | AssertFailed();
|
---|
973 | return false; //PDMCritSectRwIsReadOwner(pDevIns->Internal.s.pGVM, pCritSect, fWannaHear);
|
---|
974 | }
|
---|
975 |
|
---|
976 |
|
---|
977 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwGetWriteRecursion} */
|
---|
978 | static DECLCALLBACK(uint32_t) pdmR0DevHlp_CritSectRwGetWriteRecursion(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect)
|
---|
979 | {
|
---|
980 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
981 | RT_NOREF(pDevIns);
|
---|
982 | AssertFailed();
|
---|
983 | return 0; //PDMCritSectRwGetWriteRecursion(pCritSect);
|
---|
984 | }
|
---|
985 |
|
---|
986 |
|
---|
987 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwGetWriterReadRecursion} */
|
---|
988 | static DECLCALLBACK(uint32_t) pdmR0DevHlp_CritSectRwGetWriterReadRecursion(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect)
|
---|
989 | {
|
---|
990 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
991 | RT_NOREF(pDevIns);
|
---|
992 | AssertFailed();
|
---|
993 | return 0; //PDMCritSectRwGetWriterReadRecursion(pCritSect);
|
---|
994 | }
|
---|
995 |
|
---|
996 |
|
---|
997 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwGetReadCount} */
|
---|
998 | static DECLCALLBACK(uint32_t) pdmR0DevHlp_CritSectRwGetReadCount(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect)
|
---|
999 | {
|
---|
1000 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1001 | RT_NOREF(pDevIns);
|
---|
1002 | AssertFailed();
|
---|
1003 | return 0; //PDMCritSectRwGetReadCount(pCritSect);
|
---|
1004 | }
|
---|
1005 |
|
---|
1006 |
|
---|
1007 | /** @interface_method_impl{PDMDEVHLPR0,pfnCritSectRwIsInitialized} */
|
---|
1008 | static DECLCALLBACK(bool) pdmR0DevHlp_CritSectRwIsInitialized(PPDMDEVINS pDevIns, PPDMCRITSECTRW pCritSect)
|
---|
1009 | {
|
---|
1010 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1011 | RT_NOREF(pDevIns);
|
---|
1012 | AssertFailed();
|
---|
1013 | return false; //PDMCritSectRwIsInitialized(pCritSect);
|
---|
1014 | }
|
---|
1015 |
|
---|
1016 |
|
---|
1017 | /** @interface_method_impl{PDMDEVHLPR0,pfnDBGFTraceBuf} */
|
---|
1018 | static DECLCALLBACK(RTTRACEBUF) pdmR0DevHlp_DBGFTraceBuf(PPDMDEVINS pDevIns)
|
---|
1019 | {
|
---|
1020 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1021 | AssertFailed();
|
---|
1022 | RTTRACEBUF hTraceBuf = NULL; //pDevIns->Internal.s.pGVM->hTraceBufR0;
|
---|
1023 | LogFlow(("pdmR0DevHlp_DBGFTraceBuf: caller='%p'/%d: returns %p\n", pDevIns, pDevIns->iInstance, hTraceBuf));
|
---|
1024 | return hTraceBuf;
|
---|
1025 | }
|
---|
1026 |
|
---|
1027 |
|
---|
1028 | /** @interface_method_impl{PDMDEVHLPR0,pfnPCIBusSetUpContext} */
|
---|
1029 | static DECLCALLBACK(int) pdmR0DevHlp_PCIBusSetUpContext(PPDMDEVINS pDevIns, PPDMPCIBUSREGR0 pPciBusReg, PCPDMPCIHLPR0 *ppPciHlp)
|
---|
1030 | {
|
---|
1031 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1032 | LogFlow(("pdmR0DevHlp_PCIBusSetUpContext: caller='%p'/%d: pPciBusReg=%p{.u32Version=%#x, .iBus=%#u, .pfnSetIrq=%p, u32EnvVersion=%#x} ppPciHlp=%p\n",
|
---|
1033 | pDevIns, pDevIns->iInstance, pPciBusReg, pPciBusReg->u32Version, pPciBusReg->iBus, pPciBusReg->pfnSetIrq,
|
---|
1034 | pPciBusReg->u32EndVersion, ppPciHlp));
|
---|
1035 | #if 0
|
---|
1036 | PGVM pGVM = pDevIns->Internal.s.pGVM;
|
---|
1037 |
|
---|
1038 | /*
|
---|
1039 | * Validate input.
|
---|
1040 | */
|
---|
1041 | AssertPtrReturn(pPciBusReg, VERR_INVALID_POINTER);
|
---|
1042 | AssertLogRelMsgReturn(pPciBusReg->u32Version == PDM_PCIBUSREGCC_VERSION,
|
---|
1043 | ("%#x vs %#x\n", pPciBusReg->u32Version, PDM_PCIBUSREGCC_VERSION), VERR_VERSION_MISMATCH);
|
---|
1044 | AssertPtrReturn(pPciBusReg->pfnSetIrq, VERR_INVALID_POINTER);
|
---|
1045 | AssertLogRelMsgReturn(pPciBusReg->u32EndVersion == PDM_PCIBUSREGCC_VERSION,
|
---|
1046 | ("%#x vs %#x\n", pPciBusReg->u32EndVersion, PDM_PCIBUSREGCC_VERSION), VERR_VERSION_MISMATCH);
|
---|
1047 |
|
---|
1048 | AssertPtrReturn(ppPciHlp, VERR_INVALID_POINTER);
|
---|
1049 |
|
---|
1050 | VM_ASSERT_STATE_RETURN(pGVM, VMSTATE_CREATING, VERR_WRONG_ORDER);
|
---|
1051 | VM_ASSERT_EMT0_RETURN(pGVM, VERR_VM_THREAD_NOT_EMT);
|
---|
1052 |
|
---|
1053 | /* Check the shared bus data (registered earlier from ring-3): */
|
---|
1054 | uint32_t iBus = pPciBusReg->iBus;
|
---|
1055 | ASMCompilerBarrier();
|
---|
1056 | AssertLogRelMsgReturn(iBus < RT_ELEMENTS(pGVM->pdm.s.aPciBuses), ("iBus=%#x\n", iBus), VERR_OUT_OF_RANGE);
|
---|
1057 | PPDMPCIBUS pPciBusShared = &pGVM->pdm.s.aPciBuses[iBus];
|
---|
1058 | AssertLogRelMsgReturn(pPciBusShared->iBus == iBus, ("%u vs %u\n", pPciBusShared->iBus, iBus), VERR_INVALID_PARAMETER);
|
---|
1059 | AssertLogRelMsgReturn(pPciBusShared->pDevInsR3 == pDevIns->pDevInsForR3,
|
---|
1060 | ("%p vs %p (iBus=%u)\n", pPciBusShared->pDevInsR3, pDevIns->pDevInsForR3, iBus), VERR_NOT_OWNER);
|
---|
1061 |
|
---|
1062 | /* Check that the bus isn't already registered in ring-0: */
|
---|
1063 | AssertCompile(RT_ELEMENTS(pGVM->pdm.s.aPciBuses) == RT_ELEMENTS(pGVM->pdmr0.s.aPciBuses));
|
---|
1064 | PPDMPCIBUSR0 pPciBusR0 = &pGVM->pdmr0.s.aPciBuses[iBus];
|
---|
1065 | AssertLogRelMsgReturn(pPciBusR0->pDevInsR0 == NULL,
|
---|
1066 | ("%p (caller pDevIns=%p, iBus=%u)\n", pPciBusR0->pDevInsR0, pDevIns, iBus),
|
---|
1067 | VERR_ALREADY_EXISTS);
|
---|
1068 |
|
---|
1069 | /*
|
---|
1070 | * Do the registering.
|
---|
1071 | */
|
---|
1072 | pPciBusR0->iBus = iBus;
|
---|
1073 | pPciBusR0->uPadding0 = 0xbeefbeef;
|
---|
1074 | pPciBusR0->pfnSetIrqR0 = pPciBusReg->pfnSetIrq;
|
---|
1075 | pPciBusR0->pDevInsR0 = pDevIns;
|
---|
1076 | #endif
|
---|
1077 |
|
---|
1078 | AssertFailed();
|
---|
1079 | *ppPciHlp = NULL; //&g_pdmR0PciHlp;
|
---|
1080 |
|
---|
1081 | LogFlow(("pdmR0DevHlp_PCIBusSetUpContext: caller='%p'/%d: returns VINF_SUCCESS\n", pDevIns, pDevIns->iInstance));
|
---|
1082 | return VINF_SUCCESS;
|
---|
1083 | }
|
---|
1084 |
|
---|
1085 |
|
---|
1086 | /** @interface_method_impl{PDMDEVHLPR0,pfnIommuSetUpContext} */
|
---|
1087 | static DECLCALLBACK(int) pdmR0DevHlp_IommuSetUpContext(PPDMDEVINS pDevIns, PPDMIOMMUREGR0 pIommuReg, PCPDMIOMMUHLPR0 *ppIommuHlp)
|
---|
1088 | {
|
---|
1089 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1090 | LogFlow(("pdmR0DevHlp_IommuSetUpContext: caller='%p'/%d: pIommuReg=%p{.u32Version=%#x, u32TheEnd=%#x} ppIommuHlp=%p\n",
|
---|
1091 | pDevIns, pDevIns->iInstance, pIommuReg, pIommuReg->u32Version, pIommuReg->u32TheEnd, ppIommuHlp));
|
---|
1092 | #if 0
|
---|
1093 | PGVM pGVM = pDevIns->Internal.s.pGVM;
|
---|
1094 |
|
---|
1095 | /*
|
---|
1096 | * Validate input.
|
---|
1097 | */
|
---|
1098 | AssertPtrReturn(pIommuReg, VERR_INVALID_POINTER);
|
---|
1099 | AssertLogRelMsgReturn(pIommuReg->u32Version == PDM_IOMMUREGCC_VERSION,
|
---|
1100 | ("%#x vs %#x\n", pIommuReg->u32Version, PDM_IOMMUREGCC_VERSION), VERR_VERSION_MISMATCH);
|
---|
1101 | AssertPtrReturn(pIommuReg->pfnMemAccess, VERR_INVALID_POINTER);
|
---|
1102 | AssertPtrReturn(pIommuReg->pfnMemBulkAccess, VERR_INVALID_POINTER);
|
---|
1103 | AssertPtrReturn(pIommuReg->pfnMsiRemap, VERR_INVALID_POINTER);
|
---|
1104 | AssertLogRelMsgReturn(pIommuReg->u32TheEnd == PDM_IOMMUREGCC_VERSION,
|
---|
1105 | ("%#x vs %#x\n", pIommuReg->u32TheEnd, PDM_IOMMUREGCC_VERSION), VERR_VERSION_MISMATCH);
|
---|
1106 |
|
---|
1107 | AssertPtrReturn(ppIommuHlp, VERR_INVALID_POINTER);
|
---|
1108 |
|
---|
1109 | VM_ASSERT_STATE_RETURN(pGVM, VMSTATE_CREATING, VERR_WRONG_ORDER);
|
---|
1110 | VM_ASSERT_EMT0_RETURN(pGVM, VERR_VM_THREAD_NOT_EMT);
|
---|
1111 |
|
---|
1112 | /* Check the IOMMU shared data (registered earlier from ring-3). */
|
---|
1113 | uint32_t const idxIommu = pIommuReg->idxIommu;
|
---|
1114 | ASMCompilerBarrier();
|
---|
1115 | AssertLogRelMsgReturn(idxIommu < RT_ELEMENTS(pGVM->pdm.s.aIommus), ("idxIommu=%#x\n", idxIommu), VERR_OUT_OF_RANGE);
|
---|
1116 | PPDMIOMMUR3 pIommuShared = &pGVM->pdm.s.aIommus[idxIommu];
|
---|
1117 | AssertLogRelMsgReturn(pIommuShared->idxIommu == idxIommu, ("%u vs %u\n", pIommuShared->idxIommu, idxIommu), VERR_INVALID_PARAMETER);
|
---|
1118 | AssertLogRelMsgReturn(pIommuShared->pDevInsR3 == pDevIns->pDevInsForR3,
|
---|
1119 | ("%p vs %p (idxIommu=%u)\n", pIommuShared->pDevInsR3, pDevIns->pDevInsForR3, idxIommu), VERR_NOT_OWNER);
|
---|
1120 |
|
---|
1121 | /* Check that the IOMMU isn't already registered in ring-0. */
|
---|
1122 | AssertCompile(RT_ELEMENTS(pGVM->pdm.s.aIommus) == RT_ELEMENTS(pGVM->pdmr0.s.aIommus));
|
---|
1123 | PPDMIOMMUR0 pIommuR0 = &pGVM->pdmr0.s.aIommus[idxIommu];
|
---|
1124 | AssertLogRelMsgReturn(pIommuR0->pDevInsR0 == NULL,
|
---|
1125 | ("%p (caller pDevIns=%p, idxIommu=%u)\n", pIommuR0->pDevInsR0, pDevIns, idxIommu),
|
---|
1126 | VERR_ALREADY_EXISTS);
|
---|
1127 |
|
---|
1128 | /*
|
---|
1129 | * Register.
|
---|
1130 | */
|
---|
1131 | pIommuR0->idxIommu = idxIommu;
|
---|
1132 | pIommuR0->uPadding0 = 0xdeaddead;
|
---|
1133 | pIommuR0->pDevInsR0 = pDevIns;
|
---|
1134 | pIommuR0->pfnMemAccess = pIommuReg->pfnMemAccess;
|
---|
1135 | pIommuR0->pfnMemBulkAccess = pIommuReg->pfnMemBulkAccess;
|
---|
1136 | pIommuR0->pfnMsiRemap = pIommuReg->pfnMsiRemap;
|
---|
1137 | #endif
|
---|
1138 |
|
---|
1139 | AssertFailed();
|
---|
1140 | *ppIommuHlp = NULL; //&g_pdmR0IommuHlp;
|
---|
1141 |
|
---|
1142 | LogFlow(("pdmR0DevHlp_IommuSetUpContext: caller='%p'/%d: returns VINF_SUCCESS\n", pDevIns, pDevIns->iInstance));
|
---|
1143 | return VINF_SUCCESS;
|
---|
1144 | }
|
---|
1145 |
|
---|
1146 |
|
---|
1147 | /** @interface_method_impl{PDMDEVHLPR0,pfnPICSetUpContext} */
|
---|
1148 | static DECLCALLBACK(int) pdmR0DevHlp_PICSetUpContext(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp)
|
---|
1149 | {
|
---|
1150 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1151 | LogFlow(("pdmR0DevHlp_PICSetUpContext: caller='%s'/%d: pPicReg=%p:{.u32Version=%#x, .pfnSetIrq=%p, .pfnGetInterrupt=%p, .u32TheEnd=%#x } ppPicHlp=%p\n",
|
---|
1152 | pDevIns->pReg->szName, pDevIns->iInstance, pPicReg, pPicReg->u32Version, pPicReg->pfnSetIrq, pPicReg->pfnGetInterrupt, pPicReg->u32TheEnd, ppPicHlp));
|
---|
1153 | #if 0
|
---|
1154 | PGVM pGVM = pDevIns->Internal.s.pGVM;
|
---|
1155 |
|
---|
1156 | /*
|
---|
1157 | * Validate input.
|
---|
1158 | */
|
---|
1159 | AssertMsgReturn(pPicReg->u32Version == PDM_PICREG_VERSION,
|
---|
1160 | ("%s/%d: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pPicReg->u32Version, PDM_PICREG_VERSION),
|
---|
1161 | VERR_VERSION_MISMATCH);
|
---|
1162 | AssertPtrReturn(pPicReg->pfnSetIrq, VERR_INVALID_POINTER);
|
---|
1163 | AssertPtrReturn(pPicReg->pfnGetInterrupt, VERR_INVALID_POINTER);
|
---|
1164 | AssertMsgReturn(pPicReg->u32TheEnd == PDM_PICREG_VERSION,
|
---|
1165 | ("%s/%d: u32TheEnd=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pPicReg->u32TheEnd, PDM_PICREG_VERSION),
|
---|
1166 | VERR_VERSION_MISMATCH);
|
---|
1167 | AssertPtrReturn(ppPicHlp, VERR_INVALID_POINTER);
|
---|
1168 |
|
---|
1169 | VM_ASSERT_STATE_RETURN(pGVM, VMSTATE_CREATING, VERR_WRONG_ORDER);
|
---|
1170 | VM_ASSERT_EMT0_RETURN(pGVM, VERR_VM_THREAD_NOT_EMT);
|
---|
1171 |
|
---|
1172 | /* Check that it's the same device as made the ring-3 registrations: */
|
---|
1173 | AssertLogRelMsgReturn(pGVM->pdm.s.Pic.pDevInsR3 == pDevIns->pDevInsForR3,
|
---|
1174 | ("%p vs %p\n", pGVM->pdm.s.Pic.pDevInsR3, pDevIns->pDevInsForR3), VERR_NOT_OWNER);
|
---|
1175 |
|
---|
1176 | /* Check that it isn't already registered in ring-0: */
|
---|
1177 | AssertLogRelMsgReturn(pGVM->pdm.s.Pic.pDevInsR0 == NULL, ("%p (caller pDevIns=%p)\n", pGVM->pdm.s.Pic.pDevInsR0, pDevIns),
|
---|
1178 | VERR_ALREADY_EXISTS);
|
---|
1179 |
|
---|
1180 | /*
|
---|
1181 | * Take down the callbacks and instance.
|
---|
1182 | */
|
---|
1183 | pGVM->pdm.s.Pic.pDevInsR0 = pDevIns;
|
---|
1184 | pGVM->pdm.s.Pic.pfnSetIrqR0 = pPicReg->pfnSetIrq;
|
---|
1185 | pGVM->pdm.s.Pic.pfnGetInterruptR0 = pPicReg->pfnGetInterrupt;
|
---|
1186 | #endif
|
---|
1187 | Log(("PDM: Registered PIC device '%s'/%d pDevIns=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns));
|
---|
1188 |
|
---|
1189 | /* set the helper pointer and return. */
|
---|
1190 | AssertFailed();
|
---|
1191 | *ppPicHlp = NULL; //&g_pdmR0PicHlp;
|
---|
1192 | LogFlow(("pdmR0DevHlp_PICSetUpContext: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS));
|
---|
1193 | return VINF_SUCCESS;
|
---|
1194 | }
|
---|
1195 |
|
---|
1196 |
|
---|
1197 | /** @interface_method_impl{PDMDEVHLPR0,pfnApicSetUpContext} */
|
---|
1198 | static DECLCALLBACK(int) pdmR0DevHlp_ApicSetUpContext(PPDMDEVINS pDevIns)
|
---|
1199 | {
|
---|
1200 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1201 | LogFlow(("pdmR0DevHlp_ApicSetUpContext: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
|
---|
1202 | #if 0
|
---|
1203 | PGVM pGVM = pDevIns->Internal.s.pGVM;
|
---|
1204 |
|
---|
1205 | /*
|
---|
1206 | * Validate input.
|
---|
1207 | */
|
---|
1208 | VM_ASSERT_STATE_RETURN(pGVM, VMSTATE_CREATING, VERR_WRONG_ORDER);
|
---|
1209 | VM_ASSERT_EMT0_RETURN(pGVM, VERR_VM_THREAD_NOT_EMT);
|
---|
1210 |
|
---|
1211 | /* Check that it's the same device as made the ring-3 registrations: */
|
---|
1212 | AssertLogRelMsgReturn(pGVM->pdm.s.Apic.pDevInsR3 == pDevIns->pDevInsForR3,
|
---|
1213 | ("%p vs %p\n", pGVM->pdm.s.Apic.pDevInsR3, pDevIns->pDevInsForR3), VERR_NOT_OWNER);
|
---|
1214 |
|
---|
1215 | /* Check that it isn't already registered in ring-0: */
|
---|
1216 | AssertLogRelMsgReturn(pGVM->pdm.s.Apic.pDevInsR0 == NULL, ("%p (caller pDevIns=%p)\n", pGVM->pdm.s.Apic.pDevInsR0, pDevIns),
|
---|
1217 | VERR_ALREADY_EXISTS);
|
---|
1218 |
|
---|
1219 | /*
|
---|
1220 | * Take down the instance.
|
---|
1221 | */
|
---|
1222 | pGVM->pdm.s.Apic.pDevInsR0 = pDevIns;
|
---|
1223 | #endif
|
---|
1224 | Log(("PDM: Registered APIC device '%s'/%d pDevIns=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns));
|
---|
1225 |
|
---|
1226 | /* set the helper pointer and return. */
|
---|
1227 | LogFlow(("pdmR0DevHlp_ApicSetUpContext: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS));
|
---|
1228 | return VINF_SUCCESS;
|
---|
1229 | }
|
---|
1230 |
|
---|
1231 |
|
---|
1232 | /** @interface_method_impl{PDMDEVHLPR0,pfnIoApicSetUpContext} */
|
---|
1233 | static DECLCALLBACK(int) pdmR0DevHlp_IoApicSetUpContext(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLP *ppIoApicHlp)
|
---|
1234 | {
|
---|
1235 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1236 | LogFlow(("pdmR0DevHlp_IoApicSetUpContext: caller='%s'/%d: pIoApicReg=%p:{.u32Version=%#x, .pfnSetIrq=%p, .pfnSendMsi=%p, .pfnSetEoi=%p, .u32TheEnd=%#x } ppIoApicHlp=%p\n",
|
---|
1237 | pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg, pIoApicReg->u32Version, pIoApicReg->pfnSetIrq, pIoApicReg->pfnSendMsi, pIoApicReg->pfnSetEoi, pIoApicReg->u32TheEnd, ppIoApicHlp));
|
---|
1238 | #if 0
|
---|
1239 | PGVM pGVM = pDevIns->Internal.s.pGVM;
|
---|
1240 |
|
---|
1241 | /*
|
---|
1242 | * Validate input.
|
---|
1243 | */
|
---|
1244 | AssertMsgReturn(pIoApicReg->u32Version == PDM_IOAPICREG_VERSION,
|
---|
1245 | ("%s/%d: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg->u32Version, PDM_IOAPICREG_VERSION),
|
---|
1246 | VERR_VERSION_MISMATCH);
|
---|
1247 | AssertPtrReturn(pIoApicReg->pfnSetIrq, VERR_INVALID_POINTER);
|
---|
1248 | AssertPtrReturn(pIoApicReg->pfnSendMsi, VERR_INVALID_POINTER);
|
---|
1249 | AssertPtrReturn(pIoApicReg->pfnSetEoi, VERR_INVALID_POINTER);
|
---|
1250 | AssertMsgReturn(pIoApicReg->u32TheEnd == PDM_IOAPICREG_VERSION,
|
---|
1251 | ("%s/%d: u32TheEnd=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg->u32TheEnd, PDM_IOAPICREG_VERSION),
|
---|
1252 | VERR_VERSION_MISMATCH);
|
---|
1253 | AssertPtrReturn(ppIoApicHlp, VERR_INVALID_POINTER);
|
---|
1254 |
|
---|
1255 | VM_ASSERT_STATE_RETURN(pGVM, VMSTATE_CREATING, VERR_WRONG_ORDER);
|
---|
1256 | VM_ASSERT_EMT0_RETURN(pGVM, VERR_VM_THREAD_NOT_EMT);
|
---|
1257 |
|
---|
1258 | /* Check that it's the same device as made the ring-3 registrations: */
|
---|
1259 | AssertLogRelMsgReturn(pGVM->pdm.s.IoApic.pDevInsR3 == pDevIns->pDevInsForR3,
|
---|
1260 | ("%p vs %p\n", pGVM->pdm.s.IoApic.pDevInsR3, pDevIns->pDevInsForR3), VERR_NOT_OWNER);
|
---|
1261 |
|
---|
1262 | /* Check that it isn't already registered in ring-0: */
|
---|
1263 | AssertLogRelMsgReturn(pGVM->pdm.s.IoApic.pDevInsR0 == NULL, ("%p (caller pDevIns=%p)\n", pGVM->pdm.s.IoApic.pDevInsR0, pDevIns),
|
---|
1264 | VERR_ALREADY_EXISTS);
|
---|
1265 |
|
---|
1266 | /*
|
---|
1267 | * Take down the callbacks and instance.
|
---|
1268 | */
|
---|
1269 | pGVM->pdm.s.IoApic.pDevInsR0 = pDevIns;
|
---|
1270 | pGVM->pdm.s.IoApic.pfnSetIrqR0 = pIoApicReg->pfnSetIrq;
|
---|
1271 | pGVM->pdm.s.IoApic.pfnSendMsiR0 = pIoApicReg->pfnSendMsi;
|
---|
1272 | pGVM->pdm.s.IoApic.pfnSetEoiR0 = pIoApicReg->pfnSetEoi;
|
---|
1273 | #endif
|
---|
1274 | Log(("PDM: Registered IOAPIC device '%s'/%d pDevIns=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns));
|
---|
1275 |
|
---|
1276 | /* set the helper pointer and return. */
|
---|
1277 | AssertFailed();
|
---|
1278 | *ppIoApicHlp = NULL; //&g_pdmR0IoApicHlp;
|
---|
1279 | LogFlow(("pdmR0DevHlp_IoApicSetUpContext: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS));
|
---|
1280 | return VINF_SUCCESS;
|
---|
1281 | }
|
---|
1282 |
|
---|
1283 |
|
---|
1284 | /** @interface_method_impl{PDMDEVHLPR0,pfnHpetSetUpContext} */
|
---|
1285 | static DECLCALLBACK(int) pdmR0DevHlp_HpetSetUpContext(PPDMDEVINS pDevIns, PPDMHPETREG pHpetReg, PCPDMHPETHLPR0 *ppHpetHlp)
|
---|
1286 | {
|
---|
1287 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1288 | LogFlow(("pdmR0DevHlp_HpetSetUpContext: caller='%s'/%d: pHpetReg=%p:{.u32Version=%#x, } ppHpetHlp=%p\n",
|
---|
1289 | pDevIns->pReg->szName, pDevIns->iInstance, pHpetReg, pHpetReg->u32Version, ppHpetHlp));
|
---|
1290 | #if 0
|
---|
1291 | PGVM pGVM = pDevIns->Internal.s.pGVM;
|
---|
1292 |
|
---|
1293 | /*
|
---|
1294 | * Validate input.
|
---|
1295 | */
|
---|
1296 | AssertMsgReturn(pHpetReg->u32Version == PDM_HPETREG_VERSION,
|
---|
1297 | ("%s/%d: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pHpetReg->u32Version, PDM_HPETREG_VERSION),
|
---|
1298 | VERR_VERSION_MISMATCH);
|
---|
1299 | AssertPtrReturn(ppHpetHlp, VERR_INVALID_POINTER);
|
---|
1300 |
|
---|
1301 | VM_ASSERT_STATE_RETURN(pGVM, VMSTATE_CREATING, VERR_WRONG_ORDER);
|
---|
1302 | VM_ASSERT_EMT0_RETURN(pGVM, VERR_VM_THREAD_NOT_EMT);
|
---|
1303 |
|
---|
1304 | /* Check that it's the same device as made the ring-3 registrations: */
|
---|
1305 | AssertLogRelMsgReturn(pGVM->pdm.s.pHpet == pDevIns->pDevInsForR3, ("%p vs %p\n", pGVM->pdm.s.pHpet, pDevIns->pDevInsForR3),
|
---|
1306 | VERR_NOT_OWNER);
|
---|
1307 |
|
---|
1308 | ///* Check that it isn't already registered in ring-0: */
|
---|
1309 | //AssertLogRelMsgReturn(pGVM->pdm.s.Hpet.pDevInsR0 == NULL, ("%p (caller pDevIns=%p)\n", pGVM->pdm.s.Hpet.pDevInsR0, pDevIns),
|
---|
1310 | // VERR_ALREADY_EXISTS);
|
---|
1311 | #endif
|
---|
1312 | /*
|
---|
1313 | * Nothing to take down here at present.
|
---|
1314 | */
|
---|
1315 | Log(("PDM: Registered HPET device '%s'/%d pDevIns=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns));
|
---|
1316 |
|
---|
1317 | /* set the helper pointer and return. */
|
---|
1318 | AssertFailed();
|
---|
1319 | *ppHpetHlp = NULL; //&g_pdmR0HpetHlp;
|
---|
1320 | LogFlow(("pdmR0DevHlp_HpetSetUpContext: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS));
|
---|
1321 | return VINF_SUCCESS;
|
---|
1322 | }
|
---|
1323 |
|
---|
1324 |
|
---|
1325 | /** @interface_method_impl{PDMDEVHLPR0,pfnPGMHandlerPhysicalPageTempOff} */
|
---|
1326 | static DECLCALLBACK(int) pdmR0DevHlp_PGMHandlerPhysicalPageTempOff(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage)
|
---|
1327 | {
|
---|
1328 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1329 | LogFlow(("pdmR0DevHlp_PGMHandlerPhysicalPageTempOff: caller='%s'/%d: GCPhys=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys));
|
---|
1330 |
|
---|
1331 | AssertFailed();
|
---|
1332 | int rc = VERR_NOT_IMPLEMENTED; //PGMHandlerPhysicalPageTempOff(pDevIns->Internal.s.pGVM, GCPhys, GCPhysPage);
|
---|
1333 |
|
---|
1334 | Log(("pdmR0DevHlp_PGMHandlerPhysicalPageTempOff: caller='%s'/%d: returns %Rrc\n",
|
---|
1335 | pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
1336 | return rc;
|
---|
1337 | }
|
---|
1338 |
|
---|
1339 |
|
---|
1340 | /** @interface_method_impl{PDMDEVHLPR0,pfnMmioMapMmio2Page} */
|
---|
1341 | static DECLCALLBACK(int) pdmR0DevHlp_MmioMapMmio2Page(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS offRegion,
|
---|
1342 | uint64_t hMmio2, RTGCPHYS offMmio2, uint64_t fPageFlags)
|
---|
1343 | {
|
---|
1344 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1345 | LogFlow(("pdmR0DevHlp_MmioMapMmio2Page: caller='%s'/%d: hRegion=%RX64 offRegion=%RGp hMmio2=%RX64 offMmio2=%RGp fPageFlags=%RX64\n",
|
---|
1346 | pDevIns->pReg->szName, pDevIns->iInstance, hRegion, offRegion, hMmio2, offMmio2, fPageFlags));
|
---|
1347 |
|
---|
1348 | AssertFailed();
|
---|
1349 | int rc = VERR_NOT_IMPLEMENTED; //IOMMmioMapMmio2Page(pDevIns->Internal.s.pGVM, pDevIns, hRegion, offRegion, hMmio2, offMmio2, fPageFlags);
|
---|
1350 |
|
---|
1351 | Log(("pdmR0DevHlp_MmioMapMmio2Page: caller='%s'/%d: returns %Rrc\n",
|
---|
1352 | pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
1353 | return rc;
|
---|
1354 | }
|
---|
1355 |
|
---|
1356 |
|
---|
1357 | /** @interface_method_impl{PDMDEVHLPR0,pfnMmioResetRegion} */
|
---|
1358 | static DECLCALLBACK(int) pdmR0DevHlp_MmioResetRegion(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion)
|
---|
1359 | {
|
---|
1360 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1361 | LogFlow(("pdmR0DevHlp_MmioResetRegion: caller='%s'/%d: hRegion=%RX64\n",
|
---|
1362 | pDevIns->pReg->szName, pDevIns->iInstance, hRegion));
|
---|
1363 |
|
---|
1364 | AssertFailed();
|
---|
1365 | int rc = VERR_NOT_IMPLEMENTED; //IOMMmioResetRegion(pDevIns->Internal.s.pGVM, pDevIns, hRegion);
|
---|
1366 |
|
---|
1367 | Log(("pdmR0DevHlp_MmioResetRegion: caller='%s'/%d: returns %Rrc\n",
|
---|
1368 | pDevIns->pReg->szName, pDevIns->iInstance, rc));
|
---|
1369 | return rc;
|
---|
1370 | }
|
---|
1371 |
|
---|
1372 |
|
---|
1373 | /** @interface_method_impl{PDMDEVHLPR0,pfnGIMGetMmio2Regions} */
|
---|
1374 | static DECLCALLBACK(PGIMMMIO2REGION) pdmR0DevHlp_GIMGetMmio2Regions(PPDMDEVINS pDevIns, uint32_t *pcRegions)
|
---|
1375 | {
|
---|
1376 | PDMDEV_ASSERT_DEVINS(pDevIns);
|
---|
1377 |
|
---|
1378 | LogFlow(("pdmR0DevHlp_GIMGetMmio2Regions: caller='%s'/%d: pcRegions=%p\n",
|
---|
1379 | pDevIns->pReg->szName, pDevIns->iInstance, pcRegions));
|
---|
1380 |
|
---|
1381 | AssertFailed();
|
---|
1382 | PGIMMMIO2REGION pRegion = NULL; //GIMGetMmio2Regions(pDevIns->Internal.s.pGVM, pcRegions);
|
---|
1383 |
|
---|
1384 | LogFlow(("pdmR0DevHlp_GIMGetMmio2Regions: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pRegion));
|
---|
1385 | return pRegion;
|
---|
1386 | }
|
---|
1387 |
|
---|
1388 |
|
---|
1389 | /**
|
---|
1390 | * The Ring-0 Device Helper Callbacks.
|
---|
1391 | */
|
---|
1392 | const PDMDEVHLPR0 g_tstDevPdmDevHlpR0 =
|
---|
1393 | {
|
---|
1394 | PDM_DEVHLPR0_VERSION,
|
---|
1395 | pdmR0DevHlp_IoPortSetUpContextEx,
|
---|
1396 | pdmR0DevHlp_MmioSetUpContextEx,
|
---|
1397 | pdmR0DevHlp_Mmio2SetUpContext,
|
---|
1398 | pdmR0DevHlp_PCIPhysRead,
|
---|
1399 | pdmR0DevHlp_PCIPhysWrite,
|
---|
1400 | pdmR0DevHlp_PCISetIrq,
|
---|
1401 | pdmR0DevHlp_ISASetIrq,
|
---|
1402 | pdmR0DevHlp_PhysRead,
|
---|
1403 | pdmR0DevHlp_PhysWrite,
|
---|
1404 | pdmR0DevHlp_A20IsEnabled,
|
---|
1405 | pdmR0DevHlp_VMState,
|
---|
1406 | pdmR0DevHlp_GetVM,
|
---|
1407 | pdmR0DevHlp_GetVMCPU,
|
---|
1408 | pdmR0DevHlp_GetCurrentCpuId,
|
---|
1409 | pdmR0DevHlp_TimerFromMicro,
|
---|
1410 | pdmR0DevHlp_TimerFromMilli,
|
---|
1411 | pdmR0DevHlp_TimerFromNano,
|
---|
1412 | pdmR0DevHlp_TimerGet,
|
---|
1413 | pdmR0DevHlp_TimerGetFreq,
|
---|
1414 | pdmR0DevHlp_TimerGetNano,
|
---|
1415 | pdmR0DevHlp_TimerIsActive,
|
---|
1416 | pdmR0DevHlp_TimerIsLockOwner,
|
---|
1417 | pdmR0DevHlp_TimerLockClock,
|
---|
1418 | pdmR0DevHlp_TimerLockClock2,
|
---|
1419 | pdmR0DevHlp_TimerSet,
|
---|
1420 | pdmR0DevHlp_TimerSetFrequencyHint,
|
---|
1421 | pdmR0DevHlp_TimerSetMicro,
|
---|
1422 | pdmR0DevHlp_TimerSetMillies,
|
---|
1423 | pdmR0DevHlp_TimerSetNano,
|
---|
1424 | pdmR0DevHlp_TimerSetRelative,
|
---|
1425 | pdmR0DevHlp_TimerStop,
|
---|
1426 | pdmR0DevHlp_TimerUnlockClock,
|
---|
1427 | pdmR0DevHlp_TimerUnlockClock2,
|
---|
1428 | pdmR0DevHlp_TMTimeVirtGet,
|
---|
1429 | pdmR0DevHlp_TMTimeVirtGetFreq,
|
---|
1430 | pdmR0DevHlp_TMTimeVirtGetNano,
|
---|
1431 | pdmR0DevHlp_QueueAlloc,
|
---|
1432 | pdmR0DevHlp_QueueInsert,
|
---|
1433 | pdmR0DevHlp_QueueFlushIfNecessary,
|
---|
1434 | pdmR0DevHlp_TaskTrigger,
|
---|
1435 | pdmR0DevHlp_SUPSemEventSignal,
|
---|
1436 | pdmR0DevHlp_SUPSemEventWaitNoResume,
|
---|
1437 | pdmR0DevHlp_SUPSemEventWaitNsAbsIntr,
|
---|
1438 | pdmR0DevHlp_SUPSemEventWaitNsRelIntr,
|
---|
1439 | pdmR0DevHlp_SUPSemEventGetResolution,
|
---|
1440 | pdmR0DevHlp_SUPSemEventMultiSignal,
|
---|
1441 | pdmR0DevHlp_SUPSemEventMultiReset,
|
---|
1442 | pdmR0DevHlp_SUPSemEventMultiWaitNoResume,
|
---|
1443 | pdmR0DevHlp_SUPSemEventMultiWaitNsAbsIntr,
|
---|
1444 | pdmR0DevHlp_SUPSemEventMultiWaitNsRelIntr,
|
---|
1445 | pdmR0DevHlp_SUPSemEventMultiGetResolution,
|
---|
1446 | pdmR0DevHlp_CritSectGetNop,
|
---|
1447 | pdmR0DevHlp_SetDeviceCritSect,
|
---|
1448 | pdmR0DevHlp_CritSectEnter,
|
---|
1449 | pdmR0DevHlp_CritSectEnterDebug,
|
---|
1450 | pdmR0DevHlp_CritSectTryEnter,
|
---|
1451 | pdmR0DevHlp_CritSectTryEnterDebug,
|
---|
1452 | pdmR0DevHlp_CritSectLeave,
|
---|
1453 | pdmR0DevHlp_CritSectIsOwner,
|
---|
1454 | pdmR0DevHlp_CritSectIsInitialized,
|
---|
1455 | pdmR0DevHlp_CritSectHasWaiters,
|
---|
1456 | pdmR0DevHlp_CritSectGetRecursion,
|
---|
1457 | pdmR0DevHlp_CritSectScheduleExitEvent,
|
---|
1458 | pdmR0DevHlp_CritSectRwEnterShared,
|
---|
1459 | pdmR0DevHlp_CritSectRwEnterSharedDebug,
|
---|
1460 | pdmR0DevHlp_CritSectRwTryEnterShared,
|
---|
1461 | pdmR0DevHlp_CritSectRwTryEnterSharedDebug,
|
---|
1462 | pdmR0DevHlp_CritSectRwLeaveShared,
|
---|
1463 | pdmR0DevHlp_CritSectRwEnterExcl,
|
---|
1464 | pdmR0DevHlp_CritSectRwEnterExclDebug,
|
---|
1465 | pdmR0DevHlp_CritSectRwTryEnterExcl,
|
---|
1466 | pdmR0DevHlp_CritSectRwTryEnterExclDebug,
|
---|
1467 | pdmR0DevHlp_CritSectRwLeaveExcl,
|
---|
1468 | pdmR0DevHlp_CritSectRwIsWriteOwner,
|
---|
1469 | pdmR0DevHlp_CritSectRwIsReadOwner,
|
---|
1470 | pdmR0DevHlp_CritSectRwGetWriteRecursion,
|
---|
1471 | pdmR0DevHlp_CritSectRwGetWriterReadRecursion,
|
---|
1472 | pdmR0DevHlp_CritSectRwGetReadCount,
|
---|
1473 | pdmR0DevHlp_CritSectRwIsInitialized,
|
---|
1474 | pdmR0DevHlp_DBGFTraceBuf,
|
---|
1475 | pdmR0DevHlp_PCIBusSetUpContext,
|
---|
1476 | pdmR0DevHlp_IommuSetUpContext,
|
---|
1477 | pdmR0DevHlp_PICSetUpContext,
|
---|
1478 | pdmR0DevHlp_ApicSetUpContext,
|
---|
1479 | pdmR0DevHlp_IoApicSetUpContext,
|
---|
1480 | pdmR0DevHlp_HpetSetUpContext,
|
---|
1481 | pdmR0DevHlp_PGMHandlerPhysicalPageTempOff,
|
---|
1482 | pdmR0DevHlp_MmioMapMmio2Page,
|
---|
1483 | pdmR0DevHlp_MmioResetRegion,
|
---|
1484 | pdmR0DevHlp_GIMGetMmio2Regions,
|
---|
1485 | NULL /*pfnReserved1*/,
|
---|
1486 | NULL /*pfnReserved2*/,
|
---|
1487 | NULL /*pfnReserved3*/,
|
---|
1488 | NULL /*pfnReserved4*/,
|
---|
1489 | NULL /*pfnReserved5*/,
|
---|
1490 | NULL /*pfnReserved6*/,
|
---|
1491 | NULL /*pfnReserved7*/,
|
---|
1492 | NULL /*pfnReserved8*/,
|
---|
1493 | NULL /*pfnReserved9*/,
|
---|
1494 | NULL /*pfnReserved10*/,
|
---|
1495 | PDM_DEVHLPR0_VERSION
|
---|
1496 | };
|
---|