Changeset 82883 in vbox for trunk/src/VBox/Devices/testcase
- Timestamp:
- Jan 27, 2020 6:20:21 PM (5 years ago)
- Location:
- trunk/src/VBox/Devices/testcase
- Files:
-
- 4 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/testcase/tstDevice.cpp
r76553 r82883 154 154 PCTSTDEVPDMMOD pPdmMod; 155 155 /** Device registration structure. */ 156 const struct PDMDEVREG*pReg;156 const PDMDEVREG *pReg; 157 157 } TSTDEVPDMDEV; 158 158 /** Pointer to a PDM device descriptor .*/ … … 204 204 RTLISTANCHOR g_LstPdmDevs; 205 205 206 extern const TSTDEVVMMCALLBACKS g_tstDevVmmCallbacks;207 208 206 /** 209 207 * PDM R0 imports we implement. … … 211 209 static const TSTDEVPDMR0IMPORTS g_aPdmR0Imports[] = 212 210 { 211 #if 0 213 212 {"IOMMMIOMapMMIO2Page", (PFNRT)IOMMMIOMapMMIO2Page}, 214 213 {"IOMMMIOResetRegion", (PFNRT)IOMMMIOResetRegion}, … … 255 254 {"nocrt_memset", (PFNRT)memset}, 256 255 {"nocrt_strlen", (PFNRT)strlen}, 256 #else 257 { NULL, NULL } 258 #endif 257 259 }; 258 260 … … 480 482 && tstDevPdmR3IsValidName(pReg->szName), 481 483 ("Invalid name '%.*s'\n", sizeof(pReg->szName), pReg->szName), 482 VERR_PDM_INVALID_DEVICE_REGISTRATION);483 AssertMsgReturn( !(pReg->fFlags & PDM_DEVREG_FLAGS_RC)484 || ( pReg->szRCMod[0]485 && strlen(pReg->szRCMod) < sizeof(pReg->szRCMod)),486 ("Invalid GC module name '%s' - (Device %s)\n", pReg->szRCMod, pReg->szName),487 VERR_PDM_INVALID_DEVICE_REGISTRATION);488 AssertMsgReturn( !(pReg->fFlags & PDM_DEVREG_FLAGS_R0)489 || ( pReg->szR0Mod[0]490 && strlen(pReg->szR0Mod) < sizeof(pReg->szR0Mod)),491 ("Invalid R0 module name '%s' - (Device %s)\n", pReg->szR0Mod, pReg->szName),492 484 VERR_PDM_INVALID_DEVICE_REGISTRATION); 493 485 AssertMsgReturn((pReg->fFlags & PDM_DEVREG_FLAGS_HOST_BITS_MASK) == PDM_DEVREG_FLAGS_HOST_BITS_DEFAULT, … … 503 495 ("Max instances %u! (Device %s)\n", pReg->cMaxInstances, pReg->szName), 504 496 VERR_PDM_INVALID_DEVICE_REGISTRATION); 505 AssertMsgReturn(pReg->cbInstance <= (uint32_t)(pReg->fFlags & (PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0) ? 96 * _1K : _1M),506 ("Instance size %d bytes! (Device %s)\n", pReg->cbInstance , pReg->szName),497 AssertMsgReturn(pReg->cbInstanceCC <= (uint32_t)(pReg->fFlags & (PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0) ? 96 * _1K : _1M), 498 ("Instance size %d bytes! (Device %s)\n", pReg->cbInstanceCC, pReg->szName), 507 499 VERR_PDM_INVALID_DEVICE_REGISTRATION); 508 500 AssertMsgReturn(pReg->pfnConstruct, … … 852 844 RTListInit(&Dut.SupSession.LstSupSem); 853 845 CFGMNODE Cfg; 854 Cfg.pVmmCallbacks = &g_tstDevVmmCallbacks;855 846 Cfg.pDut = &Dut; 856 847 … … 858 849 AssertRC(rc); 859 850 860 PPDMDEVINS pDevIns = (PPDMDEVINS)RTMemAllocZ(RT_UOFFSETOF_DYN(PDMDEVINS, achInstanceData[pPdmDev->pReg->cbInstance ]));851 PPDMDEVINS pDevIns = (PPDMDEVINS)RTMemAllocZ(RT_UOFFSETOF_DYN(PDMDEVINS, achInstanceData[pPdmDev->pReg->cbInstanceCC])); 861 852 pDevIns->u32Version = PDM_DEVINS_VERSION; 862 853 pDevIns->iInstance = 0; … … 865 856 pDevIns->pHlpR3 = &g_tstDevPdmDevHlpR3; 866 857 pDevIns->pCfg = &Cfg; 867 pDevIns->Internal.s.pVmmCallbacks = &g_tstDevVmmCallbacks;868 858 pDevIns->Internal.s.pDut = &Dut; 869 859 rc = pPdmDev->pReg->pfnConstruct(pDevIns, 0, &Cfg); … … 872 862 PRTDEVDUTIOPORT pIoPort = RTListGetFirst(&Dut.LstIoPorts, RTDEVDUTIOPORT, NdIoPorts); 873 863 uint32_t uVal = 0; 874 PDMCritSectEnter(pDevIns->pCritSectRoR3, VERR_IGNORED);864 /*PDMCritSectEnter(pDevIns->pCritSectRoR3, VERR_IGNORED);*/ 875 865 pIoPort->pfnInR0(pDevIns, pIoPort->pvUserR0, pIoPort->PortStart, &uVal, sizeof(uint8_t)); 876 PDMCritSectLeave(pDevIns->pCritSectRoR3);866 /*PDMCritSectLeave(pDevIns->pCritSectRoR3);*/ 877 867 } 878 868 } -
trunk/src/VBox/Devices/testcase/tstDeviceInternal.h
r76565 r82883 21 21 #endif 22 22 23 #include <VBox/param.h> 23 24 #include <VBox/types.h> 24 25 #include <iprt/assert.h> … … 27 28 28 29 #include "tstDevicePlugin.h" 29 #include "tstDeviceVMMInternal.h"30 30 31 31 RT_C_DECLS_BEGIN … … 34 34 /** Converts PDM device instance to the device under test structure. */ 35 35 #define TSTDEV_PDMDEVINS_2_DUT(a_pDevIns) ((a_pDevIns)->Internal.s.pDut) 36 37 /** Forward declaration of internal test device instance data. */ 38 typedef struct TSTDEVDUTINT *PTSTDEVDUTINT; 39 40 41 /** 42 * CFGM node structure. 43 */ 44 typedef struct CFGMNODE 45 { 46 /** Device under test this CFGM node is for. */ 47 PTSTDEVDUTINT pDut; 48 /** @todo: */ 49 } CFGMNODE; 50 51 52 /** 53 * Private device instance data. 54 */ 55 typedef struct PDMDEVINSINTR3 56 { 57 /** Pointer to the device under test the PDM device instance is for. */ 58 PTSTDEVDUTINT pDut; 59 } PDMDEVINSINTR3; 60 AssertCompile(sizeof(PDMDEVINSINTR3) <= (HC_ARCH_BITS == 32 ? 72 : 112 + 0x28)); 61 62 /** 63 * Private device instance data. 64 */ 65 typedef struct PDMDEVINSINTR0 66 { 67 /** Pointer to the device under test the PDM device instance is for. */ 68 PTSTDEVDUTINT pDut; 69 } PDMDEVINSINTR0; 70 AssertCompile(sizeof(PDMDEVINSINTR0) <= (HC_ARCH_BITS == 32 ? 72 : 112 + 0x28)); 71 72 /** 73 * Private device instance data. 74 */ 75 typedef struct PDMDEVINSINTRC 76 { 77 /** Pointer to the device under test the PDM device instance is for. */ 78 PTSTDEVDUTINT pDut; 79 } PDMDEVINSINTRC; 80 AssertCompile(sizeof(PDMDEVINSINTRC) <= (HC_ARCH_BITS == 32 ? 72 : 112 + 0x28)); 81 82 typedef struct PDMPCIDEVINT 83 { 84 bool fRegistered; 85 } PDMPCIDEVINT; 86 87 #define PDMDEVINSINT_DECLARED 88 #define PDMPCIDEVINT_DECLARED 89 #define VMM_INCLUDED_SRC_include_VMInternal_h 90 #define VMM_INCLUDED_SRC_include_VMMInternal_h 91 RT_C_DECLS_END 92 #include <VBox/vmm/pdmdev.h> 93 #include <VBox/vmm/pdmpci.h> 94 #include <VBox/vmm/pdmdrv.h> 95 RT_C_DECLS_BEGIN 96 36 97 37 98 /** … … 66 127 void *pvUserR3; 67 128 /** Out handler - R3. */ 68 PFNIOMIOPORT OUTpfnOutR3;129 PFNIOMIOPORTNEWOUT pfnOutR3; 69 130 /** In handler - R3. */ 70 PFNIOMIOPORT INpfnInR3;131 PFNIOMIOPORTNEWIN pfnInR3; 71 132 /** Out string handler - R3. */ 72 PFNIOMIOPORT OUTSTRINGpfnOutStrR3;133 PFNIOMIOPORTNEWOUTSTRING pfnOutStrR3; 73 134 /** In string handler - R3. */ 74 PFNIOMIOPORT INSTRINGpfnInStrR3;135 PFNIOMIOPORTNEWINSTRING pfnInStrR3; 75 136 76 137 /** Opaque user data - R0. */ 77 138 void *pvUserR0; 78 139 /** Out handler - R0. */ 79 PFNIOMIOPORT OUTpfnOutR0;140 PFNIOMIOPORTNEWOUT pfnOutR0; 80 141 /** In handler - R0. */ 81 PFNIOMIOPORT INpfnInR0;142 PFNIOMIOPORTNEWIN pfnInR0; 82 143 /** Out string handler - R0. */ 83 PFNIOMIOPORT OUTSTRINGpfnOutStrR0;144 PFNIOMIOPORTNEWOUTSTRING pfnOutStrR0; 84 145 /** In string handler - R0. */ 85 PFNIOMIOPORT INSTRINGpfnInStrR0;146 PFNIOMIOPORTNEWINSTRING pfnInStrR0; 86 147 87 148 #ifdef TSTDEV_SUPPORTS_RC … … 89 150 void *pvUserRC; 90 151 /** Out handler - RC. */ 91 PFNIOMIOPORT OUTpfnOutRC;152 PFNIOMIOPORTNEWOUT pfnOutRC; 92 153 /** In handler - RC. */ 93 PFNIOMIOPORT INpfnInRC;154 PFNIOMIOPORTNEWIN pfnInRC; 94 155 /** Out string handler - RC. */ 95 PFNIOMIOPORT OUTSTRINGpfnOutStrRC;156 PFNIOMIOPORTNEWOUTSTRING pfnOutStrRC; 96 157 /** In string handler - RC. */ 97 PFNIOMIOPORT INSTRINGpfnInStrRC;158 PFNIOMIOPORTNEWINSTRING pfnInStrRC; 98 159 #endif 99 160 } RTDEVDUTIOPORT; … … 204 265 /** The SUP session we emulate. */ 205 266 TSTDEVSUPDRVSESSION SupSession; 206 /** The VM state asso icated with this device. */267 /** The VM state associated with this device. */ 207 268 PVM pVm; 208 269 /** The registered PCI device instance if this is a PCI device. */ … … 213 274 214 275 276 extern const PDMDEVHLPR3 g_tstDevPdmDevHlpR3; 277 278 215 279 DECLHIDDEN(int) tstDevPdmLdrGetSymbol(PTSTDEVDUTINT pThis, const char *pszMod, TSTDEVPDMMODTYPE enmModType, 216 280 const char *pszSymbol, PFNRT *ppfn); -
trunk/src/VBox/Devices/testcase/tstDevicePdmDevHlp.cpp
r76553 r82883 68 68 69 69 70 /** @interface_method_impl{PDMDEVHLPR3,pfnIOPortRegister} */ 71 static DECLCALLBACK(int) pdmR3DevHlp_IOPortRegister(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, RTHCPTR pvUser, PFNIOMIOPORTOUT pfnOut, PFNIOMIOPORTIN pfnIn, 72 PFNIOMIOPORTOUTSTRING pfnOutStr, PFNIOMIOPORTINSTRING pfnInStr, const char *pszDesc) 73 { 74 PDMDEV_ASSERT_DEVINS(pDevIns); 75 LogFlow(("pdmR3DevHlp_IOPortRegister: caller='%s'/%d: Port=%#x cPorts=%#x pvUser=%p pfnOut=%p pfnIn=%p pfnOutStr=%p pfnInStr=%p p32_tszDesc=%p:{%s}\n", 76 pDevIns->pReg->szName, pDevIns->iInstance, Port, cPorts, pvUser, pfnOut, pfnIn, pfnOutStr, pfnInStr, pszDesc, pszDesc)); 77 78 /** @todo Verify there is no overlapping. */ 79 80 RT_NOREF(pszDesc); 81 int rc = VINF_SUCCESS; 82 PRTDEVDUTIOPORT pIoPort = (PRTDEVDUTIOPORT)RTMemAllocZ(sizeof(RTDEVDUTIOPORT)); 83 if (RT_LIKELY(pIoPort)) 84 { 85 pIoPort->PortStart = Port; 86 pIoPort->cPorts = cPorts; 87 pIoPort->pvUserR3 = pvUser; 88 pIoPort->pfnOutR3 = pfnOut; 89 pIoPort->pfnInR3 = pfnIn; 90 pIoPort->pfnOutStrR3 = pfnOutStr; 91 pIoPort->pfnInStrR3 = pfnInStr; 92 RTListAppend(&pDevIns->Internal.s.pDut->LstIoPorts, &pIoPort->NdIoPorts); 93 } 94 else 95 rc = VERR_NO_MEMORY; 96 97 LogFlow(("pdmR3DevHlp_IOPortRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 98 return rc; 99 } 100 101 102 /** @interface_method_impl{PDMDEVHLPR3,pfnIOPortRegisterRC} */ 103 static DECLCALLBACK(int) pdmR3DevHlp_IOPortRegisterRC(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, RTRCPTR pvUser, 104 const char *pszOut, const char *pszIn, 105 const char *pszOutStr, const char *pszInStr, const char *pszDesc) 106 { 107 PDMDEV_ASSERT_DEVINS(pDevIns); 108 LogFlow(("pdmR3DevHlp_IOPortRegisterRC: caller='%s'/%d: Port=%#x cPorts=%#x pvUser=%p pszOut=%p:{%s} pszIn=%p:{%s} pszOutStr=%p:{%s} pszInStr=%p:{%s} pszDesc=%p:{%s}\n", 109 pDevIns->pReg->szName, pDevIns->iInstance, Port, cPorts, pvUser, pszOut, pszOut, pszIn, pszIn, pszOutStr, pszOutStr, pszInStr, pszInStr, pszDesc, pszDesc)); 110 111 /** @todo */ 112 int rc = VINF_SUCCESS; 113 //AssertFailed(); 114 115 LogFlow(("pdmR3DevHlp_IOPortRegisterRC: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 116 return rc; 117 } 118 119 120 /** @interface_method_impl{PDMDEVHLPR3,pfnIOPortRegisterR0} */ 121 static DECLCALLBACK(int) pdmR3DevHlp_IOPortRegisterR0(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts, RTR0PTR pvUser, 122 const char *pszOut, const char *pszIn, 123 const char *pszOutStr, const char *pszInStr, const char *pszDesc) 124 { 125 PDMDEV_ASSERT_DEVINS(pDevIns); 126 LogFlow(("pdmR3DevHlp_IOPortRegisterR0: caller='%s'/%d: Port=%#x cPorts=%#x pvUser=%p pszOut=%p:{%s} pszIn=%p:{%s} pszOutStr=%p:{%s} pszInStr=%p:{%s} pszDesc=%p:{%s}\n", 127 pDevIns->pReg->szName, pDevIns->iInstance, Port, cPorts, pvUser, pszOut, pszOut, pszIn, pszIn, pszOutStr, pszOutStr, pszInStr, pszInStr, pszDesc, pszDesc)); 128 129 PTSTDEVDUTINT pThis = pDevIns->Internal.s.pDut; 130 PRTDEVDUTIOPORT pIoPort; 131 int rc = VERR_NOT_FOUND; 132 RTListForEach(&pThis->LstIoPorts, pIoPort, RTDEVDUTIOPORT, NdIoPorts) 133 { 134 /** @todo Support overlapping port ranges. */ 135 if ( pIoPort->PortStart == Port 136 && pIoPort->cPorts == cPorts) 137 { 138 rc = VINF_SUCCESS; 139 pIoPort->pvUserR0 = (void *)pvUser; 140 if (pszOut) 141 rc = tstDevPdmLdrGetSymbol(pThis, pDevIns->pReg->szR0Mod, TSTDEVPDMMODTYPE_R0, pszOut, (PFNRT *)&pIoPort->pfnOutR0); 142 if (RT_SUCCESS(rc) && pszIn) 143 rc = tstDevPdmLdrGetSymbol(pThis, pDevIns->pReg->szR0Mod, TSTDEVPDMMODTYPE_R0, pszIn, (PFNRT *)&pIoPort->pfnInR0); 144 if (RT_SUCCESS(rc) && pszOutStr) 145 rc = tstDevPdmLdrGetSymbol(pThis, pDevIns->pReg->szR0Mod, TSTDEVPDMMODTYPE_R0, pszOutStr, (PFNRT *)&pIoPort->pfnOutStrR0); 146 if (RT_SUCCESS(rc) && pszInStr) 147 rc = tstDevPdmLdrGetSymbol(pThis, pDevIns->pReg->szR0Mod, TSTDEVPDMMODTYPE_R0, pszInStr, (PFNRT *)&pIoPort->pfnInStrR0); 148 break; 149 } 150 } 151 152 LogFlow(("pdmR3DevHlp_IOPortRegisterR0: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 153 return rc; 154 } 155 156 157 /** @interface_method_impl{PDMDEVHLPR3,pfnIOPortDeregister} */ 158 static DECLCALLBACK(int) pdmR3DevHlp_IOPortDeregister(PPDMDEVINS pDevIns, RTIOPORT Port, RTIOPORT cPorts) 159 { 160 PDMDEV_ASSERT_DEVINS(pDevIns); 161 LogFlow(("pdmR3DevHlp_IOPortDeregister: caller='%s'/%d: Port=%#x cPorts=%#x\n", 162 pDevIns->pReg->szName, pDevIns->iInstance, Port, cPorts)); 163 164 int rc = VERR_NOT_IMPLEMENTED; 165 AssertFailed(); 166 167 LogFlow(("pdmR3DevHlp_IOPortDeregister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 168 return rc; 169 } 170 171 172 /** @interface_method_impl{PDMDEVHLPR3,pfnMMIORegister} */ 173 static DECLCALLBACK(int) pdmR3DevHlp_MMIORegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTHCPTR pvUser, 174 PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill, 175 uint32_t fFlags, const char *pszDesc) 176 { 177 PDMDEV_ASSERT_DEVINS(pDevIns); 178 LogFlow(("pdmR3DevHlp_MMIORegister: caller='%s'/%d: GCPhysStart=%RGp cbRange=%RGp pvUser=%p pfnWrite=%p pfnRead=%p pfnFill=%p fFlags=%#x pszDesc=%p:{%s}\n", 179 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc, fFlags, pszDesc)); 180 181 int rc = VERR_NOT_IMPLEMENTED; 182 AssertFailed(); 183 184 LogFlow(("pdmR3DevHlp_MMIORegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 185 return rc; 186 } 187 188 189 /** @interface_method_impl{PDMDEVHLPR3,pfnMMIORegisterRC} */ 190 static DECLCALLBACK(int) pdmR3DevHlp_MMIORegisterRC(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTRCPTR pvUser, 191 const char *pszWrite, const char *pszRead, const char *pszFill) 192 { 193 PDMDEV_ASSERT_DEVINS(pDevIns); 194 LogFlow(("pdmR3DevHlp_MMIORegisterRC: caller='%s'/%d: GCPhysStart=%RGp cbRange=%RGp pvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n", 195 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pszWrite, pszWrite, pszRead, pszRead, pszFill, pszFill)); 196 197 int rc = VERR_NOT_IMPLEMENTED; 198 AssertFailed(); 199 200 LogFlow(("pdmR3DevHlp_MMIORegisterRC: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 201 return rc; 202 } 203 204 /** @interface_method_impl{PDMDEVHLPR3,pfnMMIORegisterR0} */ 205 static DECLCALLBACK(int) pdmR3DevHlp_MMIORegisterR0(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTR0PTR pvUser, 206 const char *pszWrite, const char *pszRead, const char *pszFill) 207 { 208 PDMDEV_ASSERT_DEVINS(pDevIns); 209 LogFlow(("pdmR3DevHlp_MMIORegisterHC: caller='%s'/%d: GCPhysStart=%RGp cbRange=%RGp pvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n", 210 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pszWrite, pszWrite, pszRead, pszRead, pszFill, pszFill)); 211 212 int rc = VERR_NOT_IMPLEMENTED; 213 AssertFailed(); 214 215 LogFlow(("pdmR3DevHlp_MMIORegisterR0: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 216 return rc; 217 } 218 219 220 /** @interface_method_impl{PDMDEVHLPR3,pfnMMIODeregister} */ 221 static DECLCALLBACK(int) pdmR3DevHlp_MMIODeregister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange) 222 { 223 PDMDEV_ASSERT_DEVINS(pDevIns); 224 LogFlow(("pdmR3DevHlp_MMIODeregister: caller='%s'/%d: GCPhysStart=%RGp cbRange=%RGp\n", 225 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange)); 226 227 int rc = VERR_NOT_IMPLEMENTED; 228 AssertFailed(); 229 230 LogFlow(("pdmR3DevHlp_MMIODeregister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 231 return rc; 232 } 233 70 /** @interface_method_impl{PDMDEVHLPR3,pfnIoPortCreateEx} */ 71 static DECLCALLBACK(int) pdmR3DevHlp_IoPortCreateEx(PPDMDEVINS pDevIns, RTIOPORT cPorts, uint32_t fFlags, PPDMPCIDEV pPciDev, 72 uint32_t iPciRegion, PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 73 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, RTR3PTR pvUser, 74 const char *pszDesc, PCIOMIOPORTDESC paExtDescs, PIOMIOPORTHANDLE phIoPorts) 75 { 76 PDMDEV_ASSERT_DEVINS(pDevIns); 77 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", 78 pDevIns->pReg->szName, pDevIns->iInstance, cPorts, fFlags, pPciDev, iPciRegion, pfnOut, pfnIn, pfnOutStr, pfnInStr, 79 pvUser, pszDesc, pszDesc, paExtDescs, phIoPorts)); 80 81 int rc = VERR_NOT_IMPLEMENTED; 82 AssertFailed(); 83 84 LogFlow(("pdmR3DevHlp_IoPortCreateEx: caller='%s'/%d: returns %Rrc (*phIoPorts=%#x)\n", 85 pDevIns->pReg->szName, pDevIns->iInstance, rc, *phIoPorts)); 86 return rc; 87 } 88 89 90 /** @interface_method_impl{PDMDEVHLPR3,pfnIoPortMap} */ 91 static DECLCALLBACK(int) pdmR3DevHlp_IoPortMap(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, RTIOPORT Port) 92 { 93 PDMDEV_ASSERT_DEVINS(pDevIns); 94 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: hIoPorts=%#x Port=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hIoPorts, Port)); 95 96 int rc = VERR_NOT_IMPLEMENTED; 97 AssertFailed(); 98 99 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 100 return rc; 101 } 102 103 104 /** @interface_method_impl{PDMDEVHLPR3,pfnIoPortUnmap} */ 105 static DECLCALLBACK(int) pdmR3DevHlp_IoPortUnmap(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts) 106 { 107 PDMDEV_ASSERT_DEVINS(pDevIns); 108 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: hIoPorts=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hIoPorts)); 109 110 int rc = VERR_NOT_IMPLEMENTED; 111 AssertFailed(); 112 113 LogFlow(("pdmR3DevHlp_IoPortMap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 114 return rc; 115 } 116 117 118 /** @interface_method_impl{PDMDEVHLPR3,pfnIoPortGetMappingAddress} */ 119 static DECLCALLBACK(uint32_t) pdmR3DevHlp_IoPortGetMappingAddress(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts) 120 { 121 PDMDEV_ASSERT_DEVINS(pDevIns); 122 LogFlow(("pdmR3DevHlp_IoPortGetMappingAddress: caller='%s'/%d: hIoPorts=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hIoPorts)); 123 124 uint32_t uAddress = 0; 125 AssertFailed(); 126 127 LogFlow(("pdmR3DevHlp_IoPortGetMappingAddress: caller='%s'/%d: returns %#RX32\n", pDevIns->pReg->szName, pDevIns->iInstance, uAddress)); 128 return uAddress; 129 } 130 131 132 /** @interface_method_impl{PDMDEVHLPR3,pfnMmioCreateEx} */ 133 static DECLCALLBACK(int) pdmR3DevHlp_MmioCreateEx(PPDMDEVINS pDevIns, RTGCPHYS cbRegion, 134 uint32_t fFlags, PPDMPCIDEV pPciDev, uint32_t iPciRegion, 135 PFNIOMMMIONEWWRITE pfnWrite, PFNIOMMMIONEWREAD pfnRead, PFNIOMMMIONEWFILL pfnFill, 136 void *pvUser, const char *pszDesc, PIOMMMIOHANDLE phRegion) 137 { 138 PDMDEV_ASSERT_DEVINS(pDevIns); 139 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", 140 pDevIns->pReg->szName, pDevIns->iInstance, cbRegion, fFlags, pPciDev, iPciRegion, pfnWrite, pfnRead, pfnFill, pvUser, pszDesc, pszDesc, phRegion)); 141 142 int rc = VERR_NOT_IMPLEMENTED; 143 AssertFailed(); 144 145 LogFlow(("pdmR3DevHlp_MmioCreateEx: caller='%s'/%d: returns %Rrc (*phRegion=%#x)\n", 146 pDevIns->pReg->szName, pDevIns->iInstance, rc, *phRegion)); 147 return rc; 148 } 149 150 151 /** @interface_method_impl{PDMDEVHLPR3,pfnMmioMap} */ 152 static DECLCALLBACK(int) pdmR3DevHlp_MmioMap(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS GCPhys) 153 { 154 PDMDEV_ASSERT_DEVINS(pDevIns); 155 LogFlow(("pdmR3DevHlp_MmioMap: caller='%s'/%d: hRegion=%#x GCPhys=%#RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, GCPhys)); 156 157 int rc = VERR_NOT_IMPLEMENTED; 158 AssertFailed(); 159 160 LogFlow(("pdmR3DevHlp_MmioMap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 161 return rc; 162 } 163 164 165 /** @interface_method_impl{PDMDEVHLPR3,pfnMmioUnmap} */ 166 static DECLCALLBACK(int) pdmR3DevHlp_MmioUnmap(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion) 167 { 168 PDMDEV_ASSERT_DEVINS(pDevIns); 169 LogFlow(("pdmR3DevHlp_MmioUnmap: caller='%s'/%d: hRegion=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion)); 170 171 int rc = VERR_NOT_IMPLEMENTED; 172 AssertFailed(); 173 174 LogFlow(("pdmR3DevHlp_MmioUnmap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 175 return rc; 176 } 177 178 179 /** @interface_method_impl{PDMDEVHLPR3,pfnMmioReduce} */ 180 static DECLCALLBACK(int) pdmR3DevHlp_MmioReduce(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS cbRegion) 181 { 182 PDMDEV_ASSERT_DEVINS(pDevIns); 183 LogFlow(("pdmR3DevHlp_MmioReduce: caller='%s'/%d: hRegion=%#x cbRegion=%#RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, cbRegion)); 184 185 int rc = VERR_NOT_IMPLEMENTED; 186 AssertFailed(); 187 188 LogFlow(("pdmR3DevHlp_MmioReduce: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 189 return rc; 190 } 191 192 193 /** @interface_method_impl{PDMDEVHLPR3,pfnMmioGetMappingAddress} */ 194 static DECLCALLBACK(RTGCPHYS) pdmR3DevHlp_MmioGetMappingAddress(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion) 195 { 196 PDMDEV_ASSERT_DEVINS(pDevIns); 197 LogFlow(("pdmR3DevHlp_MmioGetMappingAddress: caller='%s'/%d: hRegion=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion)); 198 199 RTGCPHYS GCPhys = NIL_RTGCPHYS; 200 AssertFailed(); 201 202 LogFlow(("pdmR3DevHlp_MmioGetMappingAddress: caller='%s'/%d: returns %RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys)); 203 return GCPhys; 204 } 205 206 207 /** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Create} */ 208 static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Create(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iPciRegion, RTGCPHYS cbRegion, 209 uint32_t fFlags, const char *pszDesc, void **ppvMapping, PPGMMMIO2HANDLE phRegion) 210 { 211 PDMDEV_ASSERT_DEVINS(pDevIns); 212 LogFlow(("pdmR3DevHlp_Mmio2Create: caller='%s'/%d: pPciDev=%p (%#x) iPciRegion=%#x cbRegion=%#RGp fFlags=%RX32 pszDesc=%p:{%s} ppvMapping=%p phRegion=%p\n", 213 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iPciRegion, cbRegion, 214 fFlags, pszDesc, pszDesc, ppvMapping, phRegion)); 215 216 int rc = VERR_NOT_IMPLEMENTED; 217 AssertFailed(); 218 219 LogFlow(("pdmR3DevHlp_Mmio2Create: caller='%s'/%d: returns %Rrc *ppvMapping=%p phRegion=%#RX64\n", 220 pDevIns->pReg->szName, pDevIns->iInstance, rc, *ppvMapping, *phRegion)); 221 return rc; 222 } 223 224 225 /** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Destroy} */ 226 static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Destroy(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion) 227 { 228 PDMDEV_ASSERT_DEVINS(pDevIns); 229 LogFlow(("pdmR3DevHlp_Mmio2Destroy: caller='%s'/%d: hRegion=%#RX64\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion)); 230 231 int rc = VERR_NOT_IMPLEMENTED; 232 AssertFailed(); 233 234 LogFlow(("pdmR3DevHlp_Mmio2Destroy: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 235 return rc; 236 } 237 238 239 /** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Map} */ 240 static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Map(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion, RTGCPHYS GCPhys) 241 { 242 PDMDEV_ASSERT_DEVINS(pDevIns); 243 LogFlow(("pdmR3DevHlp_Mmio2Map: caller='%s'/%d: hRegion=%#RX64 GCPhys=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, GCPhys)); 244 245 int rc = VERR_NOT_IMPLEMENTED; 246 AssertFailed(); 247 248 LogFlow(("pdmR3DevHlp_Mmio2Map: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 249 return rc; 250 } 251 252 253 /** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Unmap} */ 254 static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Unmap(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion) 255 { 256 PDMDEV_ASSERT_DEVINS(pDevIns); 257 LogFlow(("pdmR3DevHlp_Mmio2Unmap: caller='%s'/%d: hRegion=%#RX64\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion)); 258 259 int rc = VERR_NOT_IMPLEMENTED; 260 AssertFailed(); 261 262 LogFlow(("pdmR3DevHlp_Mmio2Unmap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 263 return rc; 264 } 265 266 267 /** @interface_method_impl{PDMDEVHLPR3,pfnMmio2Reduce} */ 268 static DECLCALLBACK(int) pdmR3DevHlp_Mmio2Reduce(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion, RTGCPHYS cbRegion) 269 { 270 PDMDEV_ASSERT_DEVINS(pDevIns); 271 LogFlow(("pdmR3DevHlp_Mmio2Reduce: caller='%s'/%d: hRegion=%#RX64 cbRegion=%RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, cbRegion)); 272 273 int rc = VERR_NOT_IMPLEMENTED; 274 AssertFailed(); 275 276 LogFlow(("pdmR3DevHlp_Mmio2Reduce: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 277 return rc; 278 } 279 280 281 /** @interface_method_impl{PDMDEVHLPR3,pfnMmio2GetMappingAddress} */ 282 static DECLCALLBACK(RTGCPHYS) pdmR3DevHlp_Mmio2GetMappingAddress(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion) 283 { 284 PDMDEV_ASSERT_DEVINS(pDevIns); 285 LogFlow(("pdmR3DevHlp_Mmio2GetMappingAddress: caller='%s'/%d: hRegion=%#RX6r\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion)); 286 287 RTGCPHYS GCPhys = NIL_RTGCPHYS; 288 AssertFailed(); 289 290 LogFlow(("pdmR3DevHlp_Mmio2GetMappingAddress: caller='%s'/%d: returns %RGp\n", pDevIns->pReg->szName, pDevIns->iInstance, GCPhys)); 291 return GCPhys; 292 } 234 293 235 294 /** 236 * @copydoc PDMDEVHLPR3::pfnM MIO2Register295 * @copydoc PDMDEVHLPR3::pfnMmio2ChangeRegionNo 237 296 */ 238 static DECLCALLBACK(int) pdmR3DevHlp_MMIO2Register(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS cb, 239 uint32_t fFlags, void **ppv, const char *pszDesc) 240 { 241 PDMDEV_ASSERT_DEVINS(pDevIns); 242 LogFlow(("pdmR3DevHlp_MMIO2Register: caller='%s'/%d: pPciDev=%p (%#x) iRegion=%#x cb=%#RGp fFlags=%RX32 ppv=%p pszDescp=%p:{%s}\n", 243 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iRegion, 244 cb, fFlags, ppv, pszDesc, pszDesc)); 245 //AssertReturn(!pPciDev || pPciDev->Int.s.pDevInsR3 == pDevIns, VERR_INVALID_PARAMETER); 246 247 int rc = VERR_NOT_IMPLEMENTED; 248 AssertFailed(); 249 250 LogFlow(("pdmR3DevHlp_MMIO2Register: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 251 return rc; 252 } 253 254 255 /** 256 * @interface_method_impl{PDMDEVHLPR3,pfnMMIOExPreRegister} 257 */ 258 static DECLCALLBACK(int) 259 pdmR3DevHlp_MMIOExPreRegister(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS cbRegion, uint32_t fFlags, 260 const char *pszDesc, 261 RTHCPTR pvUser, PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill, 262 RTR0PTR pvUserR0, const char *pszWriteR0, const char *pszReadR0, const char *pszFillR0, 263 RTRCPTR pvUserRC, const char *pszWriteRC, const char *pszReadRC, const char *pszFillRC) 264 { 265 PDMDEV_ASSERT_DEVINS(pDevIns); 266 LogFlow(("pdmR3DevHlp_MMIOExPreRegister: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%#x cbRegion=%#RGp fFlags=%RX32 pszDesc=%p:{%s}\n" 267 " pvUser=%p pfnWrite=%p pfnRead=%p pfnFill=%p\n" 268 " pvUserR0=%p pszWriteR0=%s pszReadR0=%s pszFillR0=%s\n" 269 " pvUserRC=%p pszWriteRC=%s pszReadRC=%s pszFillRC=%s\n", 270 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iRegion, cbRegion, 271 fFlags, pszDesc, pszDesc, 272 pvUser, pfnWrite, pfnRead, pfnFill, 273 pvUserR0, pszWriteR0, pszReadR0, pszFillR0, 274 pvUserRC, pszWriteRC, pszReadRC, pszFillRC)); 275 //AssertReturn(!pPciDev || pPciDev->Int.s.pDevInsR3 == pDevIns, VERR_INVALID_PARAMETER); 276 277 /* 278 * Resolve the functions. 279 */ 280 AssertLogRelReturn( (!pszWriteR0 && !pszReadR0 && !pszFillR0) 281 || (pDevIns->pReg->szR0Mod[0] && (pDevIns->pReg->fFlags & PDM_DEVREG_FLAGS_R0)), 282 VERR_INVALID_PARAMETER); 283 AssertLogRelReturn( (!pszWriteRC && !pszReadRC && !pszFillRC) 284 || (pDevIns->pReg->szRCMod[0] && (pDevIns->pReg->fFlags & PDM_DEVREG_FLAGS_RC)), 285 VERR_INVALID_PARAMETER); 286 287 int rc = VERR_NOT_IMPLEMENTED; 288 AssertFailed(); 289 290 LogFlow(("pdmR3DevHlp_MMIOExPreRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 291 return rc; 292 } 293 294 295 /** 296 * @copydoc PDMDEVHLPR3::pfnMMIOExDeregister 297 */ 298 static DECLCALLBACK(int) pdmR3DevHlp_MMIOExDeregister(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion) 299 { 300 PDMDEV_ASSERT_DEVINS(pDevIns); 301 LogFlow(("pdmR3DevHlp_MMIOExDeregister: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%#x\n", 302 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iRegion)); 303 304 AssertReturn(iRegion <= UINT8_MAX || iRegion == UINT32_MAX, VERR_INVALID_PARAMETER); 305 //AssertReturn(!pPciDev || pPciDev->Int.s.pDevInsR3 == pDevIns, VERR_INVALID_PARAMETER); 306 307 int rc = VERR_NOT_IMPLEMENTED; 308 AssertFailed(); 309 310 LogFlow(("pdmR3DevHlp_MMIOExDeregister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 311 return rc; 312 } 313 314 315 /** 316 * @copydoc PDMDEVHLPR3::pfnMMIOExMap 317 */ 318 static DECLCALLBACK(int) pdmR3DevHlp_MMIOExMap(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS GCPhys) 319 { 320 PDMDEV_ASSERT_DEVINS(pDevIns); 321 LogFlow(("pdmR3DevHlp_MMIOExMap: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%#x GCPhys=%#RGp\n", 322 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iRegion, GCPhys)); 323 //AssertReturn(!pPciDev || pPciDev->Int.s.pDevInsR3 != NULL, VERR_INVALID_PARAMETER); 324 325 int rc = VERR_NOT_IMPLEMENTED; 326 AssertFailed(); 327 328 LogFlow(("pdmR3DevHlp_MMIOExMap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 329 return rc; 330 } 331 332 333 /** 334 * @copydoc PDMDEVHLPR3::pfnMMIOExUnmap 335 */ 336 static DECLCALLBACK(int) pdmR3DevHlp_MMIOExUnmap(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS GCPhys) 337 { 338 PDMDEV_ASSERT_DEVINS(pDevIns); 339 LogFlow(("pdmR3DevHlp_MMIOExUnmap: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%#x GCPhys=%#RGp\n", 340 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iRegion, GCPhys)); 341 //AssertReturn(!pPciDev || pPciDev->Int.s.pDevInsR3 != NULL, VERR_INVALID_PARAMETER); 342 343 int rc = VERR_NOT_IMPLEMENTED; 344 AssertFailed(); 345 346 LogFlow(("pdmR3DevHlp_MMIOExUnmap: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 347 return rc; 348 } 349 350 351 /** 352 * @copydoc PDMDEVHLPR3::pfnMMIOExReduce 353 */ 354 static DECLCALLBACK(int) pdmR3DevHlp_MMIOExReduce(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS cbRegion) 355 { 356 PDMDEV_ASSERT_DEVINS(pDevIns); 357 LogFlow(("pdmR3DevHlp_MMIOExReduce: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%#x cbRegion=%RGp\n", 358 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iRegion, cbRegion)); 359 //AssertReturn(!pPciDev || pPciDev->Int.s.pDevInsR3 != NULL, VERR_INVALID_PARAMETER); 360 361 int rc = VERR_NOT_IMPLEMENTED; 362 AssertFailed(); 363 364 LogFlow(("pdmR3DevHlp_MMIOExReduce: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 365 return rc; 366 } 367 368 369 /** 370 * @copydoc PDMDEVHLPR3::pfnMMHyperMapMMIO2 371 */ 372 static DECLCALLBACK(int) pdmR3DevHlp_MMHyperMapMMIO2(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS off, 373 RTGCPHYS cb, const char *pszDesc, PRTRCPTR pRCPtr) 374 { 375 PDMDEV_ASSERT_DEVINS(pDevIns); 376 LogFlow(("pdmR3DevHlp_MMHyperMapMMIO2: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%#x off=%RGp cb=%RGp pszDesc=%p:{%s} pRCPtr=%p\n", 377 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iRegion, off, cb, pszDesc, pszDesc, pRCPtr)); 378 //AssertReturn(!pPciDev || pPciDev->Int.s.pDevInsR3 == pDevIns, VERR_INVALID_PARAMETER); 379 380 int rc = VERR_NOT_IMPLEMENTED; 381 AssertFailed(); 382 383 LogFlow(("pdmR3DevHlp_MMHyperMapMMIO2: caller='%s'/%d: returns %Rrc *pRCPtr=%RRv\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *pRCPtr)); 384 return rc; 385 } 386 387 388 /** 389 * @copydoc PDMDEVHLPR3::pfnMMIO2MapKernel 390 */ 391 static DECLCALLBACK(int) pdmR3DevHlp_MMIO2MapKernel(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, RTGCPHYS off, 392 RTGCPHYS cb,const char *pszDesc, PRTR0PTR pR0Ptr) 393 { 394 PDMDEV_ASSERT_DEVINS(pDevIns); 395 LogFlow(("pdmR3DevHlp_MMIO2MapKernel: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%#x off=%RGp cb=%RGp pszDesc=%p:{%s} pR0Ptr=%p\n", 396 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev ? pPciDev->uDevFn : UINT32_MAX, iRegion, off, cb, pszDesc, pszDesc, pR0Ptr)); 397 //AssertReturn(!pPciDev || pPciDev->Int.s.pDevInsR3 == pDevIns, VERR_INVALID_PARAMETER); 398 399 int rc = VERR_NOT_IMPLEMENTED; 400 AssertFailed(); 401 402 LogFlow(("pdmR3DevHlp_MMIO2MapKernel: caller='%s'/%d: returns %Rrc *pR0Ptr=%RHv\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *pR0Ptr)); 297 static DECLCALLBACK(int) pdmR3DevHlp_Mmio2ChangeRegionNo(PPDMDEVINS pDevIns, PGMMMIO2HANDLE hRegion, uint32_t iNewRegion) 298 { 299 PDMDEV_ASSERT_DEVINS(pDevIns); 300 LogFlow(("pdmR3DevHlp_Mmio2ChangeRegionNo: caller='%s'/%d: hRegion=%#RX6r iNewRegion=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, hRegion, iNewRegion)); 301 302 int rc = VERR_NOT_IMPLEMENTED; 303 AssertFailed(); 304 305 LogFlow(("pdmR3DevHlp_Mmio2ChangeRegionNo: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 403 306 return rc; 404 307 } … … 436 339 437 340 438 /** @interface_method_impl{PDMDEVHLPR3,pfnSSMRegister} */439 341 static DECLCALLBACK(int) pdmR3DevHlp_SSMRegister(PPDMDEVINS pDevIns, uint32_t uVersion, size_t cbGuess, const char *pszBefore, 440 342 PFNSSMDEVLIVEPREP pfnLivePrep, PFNSSMDEVLIVEEXEC pfnLiveExec, PFNSSMDEVLIVEVOTE pfnLiveVote, … … 450 352 pfnLoadPrep, pfnLoadExec, pfnLoadDone)); 451 353 452 /** @todo */ 453 int rc = VINF_SUCCESS; 454 //AssertFailed(); 354 RT_NOREF(uVersion, cbGuess, pszBefore, pfnLivePrep, pfnLiveExec, pfnLiveVote, pfnSavePrep, pfnSaveExec, pfnSaveDone, 355 pfnLoadPrep, pfnLoadExec, pfnLoadDone); 356 int rc = VERR_NOT_IMPLEMENTED; 357 AssertFailed(); 455 358 456 359 LogFlow(("pdmR3DevHlp_SSMRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 459 362 460 363 364 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutStruct(PSSMHANDLE pSSM, const void *pvStruct, PCSSMFIELD paFields) 365 { 366 RT_NOREF(pSSM, pvStruct, paFields); 367 AssertFailed(); 368 return VERR_NOT_IMPLEMENTED; 369 } 370 371 372 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutStructEx(PSSMHANDLE pSSM, const void *pvStruct, size_t cbStruct, uint32_t fFlags, PCSSMFIELD paFields, void *pvUser) 373 { 374 RT_NOREF(pSSM, pvStruct, cbStruct, fFlags, paFields, pvUser); 375 AssertFailed(); 376 return VERR_NOT_IMPLEMENTED; 377 } 378 379 380 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutBool(PSSMHANDLE pSSM, bool fBool) 381 { 382 RT_NOREF(pSSM, fBool); 383 AssertFailed(); 384 return VERR_NOT_IMPLEMENTED; 385 } 386 387 388 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU8(PSSMHANDLE pSSM, uint8_t u8) 389 { 390 RT_NOREF(pSSM, u8); 391 AssertFailed(); 392 return VERR_NOT_IMPLEMENTED; 393 } 394 395 396 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS8(PSSMHANDLE pSSM, int8_t i8) 397 { 398 RT_NOREF(pSSM, i8); 399 AssertFailed(); 400 return VERR_NOT_IMPLEMENTED; 401 } 402 403 404 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU16(PSSMHANDLE pSSM, uint16_t u16) 405 { 406 RT_NOREF(pSSM, u16); 407 AssertFailed(); 408 return VERR_NOT_IMPLEMENTED; 409 } 410 411 412 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS16(PSSMHANDLE pSSM, int16_t i16) 413 { 414 RT_NOREF(pSSM, i16); 415 AssertFailed(); 416 return VERR_NOT_IMPLEMENTED; 417 } 418 419 420 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU32(PSSMHANDLE pSSM, uint32_t u32) 421 { 422 RT_NOREF(pSSM, u32); 423 AssertFailed(); 424 return VERR_NOT_IMPLEMENTED; 425 } 426 427 428 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS32(PSSMHANDLE pSSM, int32_t i32) 429 { 430 RT_NOREF(pSSM, i32); 431 AssertFailed(); 432 return VERR_NOT_IMPLEMENTED; 433 } 434 435 436 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU64(PSSMHANDLE pSSM, uint64_t u64) 437 { 438 RT_NOREF(pSSM, u64); 439 AssertFailed(); 440 return VERR_NOT_IMPLEMENTED; 441 } 442 443 444 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS64(PSSMHANDLE pSSM, int64_t i64) 445 { 446 RT_NOREF(pSSM, i64); 447 AssertFailed(); 448 return VERR_NOT_IMPLEMENTED; 449 } 450 451 452 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutU128(PSSMHANDLE pSSM, uint128_t u128) 453 { 454 RT_NOREF(pSSM, u128); 455 AssertFailed(); 456 return VERR_NOT_IMPLEMENTED; 457 } 458 459 460 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutS128(PSSMHANDLE pSSM, int128_t i128) 461 { 462 RT_NOREF(pSSM, i128); 463 AssertFailed(); 464 return VERR_NOT_IMPLEMENTED; 465 } 466 467 468 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutUInt(PSSMHANDLE pSSM, RTUINT u) 469 { 470 RT_NOREF(pSSM, u); 471 AssertFailed(); 472 return VERR_NOT_IMPLEMENTED; 473 } 474 475 476 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutSInt(PSSMHANDLE pSSM, RTINT i) 477 { 478 RT_NOREF(pSSM, i); 479 AssertFailed(); 480 return VERR_NOT_IMPLEMENTED; 481 } 482 483 484 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCUInt(PSSMHANDLE pSSM, RTGCUINT u) 485 { 486 RT_NOREF(pSSM, u); 487 AssertFailed(); 488 return VERR_NOT_IMPLEMENTED; 489 } 490 491 492 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCUIntReg(PSSMHANDLE pSSM, RTGCUINTREG u) 493 { 494 RT_NOREF(pSSM, u); 495 AssertFailed(); 496 return VERR_NOT_IMPLEMENTED; 497 } 498 499 500 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCPhys32(PSSMHANDLE pSSM, RTGCPHYS32 GCPhys) 501 { 502 RT_NOREF(pSSM, GCPhys); 503 AssertFailed(); 504 return VERR_NOT_IMPLEMENTED; 505 } 506 507 508 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCPhys64(PSSMHANDLE pSSM, RTGCPHYS64 GCPhys) 509 { 510 RT_NOREF(pSSM, GCPhys); 511 AssertFailed(); 512 return VERR_NOT_IMPLEMENTED; 513 } 514 515 516 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCPhys(PSSMHANDLE pSSM, RTGCPHYS GCPhys) 517 { 518 RT_NOREF(pSSM, GCPhys); 519 AssertFailed(); 520 return VERR_NOT_IMPLEMENTED; 521 } 522 523 524 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCPtr(PSSMHANDLE pSSM, RTGCPTR GCPtr) 525 { 526 RT_NOREF(pSSM, GCPtr); 527 AssertFailed(); 528 return VERR_NOT_IMPLEMENTED; 529 } 530 531 532 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutGCUIntPtr(PSSMHANDLE pSSM, RTGCUINTPTR GCPtr) 533 { 534 RT_NOREF(pSSM, GCPtr); 535 AssertFailed(); 536 return VERR_NOT_IMPLEMENTED; 537 } 538 539 540 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutRCPtr(PSSMHANDLE pSSM, RTRCPTR RCPtr) 541 { 542 RT_NOREF(pSSM, RCPtr); 543 AssertFailed(); 544 return VERR_NOT_IMPLEMENTED; 545 } 546 547 548 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutIOPort(PSSMHANDLE pSSM, RTIOPORT IOPort) 549 { 550 RT_NOREF(pSSM, IOPort); 551 AssertFailed(); 552 return VERR_NOT_IMPLEMENTED; 553 } 554 555 556 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutSel(PSSMHANDLE pSSM, RTSEL Sel) 557 { 558 RT_NOREF(pSSM, Sel); 559 AssertFailed(); 560 return VERR_NOT_IMPLEMENTED; 561 } 562 563 564 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutMem(PSSMHANDLE pSSM, const void *pv, size_t cb) 565 { 566 RT_NOREF(pSSM, pv, cb); 567 AssertFailed(); 568 return VERR_NOT_IMPLEMENTED; 569 } 570 571 572 static DECLCALLBACK(int) pdmR3DevHlp_SSMPutStrZ(PSSMHANDLE pSSM, const char *psz) 573 { 574 RT_NOREF(pSSM, psz); 575 AssertFailed(); 576 return VERR_NOT_IMPLEMENTED; 577 } 578 579 580 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetStruct(PSSMHANDLE pSSM, void *pvStruct, PCSSMFIELD paFields) 581 { 582 RT_NOREF(pSSM, pvStruct, paFields); 583 AssertFailed(); 584 return VERR_NOT_IMPLEMENTED; 585 } 586 587 588 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetStructEx(PSSMHANDLE pSSM, void *pvStruct, size_t cbStruct, uint32_t fFlags, PCSSMFIELD paFields, void *pvUser) 589 { 590 RT_NOREF(pSSM, pvStruct, cbStruct, fFlags, paFields, pvUser); 591 AssertFailed(); 592 return VERR_NOT_IMPLEMENTED; 593 } 594 595 596 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetBool(PSSMHANDLE pSSM, bool *pfBool) 597 { 598 RT_NOREF(pSSM, pfBool); 599 AssertFailed(); 600 return VERR_NOT_IMPLEMENTED; 601 } 602 603 604 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetBoolV(PSSMHANDLE pSSM, bool volatile *pfBool) 605 { 606 RT_NOREF(pSSM, pfBool); 607 AssertFailed(); 608 return VERR_NOT_IMPLEMENTED; 609 } 610 611 612 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU8(PSSMHANDLE pSSM, uint8_t *pu8) 613 { 614 RT_NOREF(pSSM, pu8); 615 AssertFailed(); 616 return VERR_NOT_IMPLEMENTED; 617 } 618 619 620 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU8V(PSSMHANDLE pSSM, uint8_t volatile *pu8) 621 { 622 RT_NOREF(pSSM, pu8); 623 AssertFailed(); 624 return VERR_NOT_IMPLEMENTED; 625 } 626 627 628 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS8(PSSMHANDLE pSSM, int8_t *pi8) 629 { 630 RT_NOREF(pSSM, pi8); 631 AssertFailed(); 632 return VERR_NOT_IMPLEMENTED; 633 } 634 635 636 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS8V(PSSMHANDLE pSSM, int8_t volatile *pi8) 637 { 638 RT_NOREF(pSSM, pi8); 639 AssertFailed(); 640 return VERR_NOT_IMPLEMENTED; 641 } 642 643 644 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU16(PSSMHANDLE pSSM, uint16_t *pu16) 645 { 646 RT_NOREF(pSSM, pu16); 647 AssertFailed(); 648 return VERR_NOT_IMPLEMENTED; 649 } 650 651 652 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU16V(PSSMHANDLE pSSM, uint16_t volatile *pu16) 653 { 654 RT_NOREF(pSSM, pu16); 655 AssertFailed(); 656 return VERR_NOT_IMPLEMENTED; 657 } 658 659 660 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS16(PSSMHANDLE pSSM, int16_t *pi16) 661 { 662 RT_NOREF(pSSM, pi16); 663 AssertFailed(); 664 return VERR_NOT_IMPLEMENTED; 665 } 666 667 668 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS16V(PSSMHANDLE pSSM, int16_t volatile *pi16) 669 { 670 RT_NOREF(pSSM, pi16); 671 AssertFailed(); 672 return VERR_NOT_IMPLEMENTED; 673 } 674 675 676 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU32(PSSMHANDLE pSSM, uint32_t *pu32) 677 { 678 RT_NOREF(pSSM, pu32); 679 AssertFailed(); 680 return VERR_NOT_IMPLEMENTED; 681 } 682 683 684 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU32V(PSSMHANDLE pSSM, uint32_t volatile *pu32) 685 { 686 RT_NOREF(pSSM, pu32); 687 AssertFailed(); 688 return VERR_NOT_IMPLEMENTED; 689 } 690 691 692 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS32(PSSMHANDLE pSSM, int32_t *pi32) 693 { 694 RT_NOREF(pSSM, pi32); 695 AssertFailed(); 696 return VERR_NOT_IMPLEMENTED; 697 } 698 699 700 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS32V(PSSMHANDLE pSSM, int32_t volatile *pi32) 701 { 702 RT_NOREF(pSSM, pi32); 703 AssertFailed(); 704 return VERR_NOT_IMPLEMENTED; 705 } 706 707 708 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU64(PSSMHANDLE pSSM, uint64_t *pu64) 709 { 710 RT_NOREF(pSSM, pu64); 711 AssertFailed(); 712 return VERR_NOT_IMPLEMENTED; 713 } 714 715 716 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU64V(PSSMHANDLE pSSM, uint64_t volatile *pu64) 717 { 718 RT_NOREF(pSSM, pu64); 719 AssertFailed(); 720 return VERR_NOT_IMPLEMENTED; 721 } 722 723 724 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS64(PSSMHANDLE pSSM, int64_t *pi64) 725 { 726 RT_NOREF(pSSM, pi64); 727 AssertFailed(); 728 return VERR_NOT_IMPLEMENTED; 729 } 730 731 732 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS64V(PSSMHANDLE pSSM, int64_t volatile *pi64) 733 { 734 RT_NOREF(pSSM, pi64); 735 AssertFailed(); 736 return VERR_NOT_IMPLEMENTED; 737 } 738 739 740 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU128(PSSMHANDLE pSSM, uint128_t *pu128) 741 { 742 RT_NOREF(pSSM, pu128); 743 AssertFailed(); 744 return VERR_NOT_IMPLEMENTED; 745 } 746 747 748 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetU128V(PSSMHANDLE pSSM, uint128_t volatile *pu128) 749 { 750 RT_NOREF(pSSM, pu128); 751 AssertFailed(); 752 return VERR_NOT_IMPLEMENTED; 753 } 754 755 756 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS128(PSSMHANDLE pSSM, int128_t *pi128) 757 { 758 RT_NOREF(pSSM, pi128); 759 AssertFailed(); 760 return VERR_NOT_IMPLEMENTED; 761 } 762 763 764 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetS128V(PSSMHANDLE pSSM, int128_t volatile *pi128) 765 { 766 RT_NOREF(pSSM, pi128); 767 AssertFailed(); 768 return VERR_NOT_IMPLEMENTED; 769 } 770 771 772 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys32(PSSMHANDLE pSSM, PRTGCPHYS32 pGCPhys) 773 { 774 RT_NOREF(pSSM, pGCPhys); 775 AssertFailed(); 776 return VERR_NOT_IMPLEMENTED; 777 } 778 779 780 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys32V(PSSMHANDLE pSSM, RTGCPHYS32 volatile *pGCPhys) 781 { 782 RT_NOREF(pSSM, pGCPhys); 783 AssertFailed(); 784 return VERR_NOT_IMPLEMENTED; 785 } 786 787 788 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys64(PSSMHANDLE pSSM, PRTGCPHYS64 pGCPhys) 789 { 790 RT_NOREF(pSSM, pGCPhys); 791 AssertFailed(); 792 return VERR_NOT_IMPLEMENTED; 793 } 794 795 796 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys64V(PSSMHANDLE pSSM, RTGCPHYS64 volatile *pGCPhys) 797 { 798 RT_NOREF(pSSM, pGCPhys); 799 AssertFailed(); 800 return VERR_NOT_IMPLEMENTED; 801 } 802 803 804 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhys(PSSMHANDLE pSSM, PRTGCPHYS pGCPhys) 805 { 806 RT_NOREF(pSSM, pGCPhys); 807 AssertFailed(); 808 return VERR_NOT_IMPLEMENTED; 809 } 810 811 812 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPhysV(PSSMHANDLE pSSM, RTGCPHYS volatile *pGCPhys) 813 { 814 RT_NOREF(pSSM, pGCPhys); 815 AssertFailed(); 816 return VERR_NOT_IMPLEMENTED; 817 } 818 819 820 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetUInt(PSSMHANDLE pSSM, PRTUINT pu) 821 { 822 RT_NOREF(pSSM, pu); 823 AssertFailed(); 824 return VERR_NOT_IMPLEMENTED; 825 } 826 827 828 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetSInt(PSSMHANDLE pSSM, PRTINT pi) 829 { 830 RT_NOREF(pSSM, pi); 831 AssertFailed(); 832 return VERR_NOT_IMPLEMENTED; 833 } 834 835 836 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCUInt(PSSMHANDLE pSSM, PRTGCUINT pu) 837 { 838 RT_NOREF(pSSM, pu); 839 AssertFailed(); 840 return VERR_NOT_IMPLEMENTED; 841 } 842 843 844 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCUIntReg(PSSMHANDLE pSSM, PRTGCUINTREG pu) 845 { 846 RT_NOREF(pSSM, pu); 847 AssertFailed(); 848 return VERR_NOT_IMPLEMENTED; 849 } 850 851 852 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCPtr(PSSMHANDLE pSSM, PRTGCPTR pGCPtr) 853 { 854 RT_NOREF(pSSM, pGCPtr); 855 AssertFailed(); 856 return VERR_NOT_IMPLEMENTED; 857 } 858 859 860 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetGCUIntPtr(PSSMHANDLE pSSM, PRTGCUINTPTR pGCPtr) 861 { 862 RT_NOREF(pSSM, pGCPtr); 863 AssertFailed(); 864 return VERR_NOT_IMPLEMENTED; 865 } 866 867 868 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetRCPtr(PSSMHANDLE pSSM, PRTRCPTR pRCPtr) 869 { 870 RT_NOREF(pSSM, pRCPtr); 871 AssertFailed(); 872 return VERR_NOT_IMPLEMENTED; 873 } 874 875 876 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetIOPort(PSSMHANDLE pSSM, PRTIOPORT pIOPort) 877 { 878 RT_NOREF(pSSM, pIOPort); 879 AssertFailed(); 880 return VERR_NOT_IMPLEMENTED; 881 } 882 883 884 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetSel(PSSMHANDLE pSSM, PRTSEL pSel) 885 { 886 RT_NOREF(pSSM, pSel); 887 AssertFailed(); 888 return VERR_NOT_IMPLEMENTED; 889 } 890 891 892 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetMem(PSSMHANDLE pSSM, void *pv, size_t cb) 893 { 894 RT_NOREF(pSSM, pv, cb); 895 AssertFailed(); 896 return VERR_NOT_IMPLEMENTED; 897 } 898 899 900 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetStrZ(PSSMHANDLE pSSM, char *psz, size_t cbMax) 901 { 902 RT_NOREF(pSSM, psz, cbMax); 903 AssertFailed(); 904 return VERR_NOT_IMPLEMENTED; 905 } 906 907 908 static DECLCALLBACK(int) pdmR3DevHlp_SSMGetStrZEx(PSSMHANDLE pSSM, char *psz, size_t cbMax, size_t *pcbStr) 909 { 910 RT_NOREF(pSSM, psz,cbMax, pcbStr); 911 AssertFailed(); 912 return VERR_NOT_IMPLEMENTED; 913 } 914 915 916 static DECLCALLBACK(int) pdmR3DevHlp_SSMSkip(PSSMHANDLE pSSM, size_t cb) 917 { 918 RT_NOREF(pSSM, cb); 919 AssertFailed(); 920 return VERR_NOT_IMPLEMENTED; 921 } 922 923 924 static DECLCALLBACK(int) pdmR3DevHlp_SSMSkipToEndOfUnit(PSSMHANDLE pSSM) 925 { 926 RT_NOREF(pSSM); 927 AssertFailed(); 928 return VERR_NOT_IMPLEMENTED; 929 } 930 931 932 static DECLCALLBACK(int) pdmR3DevHlp_SSMSetLoadError(PSSMHANDLE pSSM, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7) 933 { 934 RT_NOREF(pSSM, rc, RT_SRC_POS_ARGS, pszFormat); 935 AssertFailed(); 936 return VERR_NOT_IMPLEMENTED; 937 } 938 939 940 static DECLCALLBACK(int) pdmR3DevHlp_SSMSetLoadErrorV(PSSMHANDLE pSSM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(6, 0) 941 { 942 RT_NOREF(pSSM, rc, RT_SRC_POS_ARGS, pszFormat, va); 943 AssertFailed(); 944 return VERR_NOT_IMPLEMENTED; 945 } 946 947 948 static DECLCALLBACK(int) pdmR3DevHlp_SSMSetCfgError(PSSMHANDLE pSSM, RT_SRC_POS_DECL, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(5, 6) 949 { 950 RT_NOREF(pSSM, RT_SRC_POS_ARGS, pszFormat); 951 AssertFailed(); 952 return VERR_NOT_IMPLEMENTED; 953 } 954 955 956 static DECLCALLBACK(int) pdmR3DevHlp_SSMSetCfgErrorV(PSSMHANDLE pSSM, RT_SRC_POS_DECL, const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(5, 0) 957 { 958 RT_NOREF(pSSM, RT_SRC_POS_ARGS, pszFormat, va); 959 AssertFailed(); 960 return VERR_NOT_IMPLEMENTED; 961 } 962 963 964 static DECLCALLBACK(int) pdmR3DevHlp_SSMHandleGetStatus(PSSMHANDLE pSSM) 965 { 966 RT_NOREF(pSSM); 967 AssertFailed(); 968 return VERR_NOT_IMPLEMENTED; 969 } 970 971 972 static DECLCALLBACK(SSMAFTER) pdmR3DevHlp_SSMHandleGetAfter(PSSMHANDLE pSSM) 973 { 974 RT_NOREF(pSSM); 975 AssertFailed(); 976 return SSMAFTER_INVALID; 977 } 978 979 980 static DECLCALLBACK(bool) pdmR3DevHlp_SSMHandleIsLiveSave(PSSMHANDLE pSSM) 981 { 982 RT_NOREF(pSSM); 983 AssertFailed(); 984 return false; 985 } 986 987 988 static DECLCALLBACK(uint32_t) pdmR3DevHlp_SSMHandleMaxDowntime(PSSMHANDLE pSSM) 989 { 990 RT_NOREF(pSSM); 991 AssertFailed(); 992 return 0; 993 } 994 995 996 static DECLCALLBACK(uint32_t) pdmR3DevHlp_SSMHandleHostBits(PSSMHANDLE pSSM) 997 { 998 RT_NOREF(pSSM); 999 AssertFailed(); 1000 return 0; 1001 } 1002 1003 1004 static DECLCALLBACK(uint32_t) pdmR3DevHlp_SSMHandleRevision(PSSMHANDLE pSSM) 1005 { 1006 RT_NOREF(pSSM); 1007 AssertFailed(); 1008 return 0; 1009 } 1010 1011 1012 static DECLCALLBACK(uint32_t) pdmR3DevHlp_SSMHandleVersion(PSSMHANDLE pSSM) 1013 { 1014 RT_NOREF(pSSM); 1015 AssertFailed(); 1016 return 0; 1017 } 1018 1019 1020 static DECLCALLBACK(const char *) pdmR3DevHlp_SSMHandleHostOSAndArch(PSSMHANDLE pSSM) 1021 { 1022 RT_NOREF(pSSM); 1023 AssertFailed(); 1024 return NULL; 1025 } 1026 1027 461 1028 /** @interface_method_impl{PDMDEVHLPR3,pfnTMTimerCreate} */ 462 static DECLCALLBACK(int) pdmR3DevHlp_TMTimerCreate(PPDMDEVINS pDevIns, TMCLOCK enmClock, PFNTMTIMERDEV pfnCallback, void *pvUser, 463 uint32_t fFlags, const char *pszDesc, PPTMTIMERR3 ppTimer) 1029 static DECLCALLBACK(int) pdmR3DevHlp_TMTimerCreate(PPDMDEVINS pDevIns, TMCLOCK enmClock, PFNTMTIMERDEV pfnCallback, void *pvUser, uint32_t fFlags, const char *pszDesc, PPTMTIMERR3 ppTimer) 464 1030 { 465 1031 PDMDEV_ASSERT_DEVINS(pDevIns); … … 467 1033 pDevIns->pReg->szName, pDevIns->iInstance, enmClock, pfnCallback, pvUser, fFlags, pszDesc, pszDesc, ppTimer)); 468 1034 469 int rc = VINF_SUCCESS; 470 PTMTIMERR3 pTimer = (PTMTIMERR3)RTMemAllocZ(sizeof(TMTIMER)); 471 if (RT_LIKELY(pTimer)) 472 { 473 pTimer->pVmmCallbacks = pDevIns->Internal.s.pVmmCallbacks; 474 pTimer->enmClock = enmClock; 475 pTimer->pfnCallbackDev = pfnCallback; 476 pTimer->pvUser = pvUser; 477 pTimer->fFlags = fFlags; 478 RTListAppend(&pDevIns->Internal.s.pDut->LstTimers, &pTimer->NdDevTimers); 479 *ppTimer = pTimer; 480 } 481 else 482 rc = VERR_NO_MEMORY; 1035 int rc = VERR_NOT_IMPLEMENTED; 1036 AssertFailed(); 483 1037 484 1038 LogFlow(("pdmR3DevHlp_TMTimerCreate: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 1039 return rc; 1040 } 1041 1042 1043 1044 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerCreate} */ 1045 static DECLCALLBACK(int) pdmR3DevHlp_TimerCreate(PPDMDEVINS pDevIns, TMCLOCK enmClock, PFNTMTIMERDEV pfnCallback, 1046 void *pvUser, uint32_t fFlags, const char *pszDesc, PTMTIMERHANDLE phTimer) 1047 { 1048 PDMDEV_ASSERT_DEVINS(pDevIns); 1049 LogFlow(("pdmR3DevHlp_TimerCreate: caller='%s'/%d: enmClock=%d pfnCallback=%p pvUser=%p fFlags=%#x pszDesc=%p:{%s} phTimer=%p\n", 1050 pDevIns->pReg->szName, pDevIns->iInstance, enmClock, pfnCallback, pvUser, fFlags, pszDesc, pszDesc, phTimer)); 1051 1052 int rc = VERR_NOT_IMPLEMENTED; 1053 AssertFailed(); 1054 1055 LogFlow(("pdmR3DevHlp_TimerCreate: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 1056 return rc; 1057 } 1058 1059 1060 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerToPtr} */ 1061 static DECLCALLBACK(PTMTIMERR3) pdmR3DevHlp_TimerToPtr(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer) 1062 { 1063 PDMDEV_ASSERT_DEVINS(pDevIns); 1064 RT_NOREF(pDevIns); 1065 return (PTMTIMERR3)hTimer; 1066 } 1067 1068 1069 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerFromMicro} */ 1070 static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerFromMicro(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMicroSecs) 1071 { 1072 RT_NOREF(pDevIns, hTimer, cMicroSecs); 1073 AssertFailed(); 1074 return 0; 1075 } 1076 1077 1078 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerFromMilli} */ 1079 static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerFromMilli(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMilliSecs) 1080 { 1081 RT_NOREF(pDevIns, hTimer, cMilliSecs); 1082 AssertFailed(); 1083 return 0; 1084 } 1085 1086 1087 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerFromNano} */ 1088 static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerFromNano(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cNanoSecs) 1089 { 1090 RT_NOREF(pDevIns, hTimer, cNanoSecs); 1091 AssertFailed(); 1092 return 0; 1093 } 1094 1095 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerGet} */ 1096 static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerGet(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer) 1097 { 1098 RT_NOREF(pDevIns, hTimer); 1099 AssertFailed(); 1100 return 0; 1101 } 1102 1103 1104 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerGetFreq} */ 1105 static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerGetFreq(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer) 1106 { 1107 RT_NOREF(pDevIns, hTimer); 1108 AssertFailed(); 1109 return 0; 1110 } 1111 1112 1113 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerGetNano} */ 1114 static DECLCALLBACK(uint64_t) pdmR3DevHlp_TimerGetNano(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer) 1115 { 1116 RT_NOREF(pDevIns, hTimer); 1117 AssertFailed(); 1118 return 0; 1119 } 1120 1121 1122 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerIsActive} */ 1123 static DECLCALLBACK(bool) pdmR3DevHlp_TimerIsActive(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer) 1124 { 1125 RT_NOREF(pDevIns, hTimer); 1126 AssertFailed(); 1127 return false; 1128 } 1129 1130 1131 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerIsLockOwner} */ 1132 static DECLCALLBACK(bool) pdmR3DevHlp_TimerIsLockOwner(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer) 1133 { 1134 RT_NOREF(pDevIns, hTimer); 1135 AssertFailed(); 1136 return false; 1137 } 1138 1139 1140 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerLockClock} */ 1141 static DECLCALLBACK(VBOXSTRICTRC) pdmR3DevHlp_TimerLockClock(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, int rcBusy) 1142 { 1143 RT_NOREF(pDevIns, hTimer, rcBusy); 1144 int rc = VERR_NOT_IMPLEMENTED; 1145 AssertFailed(); 1146 return rc; 1147 } 1148 1149 1150 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerLockClock2} */ 1151 static DECLCALLBACK(VBOXSTRICTRC) pdmR3DevHlp_TimerLockClock2(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, 1152 PPDMCRITSECT pCritSect, int rcBusy) 1153 { 1154 RT_NOREF(pDevIns, hTimer, pCritSect, rcBusy); 1155 int rc = VERR_NOT_IMPLEMENTED; 1156 AssertFailed(); 1157 return rc; 1158 } 1159 1160 1161 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerSet} */ 1162 static DECLCALLBACK(int) pdmR3DevHlp_TimerSet(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t uExpire) 1163 { 1164 RT_NOREF(pDevIns, hTimer, uExpire); 1165 int rc = VERR_NOT_IMPLEMENTED; 1166 AssertFailed(); 1167 return rc; 1168 } 1169 1170 1171 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetFrequencyHint} */ 1172 static DECLCALLBACK(int) pdmR3DevHlp_TimerSetFrequencyHint(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint32_t uHz) 1173 { 1174 RT_NOREF(pDevIns, hTimer, uHz); 1175 int rc = VERR_NOT_IMPLEMENTED; 1176 AssertFailed(); 1177 return rc; 1178 } 1179 1180 1181 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetMicro} */ 1182 static DECLCALLBACK(int) pdmR3DevHlp_TimerSetMicro(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMicrosToNext) 1183 { 1184 RT_NOREF(pDevIns, hTimer, cMicrosToNext); 1185 int rc = VERR_NOT_IMPLEMENTED; 1186 AssertFailed(); 1187 return rc; 1188 } 1189 1190 1191 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetMillies} */ 1192 static DECLCALLBACK(int) pdmR3DevHlp_TimerSetMillies(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cMilliesToNext) 1193 { 1194 RT_NOREF(pDevIns, hTimer, cMilliesToNext); 1195 int rc = VERR_NOT_IMPLEMENTED; 1196 AssertFailed(); 1197 return rc; 1198 } 1199 1200 1201 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetNano} */ 1202 static DECLCALLBACK(int) pdmR3DevHlp_TimerSetNano(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cNanosToNext) 1203 { 1204 RT_NOREF(pDevIns, hTimer, cNanosToNext); 1205 int rc = VERR_NOT_IMPLEMENTED; 1206 AssertFailed(); 1207 return rc; 1208 } 1209 1210 1211 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetRelative} */ 1212 static DECLCALLBACK(int) pdmR3DevHlp_TimerSetRelative(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, uint64_t cTicksToNext, uint64_t *pu64Now) 1213 { 1214 RT_NOREF(pDevIns, hTimer, cTicksToNext, pu64Now); 1215 int rc = VERR_NOT_IMPLEMENTED; 1216 AssertFailed(); 1217 return rc; 1218 } 1219 1220 1221 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerStop} */ 1222 static DECLCALLBACK(int) pdmR3DevHlp_TimerStop(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer) 1223 { 1224 RT_NOREF(pDevIns, hTimer); 1225 int rc = VERR_NOT_IMPLEMENTED; 1226 AssertFailed(); 1227 return rc; 1228 } 1229 1230 1231 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerUnlockClock} */ 1232 static DECLCALLBACK(void) pdmR3DevHlp_TimerUnlockClock(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer) 1233 { 1234 RT_NOREF(pDevIns, hTimer); 1235 AssertFailed(); 1236 } 1237 1238 1239 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerUnlockClock2} */ 1240 static DECLCALLBACK(void) pdmR3DevHlp_TimerUnlockClock2(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PPDMCRITSECT pCritSect) 1241 { 1242 RT_NOREF(pDevIns, hTimer, pCritSect); 1243 AssertFailed(); 1244 } 1245 1246 1247 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerSetCritSect} */ 1248 static DECLCALLBACK(int) pdmR3DevHlp_TimerSetCritSect(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PPDMCRITSECT pCritSect) 1249 { 1250 RT_NOREF(pDevIns, hTimer, pCritSect); 1251 int rc = VERR_NOT_IMPLEMENTED; 1252 AssertFailed(); 1253 return rc; 1254 } 1255 1256 1257 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerSave} */ 1258 static DECLCALLBACK(int) pdmR3DevHlp_TimerSave(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PSSMHANDLE pSSM) 1259 { 1260 RT_NOREF(pDevIns, hTimer, pSSM); 1261 int rc = VERR_NOT_IMPLEMENTED; 1262 AssertFailed(); 1263 return rc; 1264 } 1265 1266 1267 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerLoad} */ 1268 static DECLCALLBACK(int) pdmR3DevHlp_TimerLoad(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, PSSMHANDLE pSSM) 1269 { 1270 RT_NOREF(pDevIns, hTimer, pSSM); 1271 int rc = VERR_NOT_IMPLEMENTED; 1272 AssertFailed(); 1273 return rc; 1274 } 1275 1276 1277 /** @interface_method_impl{PDMDEVHLPR3,pfnTimerDestroy} */ 1278 static DECLCALLBACK(int) pdmR3DevHlp_TimerDestroy(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer) 1279 { 1280 RT_NOREF(pDevIns, hTimer); 1281 int rc = VERR_NOT_IMPLEMENTED; 1282 AssertFailed(); 1283 return rc; 1284 } 1285 1286 1287 static DECLCALLBACK(int) pdmR3DevHlp_TimerSkipLoad(PSSMHANDLE pSSM, bool *pfActive) 1288 { 1289 RT_NOREF(pSSM, pfActive); 1290 int rc = VERR_NOT_IMPLEMENTED; 1291 AssertFailed(); 485 1292 return rc; 486 1293 } … … 494 1301 pDevIns->pReg->szName, pDevIns->iInstance, pTime)); 495 1302 1303 RT_NOREF(pDevIns, pTime); 496 1304 AssertFailed(); 497 1305 … … 501 1309 502 1310 1311 static DECLCALLBACK(bool) pdmR3DevHlp_CFGMExists(PCFGMNODE pNode, const char *pszName) 1312 { 1313 RT_NOREF(pNode, pszName); 1314 AssertFailed(); 1315 return false; 1316 } 1317 1318 1319 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryType(PCFGMNODE pNode, const char *pszName, PCFGMVALUETYPE penmType) 1320 { 1321 RT_NOREF(pNode, pszName, penmType); 1322 AssertFailed(); 1323 return VERR_NOT_IMPLEMENTED; 1324 } 1325 1326 1327 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQuerySize(PCFGMNODE pNode, const char *pszName, size_t *pcb) 1328 { 1329 RT_NOREF(pNode, pszName, pcb); 1330 AssertFailed(); 1331 return VERR_NOT_IMPLEMENTED; 1332 } 1333 1334 1335 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryInteger(PCFGMNODE pNode, const char *pszName, uint64_t *pu64) 1336 { 1337 RT_NOREF(pNode, pszName, pu64); 1338 AssertFailed(); 1339 return VERR_NOT_IMPLEMENTED; 1340 } 1341 1342 1343 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryIntegerDef(PCFGMNODE pNode, const char *pszName, uint64_t *pu64, uint64_t u64Def) 1344 { 1345 RT_NOREF(pNode, pszName, pu64, u64Def); 1346 AssertFailed(); 1347 return VERR_NOT_IMPLEMENTED; 1348 } 1349 1350 1351 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryString(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString) 1352 { 1353 RT_NOREF(pNode, pszName, pszString, cchString); 1354 AssertFailed(); 1355 return VERR_NOT_IMPLEMENTED; 1356 } 1357 1358 1359 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryStringDef(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef) 1360 { 1361 RT_NOREF(pNode, pszName, pszString, cchString, pszDef); 1362 AssertFailed(); 1363 return VERR_NOT_IMPLEMENTED; 1364 } 1365 1366 1367 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryBytes(PCFGMNODE pNode, const char *pszName, void *pvData, size_t cbData) 1368 { 1369 RT_NOREF(pNode, pszName, pvData, cbData); 1370 AssertFailed(); 1371 return VERR_NOT_IMPLEMENTED; 1372 } 1373 1374 1375 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU64(PCFGMNODE pNode, const char *pszName, uint64_t *pu64) 1376 { 1377 RT_NOREF(pNode, pszName, pu64); 1378 AssertFailed(); 1379 return VERR_NOT_IMPLEMENTED; 1380 } 1381 1382 1383 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU64Def(PCFGMNODE pNode, const char *pszName, uint64_t *pu64, uint64_t u64Def) 1384 { 1385 RT_NOREF(pNode, pszName, pu64, u64Def); 1386 AssertFailed(); 1387 return VERR_NOT_IMPLEMENTED; 1388 } 1389 1390 1391 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS64(PCFGMNODE pNode, const char *pszName, int64_t *pi64) 1392 { 1393 RT_NOREF(pNode, pszName, pi64); 1394 AssertFailed(); 1395 return VERR_NOT_IMPLEMENTED; 1396 } 1397 1398 1399 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS64Def(PCFGMNODE pNode, const char *pszName, int64_t *pi64, int64_t i64Def) 1400 { 1401 RT_NOREF(pNode, pszName, pi64, i64Def); 1402 AssertFailed(); 1403 return VERR_NOT_IMPLEMENTED; 1404 } 1405 1406 1407 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU32(PCFGMNODE pNode, const char *pszName, uint32_t *pu32) 1408 { 1409 RT_NOREF(pNode, pszName, pu32); 1410 AssertFailed(); 1411 return VERR_NOT_IMPLEMENTED; 1412 } 1413 1414 1415 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU32Def(PCFGMNODE pNode, const char *pszName, uint32_t *pu32, uint32_t u32Def) 1416 { 1417 RT_NOREF(pNode, pszName, pu32, u32Def); 1418 AssertFailed(); 1419 return VERR_NOT_IMPLEMENTED; 1420 } 1421 1422 1423 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS32(PCFGMNODE pNode, const char *pszName, int32_t *pi32) 1424 { 1425 RT_NOREF(pNode, pszName, pi32); 1426 AssertFailed(); 1427 return VERR_NOT_IMPLEMENTED; 1428 } 1429 1430 1431 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS32Def(PCFGMNODE pNode, const char *pszName, int32_t *pi32, int32_t i32Def) 1432 { 1433 RT_NOREF(pNode, pszName, pi32, i32Def); 1434 AssertFailed(); 1435 return VERR_NOT_IMPLEMENTED; 1436 } 1437 1438 1439 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU16(PCFGMNODE pNode, const char *pszName, uint16_t *pu16) 1440 { 1441 RT_NOREF(pNode, pszName, pu16); 1442 AssertFailed(); 1443 return VERR_NOT_IMPLEMENTED; 1444 } 1445 1446 1447 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU16Def(PCFGMNODE pNode, const char *pszName, uint16_t *pu16, uint16_t u16Def) 1448 { 1449 RT_NOREF(pNode, pszName, pu16, u16Def); 1450 AssertFailed(); 1451 return VERR_NOT_IMPLEMENTED; 1452 } 1453 1454 1455 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS16(PCFGMNODE pNode, const char *pszName, int16_t *pi16) 1456 { 1457 RT_NOREF(pNode, pszName, pi16); 1458 AssertFailed(); 1459 return VERR_NOT_IMPLEMENTED; 1460 } 1461 1462 1463 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS16Def(PCFGMNODE pNode, const char *pszName, int16_t *pi16, int16_t i16Def) 1464 { 1465 RT_NOREF(pNode, pszName, pi16, i16Def); 1466 AssertFailed(); 1467 return VERR_NOT_IMPLEMENTED; 1468 } 1469 1470 1471 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU8(PCFGMNODE pNode, const char *pszName, uint8_t *pu8) 1472 { 1473 RT_NOREF(pNode, pszName, pu8); 1474 AssertFailed(); 1475 return VERR_NOT_IMPLEMENTED; 1476 } 1477 1478 1479 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryU8Def(PCFGMNODE pNode, const char *pszName, uint8_t *pu8, uint8_t u8Def) 1480 { 1481 RT_NOREF(pNode, pszName, pu8, u8Def); 1482 AssertFailed(); 1483 return VERR_NOT_IMPLEMENTED; 1484 } 1485 1486 1487 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS8(PCFGMNODE pNode, const char *pszName, int8_t *pi8) 1488 { 1489 RT_NOREF(pNode, pszName, pi8); 1490 AssertFailed(); 1491 return VERR_NOT_IMPLEMENTED; 1492 } 1493 1494 1495 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryS8Def(PCFGMNODE pNode, const char *pszName, int8_t *pi8, int8_t i8Def) 1496 { 1497 RT_NOREF(pNode, pszName, pi8, i8Def); 1498 AssertFailed(); 1499 return VERR_NOT_IMPLEMENTED; 1500 } 1501 1502 1503 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryBool(PCFGMNODE pNode, const char *pszName, bool *pf) 1504 { 1505 RT_NOREF(pNode, pszName, pf); 1506 AssertFailed(); 1507 return VERR_NOT_IMPLEMENTED; 1508 } 1509 1510 1511 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryBoolDef(PCFGMNODE pNode, const char *pszName, bool *pf, bool fDef) 1512 { 1513 RT_NOREF(pNode, pszName, pf, fDef); 1514 AssertFailed(); 1515 return VERR_NOT_IMPLEMENTED; 1516 } 1517 1518 1519 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryPort(PCFGMNODE pNode, const char *pszName, PRTIOPORT pPort) 1520 { 1521 RT_NOREF(pNode, pszName, pPort); 1522 AssertFailed(); 1523 return VERR_NOT_IMPLEMENTED; 1524 } 1525 1526 1527 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryPortDef(PCFGMNODE pNode, const char *pszName, PRTIOPORT pPort, RTIOPORT PortDef) 1528 { 1529 RT_NOREF(pNode, pszName, pPort, PortDef); 1530 AssertFailed(); 1531 return VERR_NOT_IMPLEMENTED; 1532 } 1533 1534 1535 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryUInt(PCFGMNODE pNode, const char *pszName, unsigned int *pu) 1536 { 1537 RT_NOREF(pNode, pszName, pu); 1538 AssertFailed(); 1539 return VERR_NOT_IMPLEMENTED; 1540 } 1541 1542 1543 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryUIntDef(PCFGMNODE pNode, const char *pszName, unsigned int *pu, unsigned int uDef) 1544 { 1545 RT_NOREF(pNode, pszName, pu, uDef); 1546 AssertFailed(); 1547 return VERR_NOT_IMPLEMENTED; 1548 } 1549 1550 1551 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQuerySInt(PCFGMNODE pNode, const char *pszName, signed int *pi) 1552 { 1553 RT_NOREF(pNode, pszName, pi); 1554 AssertFailed(); 1555 return VERR_NOT_IMPLEMENTED; 1556 } 1557 1558 1559 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQuerySIntDef(PCFGMNODE pNode, const char *pszName, signed int *pi, signed int iDef) 1560 { 1561 RT_NOREF(pNode, pszName, pi, iDef); 1562 AssertFailed(); 1563 return VERR_NOT_IMPLEMENTED; 1564 } 1565 1566 1567 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryPtr(PCFGMNODE pNode, const char *pszName, void **ppv) 1568 { 1569 RT_NOREF(pNode, pszName, ppv); 1570 AssertFailed(); 1571 return VERR_NOT_IMPLEMENTED; 1572 } 1573 1574 1575 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryPtrDef(PCFGMNODE pNode, const char *pszName, void **ppv, void *pvDef) 1576 { 1577 RT_NOREF(pNode, pszName, ppv, pvDef); 1578 AssertFailed(); 1579 return VERR_NOT_IMPLEMENTED; 1580 } 1581 1582 1583 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtr(PCFGMNODE pNode, const char *pszName, PRTGCPTR pGCPtr) 1584 { 1585 RT_NOREF(pNode, pszName, pGCPtr); 1586 AssertFailed(); 1587 return VERR_NOT_IMPLEMENTED; 1588 } 1589 1590 1591 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrDef(PCFGMNODE pNode, const char *pszName, PRTGCPTR pGCPtr, RTGCPTR GCPtrDef) 1592 { 1593 RT_NOREF(pNode, pszName, pGCPtr, GCPtrDef); 1594 AssertFailed(); 1595 return VERR_NOT_IMPLEMENTED; 1596 } 1597 1598 1599 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrU(PCFGMNODE pNode, const char *pszName, PRTGCUINTPTR pGCPtr) 1600 { 1601 RT_NOREF(pNode, pszName, pGCPtr); 1602 AssertFailed(); 1603 return VERR_NOT_IMPLEMENTED; 1604 } 1605 1606 1607 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrUDef(PCFGMNODE pNode, const char *pszName, PRTGCUINTPTR pGCPtr, RTGCUINTPTR GCPtrDef) 1608 { 1609 RT_NOREF(pNode, pszName, pGCPtr, GCPtrDef); 1610 AssertFailed(); 1611 return VERR_NOT_IMPLEMENTED; 1612 } 1613 1614 1615 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrS(PCFGMNODE pNode, const char *pszName, PRTGCINTPTR pGCPtr) 1616 { 1617 RT_NOREF(pNode, pszName, pGCPtr); 1618 AssertFailed(); 1619 return VERR_NOT_IMPLEMENTED; 1620 } 1621 1622 1623 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryGCPtrSDef(PCFGMNODE pNode, const char *pszName, PRTGCINTPTR pGCPtr, RTGCINTPTR GCPtrDef) 1624 { 1625 RT_NOREF(pNode, pszName, pGCPtr, GCPtrDef); 1626 AssertFailed(); 1627 return VERR_NOT_IMPLEMENTED; 1628 } 1629 1630 1631 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryStringAlloc(PCFGMNODE pNode, const char *pszName, char **ppszString) 1632 { 1633 RT_NOREF(pNode, pszName, ppszString); 1634 AssertFailed(); 1635 return VERR_NOT_IMPLEMENTED; 1636 } 1637 1638 1639 static DECLCALLBACK(int) pdmR3DevHlp_CFGMQueryStringAllocDef(PCFGMNODE pNode, const char *pszName, char **ppszString, const char *pszDef) 1640 { 1641 RT_NOREF(pNode, pszName, ppszString, pszDef); 1642 AssertFailed(); 1643 return VERR_NOT_IMPLEMENTED; 1644 } 1645 1646 1647 static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetParent(PCFGMNODE pNode) 1648 { 1649 RT_NOREF(pNode); 1650 AssertFailed(); 1651 return NULL; 1652 } 1653 1654 1655 static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetChild(PCFGMNODE pNode, const char *pszPath) 1656 { 1657 RT_NOREF(pNode, pszPath); 1658 AssertFailed(); 1659 return NULL; 1660 } 1661 1662 1663 static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetChildF(PCFGMNODE pNode, const char *pszPathFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3) 1664 { 1665 RT_NOREF(pNode, pszPathFormat); 1666 AssertFailed(); 1667 return NULL; 1668 } 1669 1670 1671 static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetChildFV(PCFGMNODE pNode, const char *pszPathFormat, va_list Args) RT_IPRT_FORMAT_ATTR(3, 0) 1672 { 1673 RT_NOREF(pNode, pszPathFormat, Args); 1674 AssertFailed(); 1675 return NULL; 1676 } 1677 1678 1679 static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetFirstChild(PCFGMNODE pNode) 1680 { 1681 RT_NOREF(pNode); 1682 AssertFailed(); 1683 return NULL; 1684 } 1685 1686 1687 static DECLCALLBACK(PCFGMNODE) pdmR3DevHlp_CFGMGetNextChild(PCFGMNODE pCur) 1688 { 1689 RT_NOREF(pCur); 1690 AssertFailed(); 1691 return NULL; 1692 } 1693 1694 1695 static DECLCALLBACK(int) pdmR3DevHlp_CFGMGetName(PCFGMNODE pCur, char *pszName, size_t cchName) 1696 { 1697 RT_NOREF(pCur, pszName, cchName); 1698 AssertFailed(); 1699 return VERR_NOT_IMPLEMENTED; 1700 } 1701 1702 1703 static DECLCALLBACK(size_t) pdmR3DevHlp_CFGMGetNameLen(PCFGMNODE pCur) 1704 { 1705 RT_NOREF(pCur); 1706 AssertFailed(); 1707 return 0; 1708 } 1709 1710 1711 static DECLCALLBACK(bool) pdmR3DevHlp_CFGMAreChildrenValid(PCFGMNODE pNode, const char *pszzValid) 1712 { 1713 RT_NOREF(pNode, pszzValid); 1714 AssertFailed(); 1715 return false; 1716 } 1717 1718 1719 static DECLCALLBACK(PCFGMLEAF) pdmR3DevHlp_CFGMGetFirstValue(PCFGMNODE pCur) 1720 { 1721 RT_NOREF(pCur); 1722 AssertFailed(); 1723 return NULL; 1724 } 1725 1726 1727 static DECLCALLBACK(PCFGMLEAF) pdmR3DevHlp_CFGMGetNextValue(PCFGMLEAF pCur) 1728 { 1729 RT_NOREF(pCur); 1730 AssertFailed(); 1731 return NULL; 1732 } 1733 1734 1735 static DECLCALLBACK(int) pdmR3DevHlp_CFGMGetValueName(PCFGMLEAF pCur, char *pszName, size_t cchName) 1736 { 1737 RT_NOREF(pCur, pszName, cchName); 1738 AssertFailed(); 1739 return VERR_NOT_IMPLEMENTED; 1740 } 1741 1742 1743 static DECLCALLBACK(size_t) pdmR3DevHlp_CFGMGetValueNameLen(PCFGMLEAF pCur) 1744 { 1745 RT_NOREF(pCur); 1746 AssertFailed(); 1747 return 0; 1748 } 1749 1750 1751 static DECLCALLBACK(CFGMVALUETYPE) pdmR3DevHlp_CFGMGetValueType(PCFGMLEAF pCur) 1752 { 1753 RT_NOREF(pCur); 1754 AssertFailed(); 1755 return CFGMVALUETYPE_INTEGER; 1756 } 1757 1758 1759 static DECLCALLBACK(bool) pdmR3DevHlp_CFGMAreValuesValid(PCFGMNODE pNode, const char *pszzValid) 1760 { 1761 RT_NOREF(pNode, pszzValid); 1762 AssertFailed(); 1763 return false; 1764 } 1765 1766 1767 static DECLCALLBACK(int) pdmR3DevHlp_CFGMValidateConfig(PCFGMNODE pNode, const char *pszNode, 1768 const char *pszValidValues, const char *pszValidNodes, 1769 const char *pszWho, uint32_t uInstance) 1770 { 1771 RT_NOREF(pNode, pszNode, pszValidValues, pszValidNodes, pszWho, uInstance); 1772 AssertFailed(); 1773 return VERR_NOT_IMPLEMENTED; 1774 } 1775 1776 503 1777 /** @interface_method_impl{PDMDEVHLPR3,pfnTMTimeVirtGet} */ 504 1778 static DECLCALLBACK(uint64_t) pdmR3DevHlp_TMTimeVirtGet(PPDMDEVINS pDevIns) … … 553 1827 pDevIns->pReg->szName, pDevIns->iInstance)); 554 1828 555 P TSTDEVDUTINT pThis = TSTDEV_PDMDEVINS_2_DUT(pDevIns);556 PSUPDRVSESSION pSession = TSTDEV_PTSTDEVSUPDRVSESSION_2_PSUPDRVSESSION(&pThis->SupSession);1829 PSUPDRVSESSION pSession = NIL_RTR0PTR; 1830 AssertFailed(); 557 1831 558 1832 LogFlow(("pdmR3DevHlp_GetSupDrvSession: caller='%s'/%d: returns %#p\n", pDevIns->pReg->szName, pDevIns->iInstance, pSession)); … … 568 1842 pDevIns->pReg->szName, pDevIns->iInstance, pUuid, pUuid)); 569 1843 1844 #if defined(DEBUG_bird) || defined(DEBUG_ramshankar) || defined(DEBUG_sunlover) || defined(DEBUG_michael) || defined(DEBUG_andy) 1845 AssertMsgFailed(("'%s' wants %RTuuid - external only interface!\n", pDevIns->pReg->szName, pUuid)); 1846 #endif 1847 570 1848 void *pvRet = NULL; 1849 AssertFailed(); 571 1850 572 1851 LogRel(("pdmR3DevHlp_QueryGenericUserObject: caller='%s'/%d: returns %#p for %RTuuid\n", … … 583 1862 pDevIns->pReg->szName, pDevIns->iInstance, GCPhys, pvBuf, cbRead)); 584 1863 585 int rc = VERR_NOT_IMPLEMENTED;586 AssertFailed(); 587 588 Log(("pdmR3DevHlp_PhysRead: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));589 return rc;1864 VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED;; 1865 AssertFailed(); 1866 1867 Log(("pdmR3DevHlp_PhysRead: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict) )); 1868 return VBOXSTRICTRC_VAL(rcStrict); 590 1869 } 591 1870 … … 598 1877 pDevIns->pReg->szName, pDevIns->iInstance, GCPhys, pvBuf, cbWrite)); 599 1878 600 int rc = VERR_NOT_IMPLEMENTED;601 AssertFailed(); 602 603 Log(("pdmR3DevHlp_PhysWrite: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));604 return rc;1879 VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED;; 1880 AssertFailed(); 1881 1882 Log(("pdmR3DevHlp_PhysWrite: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict) )); 1883 return VBOXSTRICTRC_VAL(rcStrict); 605 1884 } 606 1885 … … 614 1893 AssertReturn(!fFlags, VERR_INVALID_PARAMETER); 615 1894 616 int rc = VERR_NOT_IMPLEMENTED; 1895 int rc = VERR_NOT_IMPLEMENTED;; 617 1896 AssertFailed(); 618 1897 … … 630 1909 AssertReturn(!fFlags, VERR_INVALID_PARAMETER); 631 1910 632 int rc = VERR_NOT_IMPLEMENTED; 1911 int rc = VERR_NOT_IMPLEMENTED;; 633 1912 AssertFailed(); 634 1913 … … 651 1930 652 1931 1932 /** @interface_method_impl{PDMDEVHLPR3,pfnPhysBulkGCPhys2CCPtr} */ 1933 static DECLCALLBACK(int) pdmR3DevHlp_PhysBulkGCPhys2CCPtr(PPDMDEVINS pDevIns, uint32_t cPages, PCRTGCPHYS paGCPhysPages, 1934 uint32_t fFlags, void **papvPages, PPGMPAGEMAPLOCK paLocks) 1935 { 1936 PDMDEV_ASSERT_DEVINS(pDevIns); 1937 LogFlow(("pdmR3DevHlp_PhysBulkGCPhys2CCPtr: caller='%s'/%d: cPages=%#x paGCPhysPages=%p (%RGp,..) fFlags=%#x papvPages=%p paLocks=%p\n", 1938 pDevIns->pReg->szName, pDevIns->iInstance, cPages, paGCPhysPages, paGCPhysPages[0], fFlags, papvPages, paLocks)); 1939 AssertReturn(!fFlags, VERR_INVALID_PARAMETER); 1940 AssertReturn(cPages > 0, VERR_INVALID_PARAMETER); 1941 1942 int rc = VERR_NOT_IMPLEMENTED;; 1943 AssertFailed(); 1944 1945 Log(("pdmR3DevHlp_PhysBulkGCPhys2CCPtr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 1946 return rc; 1947 } 1948 1949 1950 /** @interface_method_impl{PDMDEVHLPR3,pfnPhysBulkGCPhys2CCPtrReadOnly} */ 1951 static DECLCALLBACK(int) pdmR3DevHlp_PhysBulkGCPhys2CCPtrReadOnly(PPDMDEVINS pDevIns, uint32_t cPages, PCRTGCPHYS paGCPhysPages, 1952 uint32_t fFlags, const void **papvPages, PPGMPAGEMAPLOCK paLocks) 1953 { 1954 PDMDEV_ASSERT_DEVINS(pDevIns); 1955 LogFlow(("pdmR3DevHlp_PhysBulkGCPhys2CCPtrReadOnly: caller='%s'/%d: cPages=%#x paGCPhysPages=%p (%RGp,...) fFlags=%#x papvPages=%p paLocks=%p\n", 1956 pDevIns->pReg->szName, pDevIns->iInstance, cPages, paGCPhysPages, paGCPhysPages[0], fFlags, papvPages, paLocks)); 1957 AssertReturn(!fFlags, VERR_INVALID_PARAMETER); 1958 AssertReturn(cPages > 0, VERR_INVALID_PARAMETER); 1959 1960 int rc = VERR_NOT_IMPLEMENTED;; 1961 AssertFailed(); 1962 1963 Log(("pdmR3DevHlp_PhysBulkGCPhys2CCPtrReadOnly: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 1964 return rc; 1965 } 1966 1967 1968 /** @interface_method_impl{PDMDEVHLPR3,pfnPhysBulkReleasePageMappingLocks} */ 1969 static DECLCALLBACK(void) pdmR3DevHlp_PhysBulkReleasePageMappingLocks(PPDMDEVINS pDevIns, uint32_t cPages, PPGMPAGEMAPLOCK paLocks) 1970 { 1971 PDMDEV_ASSERT_DEVINS(pDevIns); 1972 LogFlow(("pdmR3DevHlp_PhysBulkReleasePageMappingLocks: caller='%s'/%d: cPages=%#x paLocks=%p\n", 1973 pDevIns->pReg->szName, pDevIns->iInstance, cPages, paLocks)); 1974 Assert(cPages > 0); 1975 1976 AssertFailed(); 1977 1978 Log(("pdmR3DevHlp_PhysBulkReleasePageMappingLocks: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance)); 1979 } 1980 1981 653 1982 /** @interface_method_impl{PDMDEVHLPR3,pfnPhysReadGCVirt} */ 654 1983 static DECLCALLBACK(int) pdmR3DevHlp_PhysReadGCVirt(PPDMDEVINS pDevIns, void *pvDst, RTGCPTR GCVirtSrc, size_t cb) … … 658 1987 pDevIns->pReg->szName, pDevIns->iInstance, pvDst, GCVirtSrc, cb)); 659 1988 660 int rc = VERR_NOT_IMPLEMENTED; 1989 int rc = VERR_NOT_IMPLEMENTED;; 661 1990 AssertFailed(); 662 1991 … … 674 2003 pDevIns->pReg->szName, pDevIns->iInstance, GCVirtDst, pvSrc, cb)); 675 2004 676 int rc = VERR_NOT_IMPLEMENTED; 2005 int rc = VERR_NOT_IMPLEMENTED;; 677 2006 AssertFailed(); 678 2007 … … 705 2034 LogFlow(("pdmR3DevHlp_MMHeapAlloc: caller='%s'/%d: cb=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, cb)); 706 2035 707 PTSTDEVDUTINT pThis = TSTDEV_PDMDEVINS_2_DUT(pDevIns);708 709 2036 void *pv = NULL; 710 PTSTDEVMMHEAPALLOC pHeapAlloc = (PTSTDEVMMHEAPALLOC)RTMemAllocZ(cb + sizeof(TSTDEVMMHEAPALLOC) - 1); 711 if (pHeapAlloc) 712 { 713 /* Poison */ 714 memset(&pHeapAlloc->abAlloc[0], 0xfe, cb); 715 pHeapAlloc->cbAlloc = cb; 716 pHeapAlloc->pVmmCallbacks = pDevIns->Internal.s.pVmmCallbacks; 717 pHeapAlloc->pDut = pThis; 718 719 tstDevDutLockExcl(pThis); 720 RTListAppend(&pThis->LstMmHeap, &pHeapAlloc->NdMmHeap); 721 tstDevDutUnlockExcl(pThis); 722 723 pv = &pHeapAlloc->abAlloc[0]; 724 } 2037 AssertFailed(); 725 2038 726 2039 LogFlow(("pdmR3DevHlp_MMHeapAlloc: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pv)); … … 735 2048 LogFlow(("pdmR3DevHlp_MMHeapAllocZ: caller='%s'/%d: cb=%#x\n", pDevIns->pReg->szName, pDevIns->iInstance, cb)); 736 2049 737 void *pv = pdmR3DevHlp_MMHeapAlloc(pDevIns, cb); 738 if (VALID_PTR(pv)) 739 memset(pv, 0, cb); 2050 void *pv = NULL; 2051 AssertFailed(); 740 2052 741 2053 LogFlow(("pdmR3DevHlp_MMHeapAllocZ: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pv)); … … 747 2059 static DECLCALLBACK(void) pdmR3DevHlp_MMHeapFree(PPDMDEVINS pDevIns, void *pv) 748 2060 { 749 PDMDEV_ASSERT_DEVINS(pDevIns); 2061 PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF_PV(pDevIns); 750 2062 LogFlow(("pdmR3DevHlp_MMHeapFree: caller='%s'/%d: pv=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pv)); 751 2063 752 MMR3HeapFree(pv);2064 AssertFailed(); 753 2065 754 2066 LogFlow(("pdmR3DevHlp_MMHeapAlloc: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance)); … … 788 2100 { 789 2101 PDMDEV_ASSERT_DEVINS(pDevIns); 790 RT_NOREF(rc, pszFile, iLine, pszFunction, pszFormat); 791 rc = VERR_NOT_IMPLEMENTED; 792 AssertFailed(); 793 return rc; 2102 2103 RT_NOREF(pDevIns, rc, RT_SRC_POS_ARGS, pszFormat); 2104 AssertFailed(); 2105 2106 return VERR_NOT_IMPLEMENTED; 794 2107 } 795 2108 … … 799 2112 { 800 2113 PDMDEV_ASSERT_DEVINS(pDevIns); 801 RT_NOREF(rc, pszFile, iLine, pszFunction, pszFormat, va); 802 rc = VERR_NOT_IMPLEMENTED; 803 AssertFailed(); 804 return rc; 2114 2115 RT_NOREF(pDevIns, rc, RT_SRC_POS_ARGS, pszFormat, va); 2116 AssertFailed(); 2117 2118 return VERR_NOT_IMPLEMENTED; 805 2119 } 806 2120 … … 810 2124 { 811 2125 PDMDEV_ASSERT_DEVINS(pDevIns); 812 RT_NOREF(fFlags, pszErrorId, pszFormat); 813 int rc = VERR_NOT_IMPLEMENTED; 814 AssertFailed(); 2126 2127 RT_NOREF(pDevIns, fFlags, pszErrorId, pszFormat); 2128 int rc = VERR_NOT_IMPLEMENTED; 2129 AssertFailed(); 2130 815 2131 return rc; 816 2132 } … … 821 2137 { 822 2138 PDMDEV_ASSERT_DEVINS(pDevIns); 823 RT_NOREF(fFlags, pszErrorId, pszFormat, va); 824 int rc = VERR_NOT_IMPLEMENTED; 825 AssertFailed(); 2139 2140 RT_NOREF(pDevIns, fFlags, pszErrorId, pszFormat, va); 2141 int rc = VERR_NOT_IMPLEMENTED; 2142 AssertFailed(); 2143 826 2144 return rc; 827 2145 } … … 863 2181 864 2182 2183 /** @interface_method_impl{PDMDEVHLPR3,pfnDBGFInfoRegisterArgv} */ 2184 static DECLCALLBACK(int) pdmR3DevHlp_DBGFInfoRegisterArgv(PPDMDEVINS pDevIns, const char *pszName, const char *pszDesc, PFNDBGFINFOARGVDEV pfnHandler) 2185 { 2186 PDMDEV_ASSERT_DEVINS(pDevIns); 2187 LogFlow(("pdmR3DevHlp_DBGFInfoRegisterArgv: caller='%s'/%d: pszName=%p:{%s} pszDesc=%p:{%s} pfnHandler=%p\n", 2188 pDevIns->pReg->szName, pDevIns->iInstance, pszName, pszName, pszDesc, pszDesc, pfnHandler)); 2189 2190 int rc = VERR_NOT_IMPLEMENTED; 2191 AssertFailed(); 2192 2193 LogFlow(("pdmR3DevHlp_DBGFInfoRegisterArgv: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2194 return rc; 2195 } 2196 2197 865 2198 /** @interface_method_impl{PDMDEVHLPR3,pfnDBGFRegRegister} */ 866 2199 static DECLCALLBACK(int) pdmR3DevHlp_DBGFRegRegister(PPDMDEVINS pDevIns, PCDBGFREGDESC paRegisters) … … 882 2215 { 883 2216 PDMDEV_ASSERT_DEVINS(pDevIns); 884 RTTRACEBUF hTraceBuf = N ULL;2217 RTTRACEBUF hTraceBuf = NIL_RTTRACEBUF; 885 2218 AssertFailed(); 886 2219 LogFlow(("pdmR3DevHlp_DBGFTraceBuf: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, hTraceBuf)); … … 894 2227 { 895 2228 PDMDEV_ASSERT_DEVINS(pDevIns); 896 RT_NOREF(pvSample, enmType, pszName, enmUnit, pszDesc); 897 AssertFailed(); 898 } 899 900 901 902 /** @interface_method_impl{PDMDEVHLPR3,pfnSTAMRegisterF} */ 903 static DECLCALLBACK(void) pdmR3DevHlp_STAMRegisterF(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility, 904 STAMUNIT enmUnit, const char *pszDesc, const char *pszName, ...) 905 { 906 PDMDEV_ASSERT_DEVINS(pDevIns); 907 RT_NOREF(pvSample, enmType, enmVisibility, enmUnit, pszDesc, pszName); 2229 2230 RT_NOREF(pDevIns, pvSample, enmType, pszName, enmUnit, pszDesc); 908 2231 AssertFailed(); 909 2232 } … … 915 2238 { 916 2239 PDMDEV_ASSERT_DEVINS(pDevIns); 917 RT_NOREF(pvSample, enmType, enmVisibility, enmUnit, pszDesc, pszName, args); 2240 2241 RT_NOREF(pDevIns, pvSample, enmType, enmVisibility, enmUnit, pszDesc, pszName, args); 918 2242 AssertFailed(); 919 2243 } … … 923 2247 * @interface_method_impl{PDMDEVHLPR3,pfnPCIRegister} 924 2248 */ 925 static DECLCALLBACK(int) pdmR3DevHlp_PCIRegister(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t idxDevCfg, uint32_tfFlags,2249 static DECLCALLBACK(int) pdmR3DevHlp_PCIRegister(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t fFlags, 926 2250 uint8_t uPciDevNo, uint8_t uPciFunNo, const char *pszName) 927 2251 { 928 2252 PDMDEV_ASSERT_DEVINS(pDevIns); 929 LogFlow(("pdmR3DevHlp_PCIRegister: caller='%s'/%d: pPciDev=%p:{.config={%#.256Rhxs} idxDevCfg=%dfFlags=%#x uPciDevNo=%#x uPciFunNo=%#x pszName=%p:{%s}\n",930 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->abConfig, idxDevCfg,fFlags, uPciDevNo, uPciFunNo, pszName, pszName ? pszName : ""));2253 LogFlow(("pdmR3DevHlp_PCIRegister: caller='%s'/%d: pPciDev=%p:{.config={%#.256Rhxs} fFlags=%#x uPciDevNo=%#x uPciFunNo=%#x pszName=%p:{%s}\n", 2254 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->abConfig, fFlags, uPciDevNo, uPciFunNo, pszName, pszName ? pszName : "")); 931 2255 932 2256 /* 933 2257 * Validate input. 934 2258 */ 2259 AssertLogRelMsgReturn(pDevIns->pReg->cMaxPciDevices > 0, 2260 ("'%s'/%d: cMaxPciDevices is 0\n", pDevIns->pReg->szName, pDevIns->iInstance), 2261 VERR_WRONG_ORDER); 935 2262 AssertLogRelMsgReturn(RT_VALID_PTR(pPciDev), 936 2263 ("'%s'/%d: Invalid pPciDev value: %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pPciDev), … … 939 2266 ("'%s'/%d: Vendor ID is not set!\n", pDevIns->pReg->szName, pDevIns->iInstance), 940 2267 VERR_INVALID_POINTER); 941 AssertLogRelMsgReturn(idxDevCfg < 256 || idxDevCfg == PDMPCIDEVREG_CFG_NEXT,942 ("'%s'/%d: Invalid config selector: %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, idxDevCfg),943 VERR_OUT_OF_RANGE);944 2268 AssertLogRelMsgReturn( uPciDevNo < 32 945 2269 || uPciDevNo == PDMPCIDEVREG_DEV_NO_FIRST_UNUSED … … 954 2278 ("'%s'/%d: Invalid flags: %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, fFlags), 955 2279 VERR_INVALID_FLAGS); 956 int rc = VINF_SUCCESS; 957 pDevIns->Internal.s.pDut->pPciDev = pPciDev; 2280 if (!pszName) 2281 pszName = pDevIns->pReg->szName; 2282 2283 #if 0 2284 AssertLogRelReturn(RT_VALID_PTR(pszName), VERR_INVALID_POINTER); 2285 AssertLogRelReturn(!pPciDev->Int.s.fRegistered, VERR_PDM_NOT_PCI_DEVICE); 2286 AssertLogRelReturn(pPciDev == PDMDEV_GET_PPCIDEV(pDevIns, pPciDev->Int.s.idxSubDev), VERR_PDM_NOT_PCI_DEVICE); 2287 AssertLogRelReturn(pPciDev == PDMDEV_CALC_PPCIDEV(pDevIns, pPciDev->Int.s.idxSubDev), VERR_PDM_NOT_PCI_DEVICE); 2288 AssertMsgReturn(pPciDev->u32Magic == PDMPCIDEV_MAGIC, ("%#x\n", pPciDev->u32Magic), VERR_PDM_NOT_PCI_DEVICE); 2289 #endif 2290 2291 int rc = VERR_NOT_IMPLEMENTED; 2292 AssertFailed(); 958 2293 959 2294 LogFlow(("pdmR3DevHlp_PCIRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 966 2301 { 967 2302 PDMDEV_ASSERT_DEVINS(pDevIns); 2303 if (!pPciDev) /* NULL is an alias for the default PCI device. */ 2304 pPciDev = pDevIns->apPciDevs[0]; 2305 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE); 968 2306 LogFlow(("pdmR3DevHlp_PCIRegisterMsi: caller='%s'/%d: pPciDev=%p:{%#x} pMsgReg=%p:{cMsiVectors=%d, cMsixVectors=%d}\n", 969 2307 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->uDevFn, pMsiReg, pMsiReg->cMsiVectors, pMsiReg->cMsixVectors)); 970 971 int rc = VERR_NOT_SUPPORTED; /** @todo */ 2308 PDMPCIDEV_ASSERT_VALID_RET(pDevIns, pPciDev); 2309 2310 AssertLogRelMsgReturn(pDevIns->pReg->cMaxPciDevices > 0, 2311 ("'%s'/%d: cMaxPciDevices is 0\n", pDevIns->pReg->szName, pDevIns->iInstance), 2312 VERR_WRONG_ORDER); 2313 AssertLogRelMsgReturn(pMsiReg->cMsixVectors <= pDevIns->pReg->cMaxMsixVectors, 2314 ("'%s'/%d: cMsixVectors=%u cMaxMsixVectors=%u\n", 2315 pDevIns->pReg->szName, pDevIns->iInstance, pMsiReg->cMsixVectors, pDevIns->pReg->cMaxMsixVectors), 2316 VERR_INVALID_FLAGS); 2317 2318 int rc = VERR_NOT_IMPLEMENTED; 2319 AssertFailed(); 972 2320 973 2321 LogFlow(("pdmR3DevHlp_PCIRegisterMsi: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 978 2326 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIIORegionRegister} */ 979 2327 static DECLCALLBACK(int) pdmR3DevHlp_PCIIORegionRegister(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t iRegion, 980 RTGCPHYS cbRegion, PCIADDRESSSPACE enmType, PFNPCIIOREGIONMAP pfnCallback) 981 { 982 PDMDEV_ASSERT_DEVINS(pDevIns); 983 LogFlow(("pdmR3DevHlp_PCIIORegionRegister: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%d cbRegion=%RGp enmType=%d pfnCallback=%p\n", 984 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->uDevFn, iRegion, cbRegion, enmType, pfnCallback)); 985 986 AssertLogRelMsgReturn(iRegion < VBOX_PCI_NUM_REGIONS, 987 ("Region %u exceeds maximum region index %u\n", iRegion, VBOX_PCI_NUM_REGIONS), 988 VERR_INVALID_PARAMETER); 989 990 int rc = VINF_SUCCESS; 991 PTSTDEVDUTINT pThis = TSTDEV_PDMDEVINS_2_DUT(pDevIns); 992 PTSTDEVDUTPCIREGION pRegion = &pThis->aPciRegions[iRegion]; 993 pRegion->cbRegion = cbRegion; 994 pRegion->enmType = enmType; 995 pRegion->pfnRegionMap = pfnCallback; 2328 RTGCPHYS cbRegion, PCIADDRESSSPACE enmType, uint32_t fFlags, 2329 uint64_t hHandle, PFNPCIIOREGIONMAP pfnMapUnmap) 2330 { 2331 PDMDEV_ASSERT_DEVINS(pDevIns); 2332 if (!pPciDev) /* NULL is an alias for the default PCI device. */ 2333 pPciDev = pDevIns->apPciDevs[0]; 2334 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE); 2335 LogFlow(("pdmR3DevHlp_PCIIORegionRegister: caller='%s'/%d: pPciDev=%p:{%#x} iRegion=%d cbRegion=%RGp enmType=%d fFlags=%#x, hHandle=%#RX64 pfnMapUnmap=%p\n", 2336 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->uDevFn, iRegion, cbRegion, enmType, fFlags, hHandle, pfnMapUnmap)); 2337 PDMPCIDEV_ASSERT_VALID_RET(pDevIns, pPciDev); 2338 2339 /* 2340 * Validate input. 2341 */ 2342 if (iRegion >= VBOX_PCI_NUM_REGIONS) 2343 { 2344 Assert(iRegion < VBOX_PCI_NUM_REGIONS); 2345 LogFlow(("pdmR3DevHlp_PCIIORegionRegister: caller='%s'/%d: returns %Rrc (iRegion)\n", pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 2346 return VERR_INVALID_PARAMETER; 2347 } 2348 2349 switch ((int)enmType) 2350 { 2351 case PCI_ADDRESS_SPACE_IO: 2352 /* 2353 * Sanity check: don't allow to register more than 32K of the PCI I/O space. 2354 */ 2355 AssertLogRelMsgReturn(cbRegion <= _32K, 2356 ("caller='%s'/%d: %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, cbRegion), 2357 VERR_INVALID_PARAMETER); 2358 break; 2359 2360 case PCI_ADDRESS_SPACE_MEM: 2361 case PCI_ADDRESS_SPACE_MEM_PREFETCH: 2362 /* 2363 * Sanity check: Don't allow to register more than 2GB of the PCI MMIO space. 2364 */ 2365 AssertLogRelMsgReturn(cbRegion <= MM_MMIO_32_MAX, 2366 ("caller='%s'/%d: %RGp (max %RGp)\n", 2367 pDevIns->pReg->szName, pDevIns->iInstance, cbRegion, (RTGCPHYS)MM_MMIO_32_MAX), 2368 VERR_OUT_OF_RANGE); 2369 break; 2370 2371 case PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_MEM: 2372 case PCI_ADDRESS_SPACE_BAR64 | PCI_ADDRESS_SPACE_MEM_PREFETCH: 2373 /* 2374 * Sanity check: Don't allow to register more than 64GB of the 64-bit PCI MMIO space. 2375 */ 2376 AssertLogRelMsgReturn(cbRegion <= MM_MMIO_64_MAX, 2377 ("caller='%s'/%d: %RGp (max %RGp)\n", 2378 pDevIns->pReg->szName, pDevIns->iInstance, cbRegion, MM_MMIO_64_MAX), 2379 VERR_OUT_OF_RANGE); 2380 break; 2381 2382 default: 2383 AssertMsgFailed(("enmType=%#x is unknown\n", enmType)); 2384 LogFlow(("pdmR3DevHlp_PCIIORegionRegister: caller='%s'/%d: returns %Rrc (enmType)\n", pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 2385 return VERR_INVALID_PARAMETER; 2386 } 2387 2388 AssertMsgReturn( pfnMapUnmap 2389 || ( hHandle != UINT64_MAX 2390 && (fFlags & PDMPCIDEV_IORGN_F_HANDLE_MASK) != PDMPCIDEV_IORGN_F_NO_HANDLE), 2391 ("caller='%s'/%d: fFlags=%#x hHandle=%#RX64\n", pDevIns->pReg->szName, pDevIns->iInstance, fFlags, hHandle), 2392 VERR_INVALID_PARAMETER); 2393 2394 AssertMsgReturn(!(fFlags & ~PDMPCIDEV_IORGN_F_VALID_MASK), ("fFlags=%#x\n", fFlags), VERR_INVALID_FLAGS); 2395 int rc = VERR_NOT_IMPLEMENTED; 2396 AssertFailed(); 996 2397 997 2398 LogFlow(("pdmR3DevHlp_PCIIORegionRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 1000 2401 1001 2402 1002 /** @interface_method_impl{PDMDEVHLPR3,pfnPCISetConfigCallbacks} */ 1003 static DECLCALLBACK(void) pdmR3DevHlp_PCISetConfigCallbacks(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, PFNPCICONFIGREAD pfnRead, PPFNPCICONFIGREAD ppfnReadOld, 1004 PFNPCICONFIGWRITE pfnWrite, PPFNPCICONFIGWRITE ppfnWriteOld) 1005 { 1006 PDMDEV_ASSERT_DEVINS(pDevIns); 1007 LogFlow(("pdmR3DevHlp_PCISetConfigCallbacks: caller='%s'/%d: pPciDev=%p pfnRead=%p ppfnReadOld=%p pfnWrite=%p ppfnWriteOld=%p\n", 1008 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pfnRead, ppfnReadOld, pfnWrite, ppfnWriteOld)); 1009 2403 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIInterceptConfigAccesses} */ 2404 static DECLCALLBACK(int) pdmR3DevHlp_PCIInterceptConfigAccesses(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, 2405 PFNPCICONFIGREAD pfnRead, PFNPCICONFIGWRITE pfnWrite) 2406 { 2407 PDMDEV_ASSERT_DEVINS(pDevIns); 2408 if (!pPciDev) /* NULL is an alias for the default PCI device. */ 2409 pPciDev = pDevIns->apPciDevs[0]; 2410 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE); 2411 LogFlow(("pdmR3DevHlp_PCIInterceptConfigAccesses: caller='%s'/%d: pPciDev=%p pfnRead=%p pfnWrite=%p\n", 2412 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pfnRead, pfnWrite)); 2413 PDMPCIDEV_ASSERT_VALID_RET(pDevIns, pPciDev); 2414 2415 int rc = VERR_NOT_IMPLEMENTED; 2416 AssertFailed(); 2417 2418 LogFlow(("pdmR3DevHlp_PCIInterceptConfigAccesses: caller='%s'/%d: returns %Rrc\n", 2419 pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2420 return rc; 2421 } 2422 2423 2424 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIConfigWrite} */ 2425 static DECLCALLBACK(VBOXSTRICTRC) 2426 pdmR3DevHlp_PCIConfigWrite(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t uAddress, unsigned cb, uint32_t u32Value) 2427 { 2428 PDMDEV_ASSERT_DEVINS(pDevIns); 2429 AssertPtrReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE); 2430 LogFlow(("pdmR3DevHlp_PCIConfigWrite: caller='%s'/%d: pPciDev=%p uAddress=%#x cd=%d u32Value=%#x\n", 2431 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, uAddress, cb, u32Value)); 2432 2433 VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED; 2434 AssertFailed(); 2435 2436 LogFlow(("pdmR3DevHlp_PCIConfigWrite: caller='%s'/%d: returns %Rrc\n", 2437 pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict))); 2438 return rcStrict; 2439 } 2440 2441 2442 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIConfigRead} */ 2443 static DECLCALLBACK(VBOXSTRICTRC) 2444 pdmR3DevHlp_PCIConfigRead(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t uAddress, unsigned cb, uint32_t *pu32Value) 2445 { 2446 PDMDEV_ASSERT_DEVINS(pDevIns); 2447 AssertPtrReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE); 2448 LogFlow(("pdmR3DevHlp_PCIConfigRead: caller='%s'/%d: pPciDev=%p uAddress=%#x cd=%d pu32Value=%p:{%#x}\n", 2449 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, uAddress, cb, pu32Value, *pu32Value)); 2450 2451 VBOXSTRICTRC rcStrict = VERR_NOT_IMPLEMENTED; 2452 AssertFailed(); 2453 2454 LogFlow(("pdmR3DevHlp_PCIConfigRead: caller='%s'/%d: returns %Rrc (*pu32Value=%#x)\n", 2455 pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict), *pu32Value)); 2456 return rcStrict; 2457 } 2458 2459 2460 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIPhysRead} */ 2461 static DECLCALLBACK(int) 2462 pdmR3DevHlp_PCIPhysRead(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead) 2463 { 2464 PDMDEV_ASSERT_DEVINS(pDevIns); 2465 if (!pPciDev) /* NULL is an alias for the default PCI device. */ 2466 pPciDev = pDevIns->apPciDevs[0]; 2467 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE); 2468 PDMPCIDEV_ASSERT_VALID_AND_REGISTERED(pDevIns, pPciDev); 2469 2470 #ifndef PDM_DO_NOT_RESPECT_PCI_BM_BIT 1010 2471 /* 1011 * Validate input and resolve defaults.2472 * Just check the busmaster setting here and forward the request to the generic read helper. 1012 2473 */ 1013 AssertPtr(pfnRead); 1014 AssertPtr(pfnWrite); 1015 AssertPtrNull(ppfnReadOld); 1016 AssertPtrNull(ppfnWriteOld); 1017 AssertPtrNull(pPciDev); 1018 1019 AssertFailed(); 1020 1021 LogFlow(("pdmR3DevHlp_PCISetConfigCallbacks: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance)); 1022 } 1023 1024 1025 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIPhysRead} */ 1026 static DECLCALLBACK(int) pdmR3DevHlp_PCIPhysRead(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead) 1027 { 1028 PDMDEV_ASSERT_DEVINS(pDevIns); 1029 RT_NOREF(pPciDev); 1030 return pDevIns->pHlpR3->pfnPhysRead(pDevIns, GCPhys, pvBuf, cbRead); 2474 if (PCIDevIsBusmaster(pPciDev)) 2475 { /* likely */ } 2476 else 2477 { 2478 Log(("pdmR3DevHlp_PCIPhysRead: caller='%s'/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbRead=%#zx\n", 2479 pDevIns->pReg->szName, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbRead)); 2480 memset(pvBuf, 0xff, cbRead); 2481 return VERR_PDM_NOT_PCI_BUS_MASTER; 2482 } 2483 #endif 2484 2485 int rc = VERR_NOT_IMPLEMENTED; 2486 AssertFailed(); 2487 return rc; 1031 2488 } 1032 2489 … … 1037 2494 { 1038 2495 PDMDEV_ASSERT_DEVINS(pDevIns); 1039 RT_NOREF(pPciDev); 1040 return pDevIns->pHlpR3->pfnPhysWrite(pDevIns, GCPhys, pvBuf, cbWrite); 2496 if (!pPciDev) /* NULL is an alias for the default PCI device. */ 2497 pPciDev = pDevIns->apPciDevs[0]; 2498 AssertReturn(pPciDev, VERR_PDM_NOT_PCI_DEVICE); 2499 PDMPCIDEV_ASSERT_VALID_AND_REGISTERED(pDevIns, pPciDev); 2500 2501 #ifndef PDM_DO_NOT_RESPECT_PCI_BM_BIT 2502 /* 2503 * Just check the busmaster setting here and forward the request to the generic read helper. 2504 */ 2505 if (PCIDevIsBusmaster(pPciDev)) 2506 { /* likely */ } 2507 else 2508 { 2509 Log(("pdmR3DevHlp_PCIPhysWrite: caller='%s'/%d: returns %Rrc - Not bus master! GCPhys=%RGp cbWrite=%#zx\n", 2510 pDevIns->pReg->szName, pDevIns->iInstance, VERR_PDM_NOT_PCI_BUS_MASTER, GCPhys, cbWrite)); 2511 return VERR_PDM_NOT_PCI_BUS_MASTER; 2512 } 2513 #endif 2514 2515 RT_NOREF(GCPhys, pvBuf, cbWrite); 2516 int rc = VERR_NOT_IMPLEMENTED; 2517 AssertFailed(); 2518 return rc; 1041 2519 } 1042 2520 … … 1046 2524 { 1047 2525 PDMDEV_ASSERT_DEVINS(pDevIns); 2526 if (!pPciDev) /* NULL is an alias for the default PCI device. */ 2527 pPciDev = pDevIns->apPciDevs[0]; 2528 AssertReturnVoid(pPciDev); 1048 2529 LogFlow(("pdmR3DevHlp_PCISetIrq: caller='%s'/%d: pPciDev=%p:{%#x} iIrq=%d iLevel=%d\n", 1049 2530 pDevIns->pReg->szName, pDevIns->iInstance, pPciDev, pPciDev->uDevFn, iIrq, iLevel)); 1050 2531 PDMPCIDEV_ASSERT_VALID_AND_REGISTERED(pDevIns, pPciDev); 2532 2533 RT_NOREF(iIrq, iLevel); 1051 2534 AssertFailed(); 1052 2535 … … 1068 2551 LogFlow(("pdmR3DevHlp_ISASetIrq: caller='%s'/%d: iIrq=%d iLevel=%d\n", pDevIns->pReg->szName, pDevIns->iInstance, iIrq, iLevel)); 1069 2552 1070 //AssertFailed(); 2553 /* 2554 * Validate input. 2555 */ 2556 Assert(iIrq < 16); 2557 Assert((uint32_t)iLevel <= PDM_IRQ_LEVEL_FLIP_FLOP); 2558 2559 AssertFailed(); 1071 2560 1072 2561 LogFlow(("pdmR3DevHlp_ISASetIrq: caller='%s'/%d: returns void\n", pDevIns->pReg->szName, pDevIns->iInstance)); … … 1092 2581 Assert(GCPhys != 0); 1093 2582 Assert(uValue != 0); 2583 1094 2584 AssertFailed(); 1095 2585 … … 1105 2595 pDevIns->pReg->szName, pDevIns->iInstance, iLun, pBaseInterface, ppBaseInterface, pszDesc, pszDesc)); 1106 2596 1107 /** @todo */ 1108 int rc = VERR_PDM_NO_ATTACHED_DRIVER; 1109 //AssertFailed(); 2597 int rc = VERR_NOT_IMPLEMENTED; 2598 AssertFailed(); 1110 2599 1111 2600 LogFlow(("pdmR3DevHlp_DriverAttach: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 1130 2619 1131 2620 2621 /** @interface_method_impl{PDMDEVHLPR3,pfnDriverReconfigure} */ 2622 static DECLCALLBACK(int) pdmR3DevHlp_DriverReconfigure(PPDMDEVINS pDevIns, uint32_t iLun, uint32_t cDepth, 2623 const char * const *papszDrivers, PCFGMNODE *papConfigs, uint32_t fFlags) 2624 { 2625 PDMDEV_ASSERT_DEVINS(pDevIns); 2626 LogFlow(("pdmR3DevHlp_DriverReconfigure: caller='%s'/%d: iLun=%u cDepth=%u fFlags=%#x\n", 2627 pDevIns->pReg->szName, pDevIns->iInstance, iLun, cDepth, fFlags)); 2628 2629 /* 2630 * Validate input. 2631 */ 2632 AssertReturn(cDepth <= 8, VERR_INVALID_PARAMETER); 2633 AssertPtrReturn(papszDrivers, VERR_INVALID_POINTER); 2634 AssertPtrNullReturn(papConfigs, VERR_INVALID_POINTER); 2635 for (uint32_t i = 0; i < cDepth; i++) 2636 { 2637 AssertPtrReturn(papszDrivers[i], VERR_INVALID_POINTER); 2638 size_t cchDriver = strlen(papszDrivers[i]); 2639 AssertPtrReturn(cchDriver > 0 && cchDriver < RT_SIZEOFMEMB(PDMDRVREG, szName), VERR_OUT_OF_RANGE); 2640 2641 if (papConfigs) 2642 AssertPtrNullReturn(papConfigs[i], VERR_INVALID_POINTER); 2643 } 2644 AssertReturn(fFlags == 0, VERR_INVALID_FLAGS); 2645 2646 int rc = VERR_NOT_IMPLEMENTED; 2647 AssertFailed(); 2648 2649 LogFlow(("pdmR3DevHlp_DriverReconfigure: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2650 return rc; 2651 } 2652 2653 2654 /** @interface_method_impl{PDMDEVHLPR3,pfnQueueCreatePtr} */ 2655 static DECLCALLBACK(int) pdmR3DevHlp_QueueCreatePtr(PPDMDEVINS pDevIns, size_t cbItem, uint32_t cItems, uint32_t cMilliesInterval, 2656 PFNPDMQUEUEDEV pfnCallback, bool fRZEnabled, const char *pszName, PPDMQUEUE *ppQueue) 2657 { 2658 PDMDEV_ASSERT_DEVINS(pDevIns); 2659 LogFlow(("pdmR3DevHlp_QueueCreatePtr: caller='%s'/%d: cbItem=%#x cItems=%#x cMilliesInterval=%u pfnCallback=%p fRZEnabled=%RTbool pszName=%p:{%s} ppQueue=%p\n", 2660 pDevIns->pReg->szName, pDevIns->iInstance, cbItem, cItems, cMilliesInterval, pfnCallback, fRZEnabled, pszName, pszName, ppQueue)); 2661 2662 int rc = VERR_NOT_IMPLEMENTED; 2663 AssertFailed(); 2664 2665 LogFlow(("pdmR3DevHlp_QueueCreatePtr: caller='%s'/%d: returns %Rrc *ppQueue=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *ppQueue)); 2666 return rc; 2667 } 2668 2669 1132 2670 /** @interface_method_impl{PDMDEVHLPR3,pfnQueueCreate} */ 1133 2671 static DECLCALLBACK(int) pdmR3DevHlp_QueueCreate(PPDMDEVINS pDevIns, size_t cbItem, uint32_t cItems, uint32_t cMilliesInterval, 1134 PFNPDMQUEUEDEV pfnCallback, bool fRZEnabled, const char *pszName, PPDMQUEUE *ppQueue) 1135 { 1136 PDMDEV_ASSERT_DEVINS(pDevIns); 1137 LogFlow(("pdmR3DevHlp_QueueCreate: caller='%s'/%d: cbItem=%#x cItems=%#x cMilliesInterval=%u pfnCallback=%p fRZEnabled=%RTbool pszName=%p:{%s} ppQueue=%p\n", 1138 pDevIns->pReg->szName, pDevIns->iInstance, cbItem, cItems, cMilliesInterval, pfnCallback, fRZEnabled, pszName, pszName, ppQueue)); 1139 1140 int rc = VERR_NOT_IMPLEMENTED; 1141 AssertFailed(); 1142 1143 LogFlow(("pdmR3DevHlp_QueueCreate: caller='%s'/%d: returns %Rrc *ppQueue=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *ppQueue)); 1144 return rc; 2672 PFNPDMQUEUEDEV pfnCallback, bool fRZEnabled, const char *pszName, 2673 PDMQUEUEHANDLE *phQueue) 2674 { 2675 PDMDEV_ASSERT_DEVINS(pDevIns); 2676 LogFlow(("pdmR3DevHlp_QueueCreate: caller='%s'/%d: cbItem=%#x cItems=%#x cMilliesInterval=%u pfnCallback=%p fRZEnabled=%RTbool pszName=%p:{%s} phQueue=%p\n", 2677 pDevIns->pReg->szName, pDevIns->iInstance, cbItem, cItems, cMilliesInterval, pfnCallback, fRZEnabled, pszName, pszName, phQueue)); 2678 2679 int rc = VERR_NOT_IMPLEMENTED; 2680 AssertFailed(); 2681 2682 LogFlow(("pdmR3DevHlp_QueueCreate: caller='%s'/%d: returns %Rrc *ppQueue=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *phQueue)); 2683 return rc; 2684 } 2685 2686 2687 /** @interface_method_impl{PDMDEVHLPR3,pfnQueueToPtr} */ 2688 static DECLCALLBACK(PPDMQUEUE) pdmR3DevHlp_QueueToPtr(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue) 2689 { 2690 PDMDEV_ASSERT_DEVINS(pDevIns); 2691 RT_NOREF(pDevIns); 2692 return (PPDMQUEUE)hQueue; 2693 } 2694 2695 2696 /** @interface_method_impl{PDMDEVHLPR3,pfnQueueAlloc} */ 2697 static DECLCALLBACK(PPDMQUEUEITEMCORE) pdmR3DevHlp_QueueAlloc(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue) 2698 { 2699 RT_NOREF(pDevIns, hQueue); 2700 AssertFailed(); 2701 return NULL; 2702 } 2703 2704 2705 /** @interface_method_impl{PDMDEVHLPR3,pfnQueueInsert} */ 2706 static DECLCALLBACK(void) pdmR3DevHlp_QueueInsert(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue, PPDMQUEUEITEMCORE pItem) 2707 { 2708 RT_NOREF(pDevIns, hQueue, pItem); 2709 AssertFailed(); 2710 } 2711 2712 2713 /** @interface_method_impl{PDMDEVHLPR3,pfnQueueInsertEx} */ 2714 static DECLCALLBACK(void) pdmR3DevHlp_QueueInsertEx(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue, PPDMQUEUEITEMCORE pItem, 2715 uint64_t cNanoMaxDelay) 2716 { 2717 RT_NOREF(pDevIns, hQueue, pItem, cNanoMaxDelay); 2718 AssertFailed(); 2719 } 2720 2721 2722 /** @interface_method_impl{PDMDEVHLPR3,pfnQueueFlushIfNecessary} */ 2723 static DECLCALLBACK(bool) pdmR3DevHlp_QueueFlushIfNecessary(PPDMDEVINS pDevIns, PDMQUEUEHANDLE hQueue) 2724 { 2725 RT_NOREF(pDevIns, hQueue); 2726 AssertFailed(); 2727 return false; 2728 } 2729 2730 2731 /** @interface_method_impl{PDMDEVHLPR3,pfnTaskCreate} */ 2732 static DECLCALLBACK(int) pdmR3DevHlp_TaskCreate(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszName, 2733 PFNPDMTASKDEV pfnCallback, void *pvUser, PDMTASKHANDLE *phTask) 2734 { 2735 PDMDEV_ASSERT_DEVINS(pDevIns); 2736 LogFlow(("pdmR3DevHlp_TaskTrigger: caller='%s'/%d: pfnCallback=%p fFlags=%#x pszName=%p:{%s} phTask=%p\n", 2737 pDevIns->pReg->szName, pDevIns->iInstance, pfnCallback, fFlags, pszName, pszName, phTask)); 2738 2739 RT_NOREF(pDevIns, fFlags, pszName, pfnCallback, pvUser, phTask); 2740 int rc = VERR_NOT_IMPLEMENTED; 2741 AssertFailed(); 2742 2743 LogFlow(("pdmR3DevHlp_TaskTrigger: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2744 return rc; 2745 } 2746 2747 2748 /** @interface_method_impl{PDMDEVHLPR3,pfnTaskTrigger} */ 2749 static DECLCALLBACK(int) pdmR3DevHlp_TaskTrigger(PPDMDEVINS pDevIns, PDMTASKHANDLE hTask) 2750 { 2751 PDMDEV_ASSERT_DEVINS(pDevIns); 2752 LogFlow(("pdmR3DevHlp_TaskTrigger: caller='%s'/%d: hTask=%RU64\n", pDevIns->pReg->szName, pDevIns->iInstance, hTask)); 2753 2754 RT_NOREF(pDevIns, hTask); 2755 int rc = VERR_NOT_IMPLEMENTED; 2756 AssertFailed(); 2757 2758 LogFlow(("pdmR3DevHlp_TaskTrigger: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2759 return rc; 2760 } 2761 2762 2763 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventCreate} */ 2764 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventCreate(PPDMDEVINS pDevIns, PSUPSEMEVENT phEvent) 2765 { 2766 PDMDEV_ASSERT_DEVINS(pDevIns); 2767 LogFlow(("pdmR3DevHlp_SUPSemEventCreate: caller='%s'/%d: phEvent=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, phEvent)); 2768 2769 RT_NOREF(pDevIns, phEvent); 2770 int rc = VERR_NOT_IMPLEMENTED; 2771 AssertFailed(); 2772 2773 LogFlow(("pdmR3DevHlp_SUPSemEventCreate: caller='%s'/%d: returns %Rrc *phEvent=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *phEvent)); 2774 return rc; 2775 } 2776 2777 2778 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventClose} */ 2779 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventClose(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent) 2780 { 2781 PDMDEV_ASSERT_DEVINS(pDevIns); 2782 LogFlow(("pdmR3DevHlp_SUPSemEventClose: caller='%s'/%d: hEvent=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEvent)); 2783 2784 RT_NOREF(pDevIns, hEvent); 2785 int rc = VERR_NOT_IMPLEMENTED; 2786 AssertFailed(); 2787 2788 LogFlow(("pdmR3DevHlp_SUPSemEventClose: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2789 return rc; 2790 } 2791 2792 2793 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventSignal} */ 2794 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventSignal(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent) 2795 { 2796 PDMDEV_ASSERT_DEVINS(pDevIns); 2797 LogFlow(("pdmR3DevHlp_SUPSemEventSignal: caller='%s'/%d: hEvent=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEvent)); 2798 2799 RT_NOREF(pDevIns, hEvent); 2800 int rc = VERR_NOT_IMPLEMENTED; 2801 AssertFailed(); 2802 2803 LogFlow(("pdmR3DevHlp_SUPSemEventSignal: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2804 return rc; 2805 } 2806 2807 2808 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventWaitNoResume} */ 2809 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventWaitNoResume(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent, uint32_t cMillies) 2810 { 2811 PDMDEV_ASSERT_DEVINS(pDevIns); 2812 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNoResume: caller='%s'/%d: hEvent=%p cNsTimeout=%RU32\n", 2813 pDevIns->pReg->szName, pDevIns->iInstance, hEvent, cMillies)); 2814 2815 RT_NOREF(pDevIns, hEvent, cMillies); 2816 int rc = VERR_NOT_IMPLEMENTED; 2817 AssertFailed(); 2818 2819 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNoResume: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2820 return rc; 2821 } 2822 2823 2824 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventWaitNsAbsIntr} */ 2825 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventWaitNsAbsIntr(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent, uint64_t uNsTimeout) 2826 { 2827 PDMDEV_ASSERT_DEVINS(pDevIns); 2828 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNsAbsIntr: caller='%s'/%d: hEvent=%p uNsTimeout=%RU64\n", 2829 pDevIns->pReg->szName, pDevIns->iInstance, hEvent, uNsTimeout)); 2830 2831 RT_NOREF(pDevIns, hEvent, uNsTimeout); 2832 int rc = VERR_NOT_IMPLEMENTED; 2833 AssertFailed(); 2834 2835 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNsAbsIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2836 return rc; 2837 } 2838 2839 2840 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventWaitNsRelIntr} */ 2841 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventWaitNsRelIntr(PPDMDEVINS pDevIns, SUPSEMEVENT hEvent, uint64_t cNsTimeout) 2842 { 2843 PDMDEV_ASSERT_DEVINS(pDevIns); 2844 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNsRelIntr: caller='%s'/%d: hEvent=%p cNsTimeout=%RU64\n", 2845 pDevIns->pReg->szName, pDevIns->iInstance, hEvent, cNsTimeout)); 2846 2847 RT_NOREF(pDevIns, hEvent, cNsTimeout); 2848 int rc = VERR_NOT_IMPLEMENTED; 2849 AssertFailed(); 2850 2851 LogFlow(("pdmR3DevHlp_SUPSemEventWaitNsRelIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2852 return rc; 2853 } 2854 2855 2856 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventGetResolution} */ 2857 static DECLCALLBACK(uint32_t) pdmR3DevHlp_SUPSemEventGetResolution(PPDMDEVINS pDevIns) 2858 { 2859 PDMDEV_ASSERT_DEVINS(pDevIns); 2860 LogFlow(("pdmR3DevHlp_SUPSemEventGetResolution: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance)); 2861 2862 RT_NOREF(pDevIns); 2863 uint32_t cNsResolution = 0; 2864 AssertFailed(); 2865 2866 LogFlow(("pdmR3DevHlp_SUPSemEventGetResolution: caller='%s'/%d: returns %u\n", pDevIns->pReg->szName, pDevIns->iInstance, cNsResolution)); 2867 return cNsResolution; 2868 } 2869 2870 2871 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiCreate} */ 2872 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiCreate(PPDMDEVINS pDevIns, PSUPSEMEVENTMULTI phEventMulti) 2873 { 2874 PDMDEV_ASSERT_DEVINS(pDevIns); 2875 LogFlow(("pdmR3DevHlp_SUPSemEventMultiCreate: caller='%s'/%d: phEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, phEventMulti)); 2876 2877 RT_NOREF(pDevIns, phEventMulti); 2878 int rc = VERR_NOT_IMPLEMENTED; 2879 AssertFailed(); 2880 2881 LogFlow(("pdmR3DevHlp_SUPSemEventMultiCreate: caller='%s'/%d: returns %Rrc *phEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *phEventMulti)); 2882 return rc; 2883 } 2884 2885 2886 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiClose} */ 2887 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiClose(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti) 2888 { 2889 PDMDEV_ASSERT_DEVINS(pDevIns); 2890 LogFlow(("pdmR3DevHlp_SUPSemEventMultiClose: caller='%s'/%d: hEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti)); 2891 2892 RT_NOREF(pDevIns, hEventMulti); 2893 int rc = VERR_NOT_IMPLEMENTED; 2894 AssertFailed(); 2895 2896 LogFlow(("pdmR3DevHlp_SUPSemEventMultiClose: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2897 return rc; 2898 } 2899 2900 2901 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiSignal} */ 2902 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiSignal(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti) 2903 { 2904 PDMDEV_ASSERT_DEVINS(pDevIns); 2905 LogFlow(("pdmR3DevHlp_SUPSemEventMultiSignal: caller='%s'/%d: hEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti)); 2906 2907 RT_NOREF(pDevIns, hEventMulti); 2908 int rc = VERR_NOT_IMPLEMENTED; 2909 AssertFailed(); 2910 2911 LogFlow(("pdmR3DevHlp_SUPSemEventMultiSignal: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2912 return rc; 2913 } 2914 2915 2916 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiReset} */ 2917 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiReset(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti) 2918 { 2919 PDMDEV_ASSERT_DEVINS(pDevIns); 2920 LogFlow(("pdmR3DevHlp_SUPSemEventMultiReset: caller='%s'/%d: hEventMulti=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti)); 2921 2922 RT_NOREF(pDevIns, hEventMulti); 2923 int rc = VERR_NOT_IMPLEMENTED; 2924 AssertFailed(); 2925 2926 LogFlow(("pdmR3DevHlp_SUPSemEventMultiReset: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2927 return rc; 2928 } 2929 2930 2931 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiWaitNoResume} */ 2932 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiWaitNoResume(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti, 2933 uint32_t cMillies) 2934 { 2935 PDMDEV_ASSERT_DEVINS(pDevIns); 2936 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNoResume: caller='%s'/%d: hEventMulti=%p cMillies=%RU32\n", 2937 pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti, cMillies)); 2938 2939 RT_NOREF(pDevIns, hEventMulti, cMillies); 2940 int rc = VERR_NOT_IMPLEMENTED; 2941 AssertFailed(); 2942 2943 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNoResume: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2944 return rc; 2945 } 2946 2947 2948 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiWaitNsAbsIntr} */ 2949 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiWaitNsAbsIntr(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti, 2950 uint64_t uNsTimeout) 2951 { 2952 PDMDEV_ASSERT_DEVINS(pDevIns); 2953 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNsAbsIntr: caller='%s'/%d: hEventMulti=%p uNsTimeout=%RU64\n", 2954 pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti, uNsTimeout)); 2955 2956 RT_NOREF(pDevIns, hEventMulti, uNsTimeout); 2957 int rc = VERR_NOT_IMPLEMENTED; 2958 AssertFailed(); 2959 2960 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNsAbsIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2961 return rc; 2962 } 2963 2964 2965 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiWaitNsRelIntr} */ 2966 static DECLCALLBACK(int) pdmR3DevHlp_SUPSemEventMultiWaitNsRelIntr(PPDMDEVINS pDevIns, SUPSEMEVENTMULTI hEventMulti, 2967 uint64_t cNsTimeout) 2968 { 2969 PDMDEV_ASSERT_DEVINS(pDevIns); 2970 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNsRelIntr: caller='%s'/%d: hEventMulti=%p cNsTimeout=%RU64\n", 2971 pDevIns->pReg->szName, pDevIns->iInstance, hEventMulti, cNsTimeout)); 2972 2973 RT_NOREF(pDevIns, hEventMulti, cNsTimeout); 2974 int rc = VERR_NOT_IMPLEMENTED; 2975 AssertFailed(); 2976 2977 LogFlow(("pdmR3DevHlp_SUPSemEventMultiWaitNsRelIntr: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 2978 return rc; 2979 } 2980 2981 2982 /** @interface_method_impl{PDMDEVHLPR3,pfnSUPSemEventMultiGetResolution} */ 2983 static DECLCALLBACK(uint32_t) pdmR3DevHlp_SUPSemEventMultiGetResolution(PPDMDEVINS pDevIns) 2984 { 2985 PDMDEV_ASSERT_DEVINS(pDevIns); 2986 LogFlow(("pdmR3DevHlp_SUPSemEventMultiGetResolution: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance)); 2987 2988 uint32_t cNsResolution = 0; 2989 AssertFailed(); 2990 2991 LogFlow(("pdmR3DevHlp_SUPSemEventMultiGetResolution: caller='%s'/%d: returns %u\n", pDevIns->pReg->szName, pDevIns->iInstance, cNsResolution)); 2992 return cNsResolution; 1145 2993 } 1146 2994 … … 1154 3002 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect, pszNameFmt, pszNameFmt)); 1155 3003 1156 RT_NOREF(RT_SRC_POS_ARGS, pszNameFmt, pCritSect, va); 1157 int rc = RTCritSectInit(&pCritSect->s.CritSect); 1158 if (RT_SUCCESS(rc)) 1159 pCritSect->s.pVmmCallbacks = pDevIns->Internal.s.pVmmCallbacks; 3004 RT_NOREF(pDevIns, pCritSect, RT_SRC_POS_ARGS, pszNameFmt, va); 3005 int rc = VERR_NOT_IMPLEMENTED; 3006 AssertFailed(); 1160 3007 1161 3008 LogFlow(("pdmR3DevHlp_CritSectInit: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 1169 3016 PDMDEV_ASSERT_DEVINS(pDevIns); 1170 3017 1171 AssertFailed();1172 3018 PPDMCRITSECT pCritSect = NULL; 3019 AssertFailed(); 1173 3020 1174 3021 LogFlow(("pdmR3DevHlp_CritSectGetNop: caller='%s'/%d: return %p\n", … … 1184 3031 1185 3032 R0PTRTYPE(PPDMCRITSECT) pCritSect = 0; 1186 AssertFailed();1187 1188 3033 LogFlow(("pdmR3DevHlp_CritSectGetNopR0: caller='%s'/%d: return %RHv\n", 1189 3034 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect)); … … 1198 3043 1199 3044 RCPTRTYPE(PPDMCRITSECT) pCritSect = 0; 1200 AssertFailed();1201 1202 3045 LogFlow(("pdmR3DevHlp_CritSectGetNopRC: caller='%s'/%d: return %RRv\n", 1203 3046 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect)); … … 1217 3060 PDMDEV_ASSERT_DEVINS(pDevIns); 1218 3061 AssertPtrReturn(pCritSect, VERR_INVALID_POINTER); 1219 LogFlow(("pdmR3DevHlp_SetDeviceCritSect: caller='%s'/%d: pCritSect=%p\n", 1220 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect)); 1221 1222 /** @todo Implement default atomatic critical section. */ 1223 pDevIns->pCritSectRoR3 = pCritSect; 1224 1225 LogFlow(("pdmR3DevHlp_SetDeviceCritSect: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, VINF_SUCCESS)); 1226 return VINF_SUCCESS; 1227 } 1228 1229 1230 /** @interface_method_impl{PDMDEVHLPR3,pfnThreadCreate} */ 3062 3063 #if 0 3064 LogFlow(("pdmR3DevHlp_SetDeviceCritSect: caller='%s'/%d: pCritSect=%p (%s)\n", 3065 pDevIns->pReg->szName, pDevIns->iInstance, pCritSect, pCritSect->s.pszName)); 3066 #endif 3067 3068 int rc = VERR_NOT_IMPLEMENTED; 3069 AssertFailed(); 3070 3071 LogFlow(("pdmR3DevHlp_SetDeviceCritSect: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 3072 return rc; 3073 } 3074 3075 3076 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectYield} */ 3077 static DECLCALLBACK(bool) pdmR3DevHlp_CritSectYield(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect) 3078 { 3079 PDMDEV_ASSERT_DEVINS(pDevIns); 3080 3081 RT_NOREF(pDevIns, pCritSect); 3082 AssertFailed(); 3083 return false; 3084 } 3085 3086 3087 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectEnter} */ 3088 static DECLCALLBACK(int) pdmR3DevHlp_CritSectEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy) 3089 { 3090 PDMDEV_ASSERT_DEVINS(pDevIns); 3091 3092 RT_NOREF(pDevIns, pCritSect, rcBusy); 3093 int rc = VERR_NOT_IMPLEMENTED; 3094 AssertFailed(); 3095 return rc; 3096 } 3097 3098 3099 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectEnterDebug} */ 3100 static DECLCALLBACK(int) pdmR3DevHlp_CritSectEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL) 3101 { 3102 PDMDEV_ASSERT_DEVINS(pDevIns); 3103 3104 RT_NOREF(pDevIns, pCritSect, rcBusy, uId, RT_SRC_POS_ARGS); 3105 int rc = VERR_NOT_IMPLEMENTED; 3106 AssertFailed(); 3107 return rc; 3108 } 3109 3110 3111 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectTryEnter} */ 3112 static DECLCALLBACK(int) pdmR3DevHlp_CritSectTryEnter(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect) 3113 { 3114 PDMDEV_ASSERT_DEVINS(pDevIns); 3115 3116 RT_NOREF(pDevIns, pCritSect); 3117 int rc = VERR_NOT_IMPLEMENTED; 3118 AssertFailed(); 3119 return rc; 3120 } 3121 3122 3123 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectTryEnterDebug} */ 3124 static DECLCALLBACK(int) pdmR3DevHlp_CritSectTryEnterDebug(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL) 3125 { 3126 PDMDEV_ASSERT_DEVINS(pDevIns); 3127 3128 RT_NOREF(pDevIns, pCritSect, uId, RT_SRC_POS_ARGS); 3129 int rc = VERR_NOT_IMPLEMENTED; 3130 AssertFailed(); 3131 return rc; 3132 } 3133 3134 3135 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectLeave} */ 3136 static DECLCALLBACK(int) pdmR3DevHlp_CritSectLeave(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect) 3137 { 3138 PDMDEV_ASSERT_DEVINS(pDevIns); 3139 3140 RT_NOREF(pDevIns, pCritSect); 3141 int rc = VERR_NOT_IMPLEMENTED; 3142 AssertFailed(); 3143 return rc; 3144 } 3145 3146 3147 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectIsOwner} */ 3148 static DECLCALLBACK(bool) pdmR3DevHlp_CritSectIsOwner(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect) 3149 { 3150 PDMDEV_ASSERT_DEVINS(pDevIns); 3151 3152 RT_NOREF(pDevIns, pCritSect); 3153 AssertFailed(); 3154 return false; 3155 } 3156 3157 3158 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectIsInitialized} */ 3159 static DECLCALLBACK(bool) pdmR3DevHlp_CritSectIsInitialized(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect) 3160 { 3161 PDMDEV_ASSERT_DEVINS(pDevIns); 3162 3163 RT_NOREF(pDevIns, pCritSect); 3164 AssertFailed(); 3165 return false; 3166 } 3167 3168 3169 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectHasWaiters} */ 3170 static DECLCALLBACK(bool) pdmR3DevHlp_CritSectHasWaiters(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect) 3171 { 3172 PDMDEV_ASSERT_DEVINS(pDevIns); 3173 RT_NOREF(pDevIns, pCritSect); 3174 AssertFailed(); 3175 return false; 3176 } 3177 3178 3179 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectGetRecursion} */ 3180 static DECLCALLBACK(uint32_t) pdmR3DevHlp_CritSectGetRecursion(PPDMDEVINS pDevIns, PCPDMCRITSECT pCritSect) 3181 { 3182 PDMDEV_ASSERT_DEVINS(pDevIns); 3183 3184 RT_NOREF(pDevIns, pCritSect); 3185 AssertFailed(); 3186 return 0; 3187 } 3188 3189 3190 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectScheduleExitEvent} */ 3191 static DECLCALLBACK(int) pdmR3DevHlp_CritSectScheduleExitEvent(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, 3192 SUPSEMEVENT hEventToSignal) 3193 { 3194 PDMDEV_ASSERT_DEVINS(pDevIns); 3195 3196 RT_NOREF(pDevIns, pCritSect, hEventToSignal); 3197 int rc = VERR_NOT_IMPLEMENTED; 3198 AssertFailed(); 3199 return rc; 3200 } 3201 3202 3203 /** @interface_method_impl{PDMDEVHLPR3,pfnCritSectDelete} */ 3204 static DECLCALLBACK(int) pdmR3DevHlp_CritSectDelete(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect) 3205 { 3206 PDMDEV_ASSERT_DEVINS(pDevIns); 3207 3208 RT_NOREF(pDevIns, pCritSect); 3209 int rc = VERR_NOT_IMPLEMENTED; 3210 AssertFailed(); 3211 return rc; 3212 } 3213 3214 1231 3215 static DECLCALLBACK(int) pdmR3DevHlp_ThreadCreate(PPDMDEVINS pDevIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADDEV pfnThread, 1232 3216 PFNPDMTHREADWAKEUPDEV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName) … … 1236 3220 pDevIns->pReg->szName, pDevIns->iInstance, ppThread, pvUser, pfnThread, pfnWakeup, cbStack, enmType, pszName, pszName)); 1237 3221 3222 RT_NOREF(ppThread, pvUser, pfnThread, pfnWakeup, cbStack, enmType, pszName); 1238 3223 int rc = VERR_NOT_IMPLEMENTED; 1239 3224 AssertFailed(); … … 1245 3230 1246 3231 3232 static DECLCALLBACK(int) pdmR3DevHlp_ThreadDestroy(PPDMTHREAD pThread, int *pRcThread) 3233 { 3234 RT_NOREF(pThread, pRcThread); 3235 int rc = VERR_NOT_IMPLEMENTED; 3236 AssertFailed(); 3237 return rc; 3238 } 3239 3240 3241 static DECLCALLBACK(int) pdmR3DevHlp_ThreadIAmSuspending(PPDMTHREAD pThread) 3242 { 3243 RT_NOREF(pThread); 3244 int rc = VERR_NOT_IMPLEMENTED; 3245 AssertFailed(); 3246 return rc; 3247 } 3248 3249 3250 static DECLCALLBACK(int) pdmR3DevHlp_ThreadIamRunning(PPDMTHREAD pThread) 3251 { 3252 RT_NOREF(pThread); 3253 int rc = VERR_NOT_IMPLEMENTED; 3254 AssertFailed(); 3255 return rc; 3256 } 3257 3258 3259 static DECLCALLBACK(int) pdmR3DevHlp_ThreadSleep(PPDMTHREAD pThread, RTMSINTERVAL cMillies) 3260 { 3261 RT_NOREF(pThread, cMillies); 3262 int rc = VERR_NOT_IMPLEMENTED; 3263 AssertFailed(); 3264 return rc; 3265 } 3266 3267 3268 static DECLCALLBACK(int) pdmR3DevHlp_ThreadSuspend(PPDMTHREAD pThread) 3269 { 3270 RT_NOREF(pThread); 3271 int rc = VERR_NOT_IMPLEMENTED; 3272 AssertFailed(); 3273 return rc; 3274 } 3275 3276 3277 static DECLCALLBACK(int) pdmR3DevHlp_ThreadResume(PPDMTHREAD pThread) 3278 { 3279 RT_NOREF(pThread); 3280 int rc = VERR_NOT_IMPLEMENTED; 3281 AssertFailed(); 3282 return rc; 3283 } 3284 3285 1247 3286 /** @interface_method_impl{PDMDEVHLPR3,pfnSetAsyncNotification} */ 1248 3287 static DECLCALLBACK(int) pdmR3DevHlp_SetAsyncNotification(PPDMDEVINS pDevIns, PFNPDMDEVASYNCNOTIFY pfnAsyncNotify) … … 1252 3291 1253 3292 int rc = VERR_NOT_IMPLEMENTED; 3293 AssertStmt(pfnAsyncNotify, rc = VERR_INVALID_PARAMETER); 3294 #if 0 3295 AssertStmt(!pDevIns->Internal.s.pfnAsyncNotify, rc = VERR_WRONG_ORDER); 3296 AssertStmt(pDevIns->Internal.s.fIntFlags & (PDMDEVINSINT_FLAGS_SUSPENDED | PDMDEVINSINT_FLAGS_RESET), rc = VERR_WRONG_ORDER); 3297 #endif 3298 1254 3299 AssertFailed(); 1255 3300 … … 1263 3308 { 1264 3309 PDMDEV_ASSERT_DEVINS(pDevIns); 3310 1265 3311 AssertFailed(); 1266 3312 } … … 1275 3321 pRtcReg->pfnWrite, ppRtcHlp)); 1276 3322 3323 /* 3324 * Validate input. 3325 */ 3326 if (pRtcReg->u32Version != PDM_RTCREG_VERSION) 3327 { 3328 AssertMsgFailed(("u32Version=%#x expected %#x\n", pRtcReg->u32Version, 3329 PDM_RTCREG_VERSION)); 3330 LogFlow(("pdmR3DevHlp_RTCRegister: caller='%s'/%d: returns %Rrc (version)\n", 3331 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3332 return VERR_INVALID_PARAMETER; 3333 } 3334 if ( !pRtcReg->pfnWrite 3335 || !pRtcReg->pfnRead) 3336 { 3337 Assert(pRtcReg->pfnWrite); 3338 Assert(pRtcReg->pfnRead); 3339 LogFlow(("pdmR3DevHlp_RTCRegister: caller='%s'/%d: returns %Rrc (callbacks)\n", 3340 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3341 return VERR_INVALID_PARAMETER; 3342 } 3343 3344 if (!ppRtcHlp) 3345 { 3346 Assert(ppRtcHlp); 3347 LogFlow(("pdmR3DevHlp_RTCRegister: caller='%s'/%d: returns %Rrc (ppRtcHlp)\n", 3348 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3349 return VERR_INVALID_PARAMETER; 3350 } 3351 1277 3352 int rc = VERR_NOT_IMPLEMENTED; 1278 3353 AssertFailed(); … … 1288 3363 { 1289 3364 PDMDEV_ASSERT_DEVINS(pDevIns); 1290 1291 RT_NOREF(uChannel, pfnTransferHandler, pvUser); 3365 LogFlow(("pdmR3DevHlp_DMARegister: caller='%s'/%d: uChannel=%d pfnTransferHandler=%p pvUser=%p\n", 3366 pDevIns->pReg->szName, pDevIns->iInstance, uChannel, pfnTransferHandler, pvUser)); 3367 1292 3368 int rc = VERR_NOT_IMPLEMENTED; 1293 3369 AssertFailed(); … … 1306 3382 pDevIns->pReg->szName, pDevIns->iInstance, uChannel, pvBuffer, off, cbBlock, pcbRead)); 1307 3383 1308 RT_NOREF(uChannel, pvBuffer, off, cbBlock, pcbRead);1309 3384 int rc = VERR_NOT_IMPLEMENTED; 1310 3385 AssertFailed(); … … 1323 3398 pDevIns->pReg->szName, pDevIns->iInstance, uChannel, pvBuffer, off, cbBlock, pcbWritten)); 1324 3399 1325 RT_NOREF(uChannel, pvBuffer, off, cbBlock, pcbWritten);1326 3400 int rc = VERR_NOT_IMPLEMENTED; 1327 3401 AssertFailed(); … … 1340 3414 pDevIns->pReg->szName, pDevIns->iInstance, uChannel, uLevel)); 1341 3415 1342 RT_NOREF(uChannel, uLevel);1343 3416 int rc = VERR_NOT_IMPLEMENTED; 1344 3417 AssertFailed(); … … 1356 3429 pDevIns->pReg->szName, pDevIns->iInstance, uChannel)); 1357 3430 1358 uint8_t u8Mode = 0;3431 uint8_t u8Mode = (3 << 2); /* Invalid mode. */ 1359 3432 AssertFailed(); 1360 3433 … … 1411 3484 { 1412 3485 PDMDEV_ASSERT_DEVINS(pDevIns); 1413 RT_NOREF(pszFile, iLine, pszFunction); 1414 AssertFailed(); 3486 3487 char szMsg[100]; 3488 RTStrPrintf(szMsg, sizeof(szMsg), "AssertEMT '%s'/%d\n", pDevIns->pReg->szName, pDevIns->iInstance); 3489 RTAssertMsg1Weak(szMsg, iLine, pszFile, pszFunction); 3490 AssertBreakpoint(); 1415 3491 return false; 1416 3492 } … … 1421 3497 { 1422 3498 PDMDEV_ASSERT_DEVINS(pDevIns); 1423 RT_NOREF(pszFile, iLine, pszFunction); 1424 AssertFailed(); 3499 3500 char szMsg[100]; 3501 RTStrPrintf(szMsg, sizeof(szMsg), "AssertOther '%s'/%d\n", pDevIns->pReg->szName, pDevIns->iInstance); 3502 RTAssertMsg1Weak(szMsg, iLine, pszFile, pszFunction); 3503 AssertBreakpoint(); 1425 3504 return false; 1426 3505 } … … 1481 3560 { 1482 3561 PDMDEV_ASSERT_DEVINS(pDevIns); 3562 1483 3563 VMSUSPENDREASON enmReason = VMSUSPENDREASON_INVALID; 1484 3564 AssertFailed(); 3565 1485 3566 LogFlow(("pdmR3DevHlp_VMGetSuspendReason: caller='%s'/%d: returns %d\n", 1486 3567 pDevIns->pReg->szName, pDevIns->iInstance, enmReason)); … … 1493 3574 { 1494 3575 PDMDEV_ASSERT_DEVINS(pDevIns); 3576 1495 3577 VMRESUMEREASON enmReason = VMRESUMEREASON_INVALID; 1496 3578 AssertFailed(); 3579 1497 3580 LogFlow(("pdmR3DevHlp_VMGetResumeReason: caller='%s'/%d: returns %d\n", 1498 3581 pDevIns->pReg->szName, pDevIns->iInstance, enmReason)); … … 1505 3588 { 1506 3589 PDMDEV_ASSERT_DEVINS(pDevIns); 3590 1507 3591 AssertFailed(); 1508 3592 LogFlow(("pdmR3DevHlp_GetUVM: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, NULL)); … … 1512 3596 1513 3597 /** @interface_method_impl{PDMDEVHLPR3,pfnGetVM} */ 1514 static DECLCALLBACK(PVM ) pdmR3DevHlp_GetVM(PPDMDEVINS pDevIns)1515 { 1516 PDMDEV_ASSERT_DEVINS(pDevIns); 1517 PTSTDEVDUTINT pThis = TSTDEV_PDMDEVINS_2_DUT(pDevIns); 1518 PVM pVM = pThis->pVm;3598 static DECLCALLBACK(PVMCC) pdmR3DevHlp_GetVM(PPDMDEVINS pDevIns) 3599 { 3600 PDMDEV_ASSERT_DEVINS(pDevIns); 3601 3602 AssertFailed(); 1519 3603 LogFlow(("pdmR3DevHlp_GetVM: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, NULL)); 1520 return pVM;3604 return NULL; 1521 3605 } 1522 3606 … … 1526 3610 { 1527 3611 PDMDEV_ASSERT_DEVINS(pDevIns); 3612 1528 3613 AssertFailed(); 1529 3614 LogFlow(("pdmR3DevHlp_GetVMCPU: caller='%s'/%d for CPU %u\n", pDevIns->pReg->szName, pDevIns->iInstance, NULL)); … … 1536 3621 { 1537 3622 PDMDEV_ASSERT_DEVINS(pDevIns); 3623 1538 3624 VMCPUID idCpu = 0; 1539 3625 AssertFailed(); 3626 1540 3627 LogFlow(("pdmR3DevHlp_GetCurrentCpuId: caller='%s'/%d for CPU %u\n", pDevIns->pReg->szName, pDevIns->iInstance, idCpu)); 1541 3628 return idCpu; … … 1544 3631 1545 3632 /** @interface_method_impl{PDMDEVHLPR3,pfnPCIBusRegister} */ 1546 static DECLCALLBACK(int) pdmR3DevHlp_PCIBusRegister(PPDMDEVINS pDevIns, PPDMPCIBUSREG pPciBusReg,1547 PCPDMPCIHLPR3 *ppPciHlp R3, uint32_t *piBus)3633 static DECLCALLBACK(int) pdmR3DevHlp_PCIBusRegister(PPDMDEVINS pDevIns, PPDMPCIBUSREGR3 pPciBusReg, 3634 PCPDMPCIHLPR3 *ppPciHlp, uint32_t *piBus) 1548 3635 { 1549 3636 PDMDEV_ASSERT_DEVINS(pDevIns); 1550 3637 LogFlow(("pdmR3DevHlp_PCIBusRegister: caller='%s'/%d: pPciBusReg=%p:{.u32Version=%#x, .pfnRegisterR3=%p, .pfnIORegionRegisterR3=%p, " 1551 ".pfn SetIrqR3=%p, .pszSetIrqRC=%p:{%s}, .pszSetIrqR0=%p:{%s}} ppPciHlpR3=%p piBus=%p\n",3638 ".pfnInterceptConfigAccesses=%p, pfnConfigRead=%p, pfnConfigWrite=%p, .pfnSetIrqR3=%p, .u32EndVersion=%#x} ppPciHlpR3=%p piBus=%p\n", 1552 3639 pDevIns->pReg->szName, pDevIns->iInstance, pPciBusReg, pPciBusReg->u32Version, pPciBusReg->pfnRegisterR3, 1553 pPciBusReg->pfnIORegionRegisterR3, pPciBusReg->pfnSetIrqR3, pPciBusReg->pszSetIrqRC, pPciBusReg->pszSetIrqRC, 1554 pPciBusReg->pszSetIrqR0, pPciBusReg->pszSetIrqR0, ppPciHlpR3, piBus)); 1555 1556 int rc = VERR_NOT_IMPLEMENTED; 1557 AssertFailed(); 1558 1559 LogFlow(("pdmR3DevHlp_PCIBusRegister: caller='%s'/%d: returns %Rrc *piBus=%u\n", 1560 pDevIns->pReg->szName, pDevIns->iInstance, rc, *piBus)); 3640 pPciBusReg->pfnIORegionRegisterR3, pPciBusReg->pfnInterceptConfigAccesses, pPciBusReg->pfnConfigRead, 3641 pPciBusReg->pfnConfigWrite, pPciBusReg->pfnSetIrqR3, pPciBusReg->u32EndVersion, ppPciHlp, piBus)); 3642 3643 /* 3644 * Validate the structure and output parameters. 3645 */ 3646 AssertLogRelMsgReturn(pPciBusReg->u32Version == PDM_PCIBUSREGR3_VERSION, 3647 ("u32Version=%#x expected %#x\n", pPciBusReg->u32Version, PDM_PCIBUSREGR3_VERSION), 3648 VERR_INVALID_PARAMETER); 3649 AssertPtrReturn(pPciBusReg->pfnRegisterR3, VERR_INVALID_PARAMETER); 3650 AssertPtrNullReturn(pPciBusReg->pfnRegisterMsiR3, VERR_INVALID_POINTER); 3651 AssertPtrReturn(pPciBusReg->pfnIORegionRegisterR3, VERR_INVALID_POINTER); 3652 AssertPtrReturn(pPciBusReg->pfnInterceptConfigAccesses, VERR_INVALID_POINTER); 3653 AssertPtrReturn(pPciBusReg->pfnConfigWrite, VERR_INVALID_POINTER); 3654 AssertPtrReturn(pPciBusReg->pfnConfigRead, VERR_INVALID_POINTER); 3655 AssertPtrReturn(pPciBusReg->pfnSetIrqR3, VERR_INVALID_POINTER); 3656 AssertLogRelMsgReturn(pPciBusReg->u32EndVersion == PDM_PCIBUSREGR3_VERSION, 3657 ("u32Version=%#x expected %#x\n", pPciBusReg->u32Version, PDM_PCIBUSREGR3_VERSION), 3658 VERR_INVALID_PARAMETER); 3659 AssertPtrReturn(ppPciHlp, VERR_INVALID_POINTER); 3660 AssertPtrNullReturn(piBus, VERR_INVALID_POINTER); 3661 3662 int rc = VERR_NOT_IMPLEMENTED; 3663 AssertFailed(); 3664 3665 Log(("PDM: Registered PCI bus device '%s'/%d pDevIns=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns)); 3666 3667 LogFlow(("pdmR3DevHlp_PCIBusRegister: caller='%s'/%d: returns %Rrc *piBus=%u\n", pDevIns->pReg->szName, pDevIns->iInstance, rc, *piBus)); 1561 3668 return rc; 1562 3669 } … … 1564 3671 1565 3672 /** @interface_method_impl{PDMDEVHLPR3,pfnPICRegister} */ 1566 static DECLCALLBACK(int) pdmR3DevHlp_PICRegister(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLPR3 *ppPicHlpR3) 1567 { 1568 PDMDEV_ASSERT_DEVINS(pDevIns); 1569 LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: pPicReg=%p:{.u32Version=%#x, .pfnSetIrqR3=%p, .pfnGetInterruptR3=%p, .pszGetIrqRC=%p:{%s}, .pszGetInterruptRC=%p:{%s}, .pszGetIrqR0=%p:{%s}, .pszGetInterruptR0=%p:{%s} } ppPicHlpR3=%p\n", 1570 pDevIns->pReg->szName, pDevIns->iInstance, pPicReg, pPicReg->u32Version, pPicReg->pfnSetIrqR3, pPicReg->pfnGetInterruptR3, 1571 pPicReg->pszSetIrqRC, pPicReg->pszSetIrqRC, pPicReg->pszGetInterruptRC, pPicReg->pszGetInterruptRC, 1572 pPicReg->pszSetIrqR0, pPicReg->pszSetIrqR0, pPicReg->pszGetInterruptR0, pPicReg->pszGetInterruptR0, 1573 ppPicHlpR3)); 1574 1575 int rc = VERR_NOT_IMPLEMENTED; 1576 AssertFailed(); 3673 static DECLCALLBACK(int) pdmR3DevHlp_PICRegister(PPDMDEVINS pDevIns, PPDMPICREG pPicReg, PCPDMPICHLP *ppPicHlp) 3674 { 3675 PDMDEV_ASSERT_DEVINS(pDevIns); 3676 LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: pPicReg=%p:{.u32Version=%#x, .pfnSetIrq=%p, .pfnGetInterrupt=%p, .u32TheEnd=%#x } ppPicHlp=%p\n", 3677 pDevIns->pReg->szName, pDevIns->iInstance, pPicReg, pPicReg->u32Version, pPicReg->pfnSetIrq, pPicReg->pfnGetInterrupt, pPicReg->u32TheEnd, ppPicHlp)); 3678 3679 /* 3680 * Validate input. 3681 */ 3682 AssertMsgReturn(pPicReg->u32Version == PDM_PICREG_VERSION, 3683 ("%s/%d: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pPicReg->u32Version, PDM_PICREG_VERSION), 3684 VERR_INVALID_PARAMETER); 3685 AssertPtrReturn(pPicReg->pfnSetIrq, VERR_INVALID_POINTER); 3686 AssertPtrReturn(pPicReg->pfnGetInterrupt, VERR_INVALID_POINTER); 3687 AssertMsgReturn(pPicReg->u32TheEnd == PDM_PICREG_VERSION, 3688 ("%s/%d: u32TheEnd=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pPicReg->u32TheEnd, PDM_PICREG_VERSION), 3689 VERR_INVALID_PARAMETER); 3690 AssertPtrReturn(ppPicHlp, VERR_INVALID_POINTER); 3691 3692 int rc = VERR_NOT_IMPLEMENTED; 3693 AssertFailed(); 3694 Log(("PDM: Registered PIC device '%s'/%d pDevIns=%p\n", pDevIns->pReg->szName, pDevIns->iInstance, pDevIns)); 1577 3695 1578 3696 LogFlow(("pdmR3DevHlp_PICRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); … … 1581 3699 1582 3700 1583 /** @interface_method_impl{PDMDEVHLPR3,pfnAPICRegister} */ 1584 static DECLCALLBACK(int) pdmR3DevHlp_APICRegister(PPDMDEVINS pDevIns) 1585 { 1586 PDMDEV_ASSERT_DEVINS(pDevIns); 1587 1588 int rc = VERR_NOT_IMPLEMENTED; 1589 AssertFailed(); 1590 1591 LogFlow(("pdmR3DevHlp_APICRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 1592 return rc; 1593 } 1594 1595 1596 /** @interface_method_impl{PDMDEVHLPR3,pfnIOAPICRegister} */ 1597 static DECLCALLBACK(int) pdmR3DevHlp_IOAPICRegister(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLPR3 *ppIoApicHlpR3) 1598 { 1599 PDMDEV_ASSERT_DEVINS(pDevIns); 1600 LogFlow(("pdmR3DevHlp_IOAPICRegister: caller='%s'/%d: pIoApicReg=%p:{.u32Version=%#x, .pfnSetIrqR3=%p, .pszSetIrqRC=%p:{%s}, .pszSetIrqR0=%p:{%s}} ppIoApicHlpR3=%p\n", 1601 pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg, pIoApicReg->u32Version, pIoApicReg->pfnSetIrqR3, 1602 pIoApicReg->pszSetIrqRC, pIoApicReg->pszSetIrqRC, pIoApicReg->pszSetIrqR0, pIoApicReg->pszSetIrqR0, ppIoApicHlpR3)); 1603 1604 int rc = VERR_NOT_IMPLEMENTED; 1605 AssertFailed(); 1606 1607 LogFlow(("pdmR3DevHlp_IOAPICRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 1608 return rc; 1609 } 1610 1611 1612 /** @interface_method_impl{PDMDEVHLPR3,pfnHPETRegister} */ 1613 static DECLCALLBACK(int) pdmR3DevHlp_HPETRegister(PPDMDEVINS pDevIns, PPDMHPETREG pHpetReg, PCPDMHPETHLPR3 *ppHpetHlpR3) 1614 { 1615 PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF_PV(pDevIns); 1616 LogFlow(("pdmR3DevHlp_HPETRegister: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance)); 1617 1618 RT_NOREF(pHpetReg, ppHpetHlpR3); 1619 int rc = VERR_NOT_IMPLEMENTED; 1620 AssertFailed(); 1621 1622 LogFlow(("pdmR3DevHlp_HPETRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 3701 /** @interface_method_impl{PDMDEVHLPR3,pfnApicRegister} */ 3702 static DECLCALLBACK(int) pdmR3DevHlp_ApicRegister(PPDMDEVINS pDevIns) 3703 { 3704 PDMDEV_ASSERT_DEVINS(pDevIns); 3705 3706 int rc = VERR_NOT_IMPLEMENTED; 3707 AssertFailed(); 3708 3709 LogFlow(("pdmR3DevHlp_ApicRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 3710 return rc; 3711 } 3712 3713 3714 /** @interface_method_impl{PDMDEVHLPR3,pfnIoApicRegister} */ 3715 static DECLCALLBACK(int) pdmR3DevHlp_IoApicRegister(PPDMDEVINS pDevIns, PPDMIOAPICREG pIoApicReg, PCPDMIOAPICHLP *ppIoApicHlp) 3716 { 3717 PDMDEV_ASSERT_DEVINS(pDevIns); 3718 LogFlow(("pdmR3DevHlp_IoApicRegister: caller='%s'/%d: pIoApicReg=%p:{.u32Version=%#x, .pfnSetIrq=%p, .pfnSendMsi=%p, .pfnSetEoi=%p, .u32TheEnd=%#x } ppIoApicHlp=%p\n", 3719 pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg, pIoApicReg->u32Version, pIoApicReg->pfnSetIrq, pIoApicReg->pfnSendMsi, pIoApicReg->pfnSetEoi, pIoApicReg->u32TheEnd, ppIoApicHlp)); 3720 3721 /* 3722 * Validate input. 3723 */ 3724 AssertMsgReturn(pIoApicReg->u32Version == PDM_IOAPICREG_VERSION, 3725 ("%s/%d: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg->u32Version, PDM_IOAPICREG_VERSION), 3726 VERR_VERSION_MISMATCH); 3727 AssertPtrReturn(pIoApicReg->pfnSetIrq, VERR_INVALID_POINTER); 3728 AssertPtrReturn(pIoApicReg->pfnSendMsi, VERR_INVALID_POINTER); 3729 AssertPtrReturn(pIoApicReg->pfnSetEoi, VERR_INVALID_POINTER); 3730 AssertMsgReturn(pIoApicReg->u32TheEnd == PDM_IOAPICREG_VERSION, 3731 ("%s/%d: u32TheEnd=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pIoApicReg->u32TheEnd, PDM_IOAPICREG_VERSION), 3732 VERR_VERSION_MISMATCH); 3733 AssertPtrReturn(ppIoApicHlp, VERR_INVALID_POINTER); 3734 3735 int rc = VERR_NOT_IMPLEMENTED; 3736 AssertFailed(); 3737 3738 LogFlow(("pdmR3DevHlp_IoApicRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 3739 return rc; 3740 } 3741 3742 3743 /** @interface_method_impl{PDMDEVHLPR3,pfnHpetRegister} */ 3744 static DECLCALLBACK(int) pdmR3DevHlp_HpetRegister(PPDMDEVINS pDevIns, PPDMHPETREG pHpetReg, PCPDMHPETHLPR3 *ppHpetHlpR3) 3745 { 3746 PDMDEV_ASSERT_DEVINS(pDevIns); 3747 LogFlow(("pdmR3DevHlp_HpetRegister: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance)); 3748 3749 /* 3750 * Validate input. 3751 */ 3752 AssertMsgReturn(pHpetReg->u32Version == PDM_HPETREG_VERSION, 3753 ("%s/%u: u32Version=%#x expected %#x\n", pDevIns->pReg->szName, pDevIns->iInstance, pHpetReg->u32Version, PDM_HPETREG_VERSION), 3754 VERR_VERSION_MISMATCH); 3755 AssertPtrReturn(ppHpetHlpR3, VERR_INVALID_POINTER); 3756 3757 int rc = VERR_NOT_IMPLEMENTED; 3758 AssertFailed(); 3759 3760 LogFlow(("pdmR3DevHlp_HpetRegister: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc)); 1623 3761 return rc; 1624 3762 } … … 1631 3769 LogFlow(("pdmR3DevHlp_PciRawRegister: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance)); 1632 3770 1633 RT_NOREF(pPciRawReg, ppPciRawHlpR3); 3771 /* 3772 * Validate input. 3773 */ 3774 if (pPciRawReg->u32Version != PDM_PCIRAWREG_VERSION) 3775 { 3776 AssertMsgFailed(("u32Version=%#x expected %#x\n", pPciRawReg->u32Version, PDM_PCIRAWREG_VERSION)); 3777 LogFlow(("pdmR3DevHlp_PciRawRegister: caller='%s'/%d: returns %Rrc (version)\n", pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3778 return VERR_INVALID_PARAMETER; 3779 } 3780 3781 if (!ppPciRawHlpR3) 3782 { 3783 Assert(ppPciRawHlpR3); 3784 LogFlow(("pdmR3DevHlp_PciRawRegister: caller='%s'/%d: returns %Rrc (ppPciRawHlpR3)\n", pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3785 return VERR_INVALID_PARAMETER; 3786 } 3787 1634 3788 int rc = VERR_NOT_IMPLEMENTED; 1635 3789 AssertFailed(); … … 1648 3802 pDmacReg->pfnReadMemory, pDmacReg->pfnWriteMemory, pDmacReg->pfnSetDREQ, pDmacReg->pfnGetChannelMode, ppDmacHlp)); 1649 3803 1650 RT_NOREF(pDmacReg, ppDmacHlp); 3804 /* 3805 * Validate input. 3806 */ 3807 if (pDmacReg->u32Version != PDM_DMACREG_VERSION) 3808 { 3809 AssertMsgFailed(("u32Version=%#x expected %#x\n", pDmacReg->u32Version, 3810 PDM_DMACREG_VERSION)); 3811 LogFlow(("pdmR3DevHlp_DMACRegister: caller='%s'/%d: returns %Rrc (version)\n", 3812 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3813 return VERR_INVALID_PARAMETER; 3814 } 3815 if ( !pDmacReg->pfnRun 3816 || !pDmacReg->pfnRegister 3817 || !pDmacReg->pfnReadMemory 3818 || !pDmacReg->pfnWriteMemory 3819 || !pDmacReg->pfnSetDREQ 3820 || !pDmacReg->pfnGetChannelMode) 3821 { 3822 Assert(pDmacReg->pfnRun); 3823 Assert(pDmacReg->pfnRegister); 3824 Assert(pDmacReg->pfnReadMemory); 3825 Assert(pDmacReg->pfnWriteMemory); 3826 Assert(pDmacReg->pfnSetDREQ); 3827 Assert(pDmacReg->pfnGetChannelMode); 3828 LogFlow(("pdmR3DevHlp_DMACRegister: caller='%s'/%d: returns %Rrc (callbacks)\n", 3829 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3830 return VERR_INVALID_PARAMETER; 3831 } 3832 3833 if (!ppDmacHlp) 3834 { 3835 Assert(ppDmacHlp); 3836 LogFlow(("pdmR3DevHlp_DMACRegister: caller='%s'/%d: returns %Rrc (ppDmacHlp)\n", 3837 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3838 return VERR_INVALID_PARAMETER; 3839 } 3840 1651 3841 int rc = VERR_NOT_IMPLEMENTED; 1652 3842 AssertFailed(); … … 1685 3875 pDevIns->pReg->szName, pDevIns->iInstance, pFwReg, pFwReg->u32Version, pFwReg->pfnIsHardReset, pFwReg->u32TheEnd, ppFwHlp)); 1686 3876 1687 RT_NOREF(pFwReg, ppFwHlp); 3877 /* 3878 * Validate input. 3879 */ 3880 if (pFwReg->u32Version != PDM_FWREG_VERSION) 3881 { 3882 AssertMsgFailed(("u32Version=%#x expected %#x\n", pFwReg->u32Version, PDM_FWREG_VERSION)); 3883 LogFlow(("pdmR3DevHlp_FirmwareRegister: caller='%s'/%d: returns %Rrc (version)\n", 3884 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3885 return VERR_INVALID_PARAMETER; 3886 } 3887 if (!pFwReg->pfnIsHardReset) 3888 { 3889 Assert(pFwReg->pfnIsHardReset); 3890 LogFlow(("pdmR3DevHlp_FirmwareRegister: caller='%s'/%d: returns %Rrc (callbacks)\n", 3891 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3892 return VERR_INVALID_PARAMETER; 3893 } 3894 3895 if (!ppFwHlp) 3896 { 3897 Assert(ppFwHlp); 3898 LogFlow(("pdmR3DevHlp_FirmwareRegister: caller='%s'/%d: returns %Rrc (ppFwHlp)\n", 3899 pDevIns->pReg->szName, pDevIns->iInstance, VERR_INVALID_PARAMETER)); 3900 return VERR_INVALID_PARAMETER; 3901 } 3902 1688 3903 int rc = VERR_NOT_IMPLEMENTED; 1689 3904 AssertFailed(); … … 1795 4010 { 1796 4011 PDM_DEVHLPR3_VERSION, 1797 pdmR3DevHlp_I OPortRegister,1798 pdmR3DevHlp_I OPortRegisterRC,1799 pdmR3DevHlp_I OPortRegisterR0,1800 pdmR3DevHlp_I OPortDeregister,1801 pdmR3DevHlp_M MIORegister,1802 pdmR3DevHlp_M MIORegisterRC,1803 pdmR3DevHlp_M MIORegisterR0,1804 pdmR3DevHlp_M MIODeregister,1805 pdmR3DevHlp_M MIO2Register,1806 pdmR3DevHlp_M MIOExPreRegister,1807 pdmR3DevHlp_M MIOExDeregister,1808 pdmR3DevHlp_M MIOExMap,1809 pdmR3DevHlp_M MIOExUnmap,1810 pdmR3DevHlp_M MIOExReduce,1811 pdmR3DevHlp_M MHyperMapMMIO2,1812 pdmR3DevHlp_M MIO2MapKernel,4012 pdmR3DevHlp_IoPortCreateEx, 4013 pdmR3DevHlp_IoPortMap, 4014 pdmR3DevHlp_IoPortUnmap, 4015 pdmR3DevHlp_IoPortGetMappingAddress, 4016 pdmR3DevHlp_MmioCreateEx, 4017 pdmR3DevHlp_MmioMap, 4018 pdmR3DevHlp_MmioUnmap, 4019 pdmR3DevHlp_MmioReduce, 4020 pdmR3DevHlp_MmioGetMappingAddress, 4021 pdmR3DevHlp_Mmio2Create, 4022 pdmR3DevHlp_Mmio2Destroy, 4023 pdmR3DevHlp_Mmio2Map, 4024 pdmR3DevHlp_Mmio2Unmap, 4025 pdmR3DevHlp_Mmio2Reduce, 4026 pdmR3DevHlp_Mmio2GetMappingAddress, 4027 pdmR3DevHlp_Mmio2ChangeRegionNo, 1813 4028 pdmR3DevHlp_ROMRegister, 1814 4029 pdmR3DevHlp_ROMProtectShadow, 1815 4030 pdmR3DevHlp_SSMRegister, 4031 pdmR3DevHlp_SSMPutStruct, 4032 pdmR3DevHlp_SSMPutStructEx, 4033 pdmR3DevHlp_SSMPutBool, 4034 pdmR3DevHlp_SSMPutU8, 4035 pdmR3DevHlp_SSMPutS8, 4036 pdmR3DevHlp_SSMPutU16, 4037 pdmR3DevHlp_SSMPutS16, 4038 pdmR3DevHlp_SSMPutU32, 4039 pdmR3DevHlp_SSMPutS32, 4040 pdmR3DevHlp_SSMPutU64, 4041 pdmR3DevHlp_SSMPutS64, 4042 pdmR3DevHlp_SSMPutU128, 4043 pdmR3DevHlp_SSMPutS128, 4044 pdmR3DevHlp_SSMPutUInt, 4045 pdmR3DevHlp_SSMPutSInt, 4046 pdmR3DevHlp_SSMPutGCUInt, 4047 pdmR3DevHlp_SSMPutGCUIntReg, 4048 pdmR3DevHlp_SSMPutGCPhys32, 4049 pdmR3DevHlp_SSMPutGCPhys64, 4050 pdmR3DevHlp_SSMPutGCPhys, 4051 pdmR3DevHlp_SSMPutGCPtr, 4052 pdmR3DevHlp_SSMPutGCUIntPtr, 4053 pdmR3DevHlp_SSMPutRCPtr, 4054 pdmR3DevHlp_SSMPutIOPort, 4055 pdmR3DevHlp_SSMPutSel, 4056 pdmR3DevHlp_SSMPutMem, 4057 pdmR3DevHlp_SSMPutStrZ, 4058 pdmR3DevHlp_SSMGetStruct, 4059 pdmR3DevHlp_SSMGetStructEx, 4060 pdmR3DevHlp_SSMGetBool, 4061 pdmR3DevHlp_SSMGetBoolV, 4062 pdmR3DevHlp_SSMGetU8, 4063 pdmR3DevHlp_SSMGetU8V, 4064 pdmR3DevHlp_SSMGetS8, 4065 pdmR3DevHlp_SSMGetS8V, 4066 pdmR3DevHlp_SSMGetU16, 4067 pdmR3DevHlp_SSMGetU16V, 4068 pdmR3DevHlp_SSMGetS16, 4069 pdmR3DevHlp_SSMGetS16V, 4070 pdmR3DevHlp_SSMGetU32, 4071 pdmR3DevHlp_SSMGetU32V, 4072 pdmR3DevHlp_SSMGetS32, 4073 pdmR3DevHlp_SSMGetS32V, 4074 pdmR3DevHlp_SSMGetU64, 4075 pdmR3DevHlp_SSMGetU64V, 4076 pdmR3DevHlp_SSMGetS64, 4077 pdmR3DevHlp_SSMGetS64V, 4078 pdmR3DevHlp_SSMGetU128, 4079 pdmR3DevHlp_SSMGetU128V, 4080 pdmR3DevHlp_SSMGetS128, 4081 pdmR3DevHlp_SSMGetS128V, 4082 pdmR3DevHlp_SSMGetGCPhys32, 4083 pdmR3DevHlp_SSMGetGCPhys32V, 4084 pdmR3DevHlp_SSMGetGCPhys64, 4085 pdmR3DevHlp_SSMGetGCPhys64V, 4086 pdmR3DevHlp_SSMGetGCPhys, 4087 pdmR3DevHlp_SSMGetGCPhysV, 4088 pdmR3DevHlp_SSMGetUInt, 4089 pdmR3DevHlp_SSMGetSInt, 4090 pdmR3DevHlp_SSMGetGCUInt, 4091 pdmR3DevHlp_SSMGetGCUIntReg, 4092 pdmR3DevHlp_SSMGetGCPtr, 4093 pdmR3DevHlp_SSMGetGCUIntPtr, 4094 pdmR3DevHlp_SSMGetRCPtr, 4095 pdmR3DevHlp_SSMGetIOPort, 4096 pdmR3DevHlp_SSMGetSel, 4097 pdmR3DevHlp_SSMGetMem, 4098 pdmR3DevHlp_SSMGetStrZ, 4099 pdmR3DevHlp_SSMGetStrZEx, 4100 pdmR3DevHlp_SSMSkip, 4101 pdmR3DevHlp_SSMSkipToEndOfUnit, 4102 pdmR3DevHlp_SSMSetLoadError, 4103 pdmR3DevHlp_SSMSetLoadErrorV, 4104 pdmR3DevHlp_SSMSetCfgError, 4105 pdmR3DevHlp_SSMSetCfgErrorV, 4106 pdmR3DevHlp_SSMHandleGetStatus, 4107 pdmR3DevHlp_SSMHandleGetAfter, 4108 pdmR3DevHlp_SSMHandleIsLiveSave, 4109 pdmR3DevHlp_SSMHandleMaxDowntime, 4110 pdmR3DevHlp_SSMHandleHostBits, 4111 pdmR3DevHlp_SSMHandleRevision, 4112 pdmR3DevHlp_SSMHandleVersion, 4113 pdmR3DevHlp_SSMHandleHostOSAndArch, 1816 4114 pdmR3DevHlp_TMTimerCreate, 4115 pdmR3DevHlp_TimerCreate, 4116 pdmR3DevHlp_TimerToPtr, 4117 pdmR3DevHlp_TimerFromMicro, 4118 pdmR3DevHlp_TimerFromMilli, 4119 pdmR3DevHlp_TimerFromNano, 4120 pdmR3DevHlp_TimerGet, 4121 pdmR3DevHlp_TimerGetFreq, 4122 pdmR3DevHlp_TimerGetNano, 4123 pdmR3DevHlp_TimerIsActive, 4124 pdmR3DevHlp_TimerIsLockOwner, 4125 pdmR3DevHlp_TimerLockClock, 4126 pdmR3DevHlp_TimerLockClock2, 4127 pdmR3DevHlp_TimerSet, 4128 pdmR3DevHlp_TimerSetFrequencyHint, 4129 pdmR3DevHlp_TimerSetMicro, 4130 pdmR3DevHlp_TimerSetMillies, 4131 pdmR3DevHlp_TimerSetNano, 4132 pdmR3DevHlp_TimerSetRelative, 4133 pdmR3DevHlp_TimerStop, 4134 pdmR3DevHlp_TimerUnlockClock, 4135 pdmR3DevHlp_TimerUnlockClock2, 4136 pdmR3DevHlp_TimerSetCritSect, 4137 pdmR3DevHlp_TimerSave, 4138 pdmR3DevHlp_TimerLoad, 4139 pdmR3DevHlp_TimerDestroy, 4140 pdmR3DevHlp_TimerSkipLoad, 1817 4141 pdmR3DevHlp_TMUtcNow, 4142 pdmR3DevHlp_CFGMExists, 4143 pdmR3DevHlp_CFGMQueryType, 4144 pdmR3DevHlp_CFGMQuerySize, 4145 pdmR3DevHlp_CFGMQueryInteger, 4146 pdmR3DevHlp_CFGMQueryIntegerDef, 4147 pdmR3DevHlp_CFGMQueryString, 4148 pdmR3DevHlp_CFGMQueryStringDef, 4149 pdmR3DevHlp_CFGMQueryBytes, 4150 pdmR3DevHlp_CFGMQueryU64, 4151 pdmR3DevHlp_CFGMQueryU64Def, 4152 pdmR3DevHlp_CFGMQueryS64, 4153 pdmR3DevHlp_CFGMQueryS64Def, 4154 pdmR3DevHlp_CFGMQueryU32, 4155 pdmR3DevHlp_CFGMQueryU32Def, 4156 pdmR3DevHlp_CFGMQueryS32, 4157 pdmR3DevHlp_CFGMQueryS32Def, 4158 pdmR3DevHlp_CFGMQueryU16, 4159 pdmR3DevHlp_CFGMQueryU16Def, 4160 pdmR3DevHlp_CFGMQueryS16, 4161 pdmR3DevHlp_CFGMQueryS16Def, 4162 pdmR3DevHlp_CFGMQueryU8, 4163 pdmR3DevHlp_CFGMQueryU8Def, 4164 pdmR3DevHlp_CFGMQueryS8, 4165 pdmR3DevHlp_CFGMQueryS8Def, 4166 pdmR3DevHlp_CFGMQueryBool, 4167 pdmR3DevHlp_CFGMQueryBoolDef, 4168 pdmR3DevHlp_CFGMQueryPort, 4169 pdmR3DevHlp_CFGMQueryPortDef, 4170 pdmR3DevHlp_CFGMQueryUInt, 4171 pdmR3DevHlp_CFGMQueryUIntDef, 4172 pdmR3DevHlp_CFGMQuerySInt, 4173 pdmR3DevHlp_CFGMQuerySIntDef, 4174 pdmR3DevHlp_CFGMQueryPtr, 4175 pdmR3DevHlp_CFGMQueryPtrDef, 4176 pdmR3DevHlp_CFGMQueryGCPtr, 4177 pdmR3DevHlp_CFGMQueryGCPtrDef, 4178 pdmR3DevHlp_CFGMQueryGCPtrU, 4179 pdmR3DevHlp_CFGMQueryGCPtrUDef, 4180 pdmR3DevHlp_CFGMQueryGCPtrS, 4181 pdmR3DevHlp_CFGMQueryGCPtrSDef, 4182 pdmR3DevHlp_CFGMQueryStringAlloc, 4183 pdmR3DevHlp_CFGMQueryStringAllocDef, 4184 pdmR3DevHlp_CFGMGetParent, 4185 pdmR3DevHlp_CFGMGetChild, 4186 pdmR3DevHlp_CFGMGetChildF, 4187 pdmR3DevHlp_CFGMGetChildFV, 4188 pdmR3DevHlp_CFGMGetFirstChild, 4189 pdmR3DevHlp_CFGMGetNextChild, 4190 pdmR3DevHlp_CFGMGetName, 4191 pdmR3DevHlp_CFGMGetNameLen, 4192 pdmR3DevHlp_CFGMAreChildrenValid, 4193 pdmR3DevHlp_CFGMGetFirstValue, 4194 pdmR3DevHlp_CFGMGetNextValue, 4195 pdmR3DevHlp_CFGMGetValueName, 4196 pdmR3DevHlp_CFGMGetValueNameLen, 4197 pdmR3DevHlp_CFGMGetValueType, 4198 pdmR3DevHlp_CFGMAreValuesValid, 4199 pdmR3DevHlp_CFGMValidateConfig, 1818 4200 pdmR3DevHlp_PhysRead, 1819 4201 pdmR3DevHlp_PhysWrite, … … 1835 4217 pdmR3DevHlp_DBGFStopV, 1836 4218 pdmR3DevHlp_DBGFInfoRegister, 4219 pdmR3DevHlp_DBGFInfoRegisterArgv, 1837 4220 pdmR3DevHlp_DBGFRegRegister, 1838 4221 pdmR3DevHlp_DBGFTraceBuf, 1839 4222 pdmR3DevHlp_STAMRegister, 1840 pdmR3DevHlp_STAMRegisterF,1841 4223 pdmR3DevHlp_STAMRegisterV, 1842 4224 pdmR3DevHlp_PCIRegister, 1843 4225 pdmR3DevHlp_PCIRegisterMsi, 1844 4226 pdmR3DevHlp_PCIIORegionRegister, 1845 pdmR3DevHlp_PCISetConfigCallbacks, 4227 pdmR3DevHlp_PCIInterceptConfigAccesses, 4228 pdmR3DevHlp_PCIConfigWrite, 4229 pdmR3DevHlp_PCIConfigRead, 1846 4230 pdmR3DevHlp_PCIPhysRead, 1847 4231 pdmR3DevHlp_PCIPhysWrite, … … 1853 4237 pdmR3DevHlp_DriverAttach, 1854 4238 pdmR3DevHlp_DriverDetach, 4239 pdmR3DevHlp_DriverReconfigure, 4240 pdmR3DevHlp_QueueCreatePtr, 1855 4241 pdmR3DevHlp_QueueCreate, 4242 pdmR3DevHlp_QueueToPtr, 4243 pdmR3DevHlp_QueueAlloc, 4244 pdmR3DevHlp_QueueInsert, 4245 pdmR3DevHlp_QueueInsertEx, 4246 pdmR3DevHlp_QueueFlushIfNecessary, 4247 pdmR3DevHlp_TaskCreate, 4248 pdmR3DevHlp_TaskTrigger, 4249 pdmR3DevHlp_SUPSemEventCreate, 4250 pdmR3DevHlp_SUPSemEventClose, 4251 pdmR3DevHlp_SUPSemEventSignal, 4252 pdmR3DevHlp_SUPSemEventWaitNoResume, 4253 pdmR3DevHlp_SUPSemEventWaitNsAbsIntr, 4254 pdmR3DevHlp_SUPSemEventWaitNsRelIntr, 4255 pdmR3DevHlp_SUPSemEventGetResolution, 4256 pdmR3DevHlp_SUPSemEventMultiCreate, 4257 pdmR3DevHlp_SUPSemEventMultiClose, 4258 pdmR3DevHlp_SUPSemEventMultiSignal, 4259 pdmR3DevHlp_SUPSemEventMultiReset, 4260 pdmR3DevHlp_SUPSemEventMultiWaitNoResume, 4261 pdmR3DevHlp_SUPSemEventMultiWaitNsAbsIntr, 4262 pdmR3DevHlp_SUPSemEventMultiWaitNsRelIntr, 4263 pdmR3DevHlp_SUPSemEventMultiGetResolution, 1856 4264 pdmR3DevHlp_CritSectInit, 1857 4265 pdmR3DevHlp_CritSectGetNop, … … 1859 4267 pdmR3DevHlp_CritSectGetNopRC, 1860 4268 pdmR3DevHlp_SetDeviceCritSect, 4269 pdmR3DevHlp_CritSectYield, 4270 pdmR3DevHlp_CritSectEnter, 4271 pdmR3DevHlp_CritSectEnterDebug, 4272 pdmR3DevHlp_CritSectTryEnter, 4273 pdmR3DevHlp_CritSectTryEnterDebug, 4274 pdmR3DevHlp_CritSectLeave, 4275 pdmR3DevHlp_CritSectIsOwner, 4276 pdmR3DevHlp_CritSectIsInitialized, 4277 pdmR3DevHlp_CritSectHasWaiters, 4278 pdmR3DevHlp_CritSectGetRecursion, 4279 pdmR3DevHlp_CritSectScheduleExitEvent, 4280 pdmR3DevHlp_CritSectDelete, 1861 4281 pdmR3DevHlp_ThreadCreate, 4282 pdmR3DevHlp_ThreadDestroy, 4283 pdmR3DevHlp_ThreadIAmSuspending, 4284 pdmR3DevHlp_ThreadIamRunning, 4285 pdmR3DevHlp_ThreadSleep, 4286 pdmR3DevHlp_ThreadSuspend, 4287 pdmR3DevHlp_ThreadResume, 1862 4288 pdmR3DevHlp_SetAsyncNotification, 1863 4289 pdmR3DevHlp_AsyncNotificationCompleted, … … 1865 4291 pdmR3DevHlp_PCIBusRegister, 1866 4292 pdmR3DevHlp_PICRegister, 1867 pdmR3DevHlp_A PICRegister,1868 pdmR3DevHlp_I OAPICRegister,1869 pdmR3DevHlp_H PETRegister,4293 pdmR3DevHlp_ApicRegister, 4294 pdmR3DevHlp_IoApicRegister, 4295 pdmR3DevHlp_HpetRegister, 1870 4296 pdmR3DevHlp_PciRawRegister, 1871 4297 pdmR3DevHlp_DMACRegister, … … 1885 4311 pdmR3DevHlp_VMGetSuspendReason, 1886 4312 pdmR3DevHlp_VMGetResumeReason, 1887 0, 1888 0, 1889 0, 1890 0, 1891 0, 1892 0, 1893 0, 1894 0, 1895 0, 1896 0, 4313 pdmR3DevHlp_PhysBulkGCPhys2CCPtr, 4314 pdmR3DevHlp_PhysBulkGCPhys2CCPtrReadOnly, 4315 pdmR3DevHlp_PhysBulkReleasePageMappingLocks, 4316 NULL, 4317 NULL, 4318 NULL, 4319 NULL, 4320 NULL, 4321 NULL, 4322 NULL, 4323 NULL, 4324 NULL, 4325 NULL, 1897 4326 pdmR3DevHlp_GetUVM, 1898 4327 pdmR3DevHlp_GetVM,
Note:
See TracChangeset
for help on using the changeset viewer.