Changeset 25893 in vbox
- Timestamp:
- Jan 18, 2010 2:08:39 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 39 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmdev.h
r25891 r25893 86 86 * Device relocation callback. 87 87 * 88 * When this callback is called the device instance data, and if the89 * device have a GC component, is being relocated, or/and the selectors90 * have been changed. The device must use the chance to perform the91 * necessary pointer relocations and data updates.88 * This is called when the instance data has been relocated in raw-mode context 89 * (RC). It is also called when the RC hypervisor selects changes. The device 90 * must fixup all necessary pointers and re-query all interfaces to other RC 91 * devices and drivers. 92 92 * 93 * Before the GC code is executed the first time, this function will be94 * called with a 0 delta so GC pointer calculations can be one in one place.93 * Before the RC code is executed the first time, this function will be called 94 * with a 0 delta so RC pointer calculations can be one in one place. 95 95 * 96 96 * @param pDevIns Pointer to the device instance. … … 102 102 /** Pointer to a FNPDMDEVRELOCATE() function. */ 103 103 typedef FNPDMDEVRELOCATE *PFNPDMDEVRELOCATE; 104 105 104 106 105 /** … … 238 237 239 238 240 /** PDM Device Registration Structure, 241 * This structure is used when registering a device from 242 * VBoxInitDevices() in HC Ring-3. PDM will continue use till 243 * the VM is terminated. 239 /** 240 * PDM Device Registration Structure. 241 * 242 * This structure is used when registering a device from VBoxInitDevices() in HC 243 * Ring-3. PDM will continue use till the VM is terminated. 244 244 */ 245 245 typedef struct PDMDEVREG … … 260 260 261 261 /** Flags, combination of the PDM_DEVREG_FLAGS_* \#defines. */ 262 RTUINTfFlags;262 uint32_t fFlags; 263 263 /** Device class(es), combination of the PDM_DEVREG_CLASS_* \#defines. */ 264 RTUINTfClass;264 uint32_t fClass; 265 265 /** Maximum number of instances (per VM). */ 266 RTUINTcMaxInstances;266 uint32_t cMaxInstances; 267 267 /** Size of the instance data. */ 268 RTUINTcbInstance;268 uint32_t cbInstance; 269 269 270 270 /** Construct instance - required. */ -
trunk/include/VBox/pdmdrv.h
r25891 r25893 92 92 93 93 /** 94 * Driver relocation callback. 95 * 96 * This is called when the instance data has been relocated in raw-mode context 97 * (RC). It is also called when the RC hypervisor selects changes. The driver 98 * must fixup all necessary pointers and re-query all interfaces to other RC 99 * devices and drivers. 100 * 101 * Before the RC code is executed the first time, this function will be called 102 * with a 0 delta so RC pointer calculations can be one in one place. 103 * 104 * @param pDrvIns Pointer to the driver instance. 105 * @param offDelta The relocation delta relative to the old location. 106 * 107 * @remark A relocation CANNOT fail. 108 */ 109 typedef DECLCALLBACK(void) FNPDMDRVRELOCATE(PPDMDRVINS pDrvIns, RTGCINTPTR offDelta); 110 /** Pointer to a FNPDMDRVRELOCATE() function. */ 111 typedef FNPDMDRVRELOCATE *PFNPDMDRVRELOCATE; 112 113 /** 94 114 * Driver I/O Control interface. 95 115 * … … 107 127 * @param pcbOut Where to store the actual size of the output data. 108 128 */ 109 typedef DECLCALLBACK(int) FNPDMDRVIOCTL(PPDMDRVINS pDrvIns, RTUINTuFunction,110 void *pvIn, RTUINTcbIn,111 void *pvOut, RTUINT cbOut, PRTUINTpcbOut);129 typedef DECLCALLBACK(int) FNPDMDRVIOCTL(PPDMDRVINS pDrvIns, uint32_t uFunction, 130 void *pvIn, uint32_t cbIn, 131 void *pvOut, uint32_t cbOut, uint32_t *pcbOut); 112 132 /** Pointer to a FNPDMDRVIOCTL() function. */ 113 133 typedef FNPDMDRVIOCTL *PFNPDMDRVIOCTL; … … 195 215 196 216 197 /** PDM Driver Registration Structure, 198 * This structure is used when registering a driver from 199 * VBoxInitDrivers() (HC Ring-3). PDM will continue use till 200 * the VM is terminated. 217 /** 218 * PDM Driver Registration Structure. 219 * 220 * This structure is used when registering a driver from VBoxInitDrivers() (in 221 * host ring-3 context). PDM will continue use till the VM is terminated. 201 222 */ 202 223 typedef struct PDMDRVREG … … 206 227 /** Driver name. */ 207 228 char szDriverName[32]; 229 /** Name of the raw-mode context module (no path). 230 * Only evalutated if PDM_DRVREG_FLAGS_RC is set. */ 231 char szRCMod[32]; 232 /** Name of the ring-0 module (no path). 233 * Only evalutated if PDM_DRVREG_FLAGS_R0 is set. */ 234 char szR0Mod[32]; 208 235 /** The description of the driver. The UTF-8 string pointed to shall, like this structure, 209 236 * remain unchanged from registration till VM destruction. */ … … 211 238 212 239 /** Flags, combination of the PDM_DRVREG_FLAGS_* \#defines. */ 213 RTUINTfFlags;240 uint32_t fFlags; 214 241 /** Driver class(es), combination of the PDM_DRVREG_CLASS_* \#defines. */ 215 RTUINTfClass;242 uint32_t fClass; 216 243 /** Maximum number of instances (per VM). */ 217 RTUINTcMaxInstances;244 uint32_t cMaxInstances; 218 245 /** Size of the instance data. */ 219 RTUINTcbInstance;246 uint32_t cbInstance; 220 247 221 248 /** Construct instance - required. */ … … 223 250 /** Destruct instance - optional. */ 224 251 PFNPDMDRVDESTRUCT pfnDestruct; 252 /** Relocation command - optional. */ 253 PFNPDMDRVRELOCATE pfnRelocate; 225 254 /** I/O control - optional. */ 226 255 PFNPDMDRVIOCTL pfnIOCtl; … … 250 279 251 280 /** Current DRVREG version number. */ 252 #define PDM_DRVREG_VERSION UINT32_C(0x80030000)281 #define PDM_DRVREG_VERSION UINT32_C(0x80030000) 253 282 254 283 /** PDM Driver Flags. … … 599 628 * @thread The emulation thread. 600 629 */ 601 DECLR3CALLBACKMEMBER(int, pfnPDMQueueCreate,(PPDMDRVINS pDrvIns, RTUINT cbItem, RTUINTcItems, uint32_t cMilliesInterval,630 DECLR3CALLBACKMEMBER(int, pfnPDMQueueCreate,(PPDMDRVINS pDrvIns, uint32_t cbItem, uint32_t cItems, uint32_t cMilliesInterval, 602 631 PFNPDMQUEUEDRV pfnCallback, const char *pszName, PPDMQUEUE *ppQueue)); 603 632 … … 972 1001 * @copydoc PDMDRVHLP::pfnPDMQueueCreate 973 1002 */ 974 DECLINLINE(int) PDMDrvHlpPDMQueueCreate(PPDMDRVINS pDrvIns, RTUINT cbItem, RTUINTcItems, uint32_t cMilliesInterval,1003 DECLINLINE(int) PDMDrvHlpPDMQueueCreate(PPDMDRVINS pDrvIns, uint32_t cbItem, uint32_t cItems, uint32_t cMilliesInterval, 975 1004 PFNPDMQUEUEDRV pfnCallback, const char *pszName, PPDMQUEUE *ppQueue) 976 1005 { -
trunk/src/VBox/Devices/Audio/audio.c
r25891 r25893 2056 2056 /* szDriverName */ 2057 2057 "AUDIO", 2058 /* szRCMod */ 2059 "", 2060 /* szR0Mod */ 2061 "", 2058 2062 /* pszDescription */ 2059 2063 "AUDIO Driver", … … 2070 2074 /* pfnDestruct */ 2071 2075 drvAudioDestruct, 2076 /* pfnRelocate */ 2077 NULL, 2072 2078 /* pfnIOCtl */ 2073 2079 NULL, -
trunk/src/VBox/Devices/Input/DrvKeyboardQueue.cpp
r22277 r25893 334 334 /* szDriverName */ 335 335 "KeyboardQueue", 336 /* szRCMod */ 337 "", 338 /* szR0Mod */ 339 "", 336 340 /* pszDescription */ 337 341 "Keyboard queue driver to plug in between the key source and the device to do queueing and inter-thread transport.", … … 346 350 /* pfnConstruct */ 347 351 drvKbdQueueConstruct, 352 /* pfnRelocate */ 353 NULL, 348 354 /* pfnDestruct */ 349 355 NULL, -
trunk/src/VBox/Devices/Input/DrvMouseQueue.cpp
r22810 r25893 228 228 229 229 /** 230 * Construct a mouse driver instance. 231 * 230 * Construct a mouse driver instance. 231 * 232 232 * @copydoc FNPDMDRVCONSTRUCT 233 233 */ … … 322 322 /* szDriverName */ 323 323 "MouseQueue", 324 /* szRCMod */ 325 "", 326 /* szR0Mod */ 327 "", 324 328 /* pszDescription */ 325 329 "Mouse queue driver to plug in between the key source and the device to do queueing and inter-thread transport.", … … 334 338 /* pfnConstruct */ 335 339 drvMouseQueueConstruct, 340 /* pfnRelocate */ 341 NULL, 336 342 /* pfnDestruct */ 337 343 NULL, -
trunk/src/VBox/Devices/Network/DrvIntNet.cpp
r25891 r25893 1137 1137 /* szDriverName */ 1138 1138 "IntNet", 1139 /* szRCMod */ 1140 "", 1141 /* szR0Mod */ 1142 "", 1139 1143 /* pszDescription */ 1140 1144 "Internal Networking Transport Driver", … … 1151 1155 /* pfnDestruct */ 1152 1156 drvIntNetDestruct, 1157 /* pfnRelocate */ 1158 NULL, 1153 1159 /* pfnIOCtl */ 1154 1160 NULL, -
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r25799 r25893 241 241 { 242 242 RTReqProcess(pThis->pRecvReqQueue, 0); 243 if (ASMAtomicReadU32(&pThis->cPkt) == 0) 243 if (ASMAtomicReadU32(&pThis->cPkt) == 0) 244 244 RTSemEventWait(pThis->EventRecv, RT_INDEFINITE_WAIT); 245 245 } … … 268 268 { 269 269 RTReqProcess(pThis->pUrgRecvReqQueue, 0); 270 if (ASMAtomicReadU32(&pThis->cUrgPkt) == 0) 270 if (ASMAtomicReadU32(&pThis->cUrgPkt) == 0) 271 271 { 272 272 int rc = RTSemEventWait(pThis->EventUrgRecv, RT_INDEFINITE_WAIT); … … 295 295 AssertRC(rc); 296 296 } 297 else if ( RT_FAILURE(rc) 297 else if ( RT_FAILURE(rc) 298 298 && ( rc == VERR_TIMEOUT 299 299 && rc == VERR_INTERRUPTED)) 300 300 { 301 301 AssertRC(rc); 302 } 302 } 303 303 304 304 rc = RTCritSectLeave(&pThis->csDevAccess); … … 306 306 307 307 slirp_ext_m_free(pThis->pNATState, pvArg); 308 if (ASMAtomicDecU32(&pThis->cUrgPkt) == 0) 308 if (ASMAtomicDecU32(&pThis->cUrgPkt) == 0) 309 309 { 310 310 drvNATRecvWakeup(pThis->pDrvIns, pThis->pRecvThread); … … 324 324 { 325 325 rc = RTSemEventWait(pThis->EventRecv, RT_INDEFINITE_WAIT); 326 if ( RT_FAILURE(rc) 326 if ( RT_FAILURE(rc) 327 327 && ( rc == VERR_TIMEOUT 328 328 || rc == VERR_INTERRUPTED)) 329 goto done_unlocked; 329 goto done_unlocked; 330 330 } 331 331 … … 337 337 rc = pThis->pPort->pfnReceive(pThis->pPort, pu8Buf, cb); 338 338 AssertRC(rc); 339 } 340 else if ( RT_FAILURE(rc) 339 } 340 else if ( RT_FAILURE(rc) 341 341 && ( rc != VERR_TIMEOUT 342 342 && rc != VERR_INTERRUPTED)) … … 1148 1148 rc = RTSemEventCreate(&pThis->EventUrgRecv); 1149 1149 rc = RTCritSectInit(&pThis->csDevAccess); 1150 rc = PDMDrvHlpTMTimerCreate(pThis->pDrvIns, TMCLOCK_REAL/*enmClock*/, drvNATSlowTimer, 1150 rc = PDMDrvHlpTMTimerCreate(pThis->pDrvIns, TMCLOCK_REAL/*enmClock*/, drvNATSlowTimer, 1151 1151 pThis, TMTIMER_FLAGS_NO_CRIT_SECT/*flags*/, "NATSlowTmr", &pThis->pTmrSlow); 1152 rc = PDMDrvHlpTMTimerCreate(pThis->pDrvIns, TMCLOCK_REAL/*enmClock*/, drvNATFastTimer, 1152 rc = PDMDrvHlpTMTimerCreate(pThis->pDrvIns, TMCLOCK_REAL/*enmClock*/, drvNATFastTimer, 1153 1153 pThis, TMTIMER_FLAGS_NO_CRIT_SECT/*flags*/, "NATFastTmr", &pThis->pTmrFast); 1154 1154 … … 1211 1211 /* szDriverName */ 1212 1212 "NAT", 1213 /* szRCMod */ 1214 "", 1215 /* szR0Mod */ 1216 "", 1213 1217 /* pszDescription */ 1214 1218 "NAT Network Transport Driver", … … 1225 1229 /* pfnDestruct */ 1226 1230 drvNATDestruct, 1231 /* pfnRelocate */ 1232 NULL, 1227 1233 /* pfnIOCtl */ 1228 1234 NULL, -
trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp
r25728 r25893 490 490 /* szDriverName */ 491 491 "NetSniffer", 492 /* szRCMod */ 493 "", 494 /* szR0Mod */ 495 "", 492 496 /* pszDescription */ 493 497 "Network Sniffer Filter Driver", … … 504 508 /* pfnDestruct */ 505 509 drvNetSnifferDestruct, 510 /* pfnRelocate */ 511 NULL, 506 512 /* pfnIOCtl */ 507 513 NULL, -
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r25823 r25893 1067 1067 /* szDriverName */ 1068 1068 "HostInterface", 1069 /* szRCMod */ 1070 "", 1071 /* szR0Mod */ 1072 "", 1069 1073 /* pszDescription */ 1070 1074 "TAP Network Transport Driver", … … 1081 1085 /* pfnDestruct */ 1082 1086 drvTAPDestruct, 1087 /* pfnRelocate */ 1088 NULL, 1083 1089 /* pfnIOCtl */ 1084 1090 NULL, -
trunk/src/VBox/Devices/PC/DrvACPI.cpp
r22277 r25893 749 749 * Check that no-one is attached to us. 750 750 */ 751 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 751 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 752 752 ("Configuration error: Not possible to attach anything to this driver!\n"), 753 753 VERR_PDM_DRVINS_NO_ATTACH); … … 777 777 /* szDriverName */ 778 778 "ACPIHost", 779 /* szRCMod */ 780 "", 781 /* szR0Mod */ 782 "", 779 783 /* pszDescription */ 780 784 "ACPI Host Driver", … … 791 795 /* pfnDestruct */ 792 796 drvACPIDestruct, 797 /* pfnRelocate */ 798 NULL, 793 799 /* pfnIOCtl */ 794 800 NULL, … … 804 810 NULL, 805 811 /* pfnDetach */ 806 NULL, 812 NULL, 807 813 /* pfnPowerOff */ 808 NULL, 814 NULL, 809 815 /* pfnSoftReset */ 810 816 NULL, -
trunk/src/VBox/Devices/PC/DrvAcpiCpu.cpp
r25817 r25893 89 89 * Check that no-one is attached to us. 90 90 */ 91 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 91 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 92 92 ("Configuration error: Not possible to attach anything to this driver!\n"), 93 93 VERR_PDM_DRVINS_NO_ATTACH); … … 105 105 /* szDriverName */ 106 106 "ACPICpu", 107 /* szRCMod */ 108 "", 109 /* szR0Mod */ 110 "", 107 111 /* pszDescription */ 108 112 "ACPI CPU Driver", … … 119 123 /* pfnDestruct */ 120 124 drvACPICpuDestruct, 125 /* pfnRelocate */ 126 NULL, 121 127 /* pfnIOCtl */ 122 128 NULL, … … 132 138 NULL, 133 139 /* pfnDetach */ 134 NULL, 140 NULL, 135 141 /* pfnPowerOff */ 136 NULL, 142 NULL, 137 143 /* pfnSoftReset */ 138 144 NULL, -
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
r25823 r25893 406 406 /* szDriverName */ 407 407 "HostParallel", 408 /* szRCMod */ 409 "", 410 /* szR0Mod */ 411 "", 408 412 /* pszDescription */ 409 413 "Parallel host driver.", … … 420 424 /* pfnDestruct */ 421 425 drvHostParallelDestruct, 426 /* pfnRelocate */ 427 NULL, 422 428 /* pfnIOCtl */ 423 429 NULL, -
trunk/src/VBox/Devices/Serial/DrvChar.cpp
r23745 r25893 304 304 /** 305 305 * Construct a char driver instance. 306 * 306 * 307 307 * @copydoc FNPDMDRVCONSTRUCT 308 308 */ … … 343 343 return PDMDrvHlpVMSetError(pDrvIns, VERR_PDM_MISSING_INTERFACE_BELOW, RT_SRC_POS, N_("Char#%d has no stream interface below"), pDrvIns->iInstance); 344 344 345 /* 345 /* 346 346 * Don't start the receive thread if the driver doesn't support reading 347 347 */ … … 414 414 /* szDriverName */ 415 415 "Char", 416 /* szRCMod */ 417 "", 418 /* szR0Mod */ 419 "", 416 420 /* pszDescription */ 417 421 "Generic char driver.", … … 428 432 /* pfnDestruct */ 429 433 drvCharDestruct, 434 /* pfnRelocate */ 435 NULL, 430 436 /* pfnIOCtl */ 431 437 NULL, … … 441 447 NULL, 442 448 /* pfnDetach */ 443 NULL, 449 NULL, 444 450 /* pfnPowerOff */ 445 NULL, 451 NULL, 446 452 /* pfnSoftReset */ 447 453 NULL, -
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r25823 r25893 1468 1468 /* szDriverName */ 1469 1469 "Host Serial", 1470 /* pszDescription */ 1470 /* szRCMod */ 1471 "", 1472 /* szR0Mod */ 1473 "", 1474 /* pszDescription */ 1471 1475 "Host serial driver.", 1472 1476 /* fFlags */ … … 1482 1486 /* pfnDestruct */ 1483 1487 drvHostSerialDestruct, 1488 /* pfnRelocate */ 1489 NULL, 1484 1490 /* pfnIOCtl */ 1485 1491 NULL, -
trunk/src/VBox/Devices/Serial/DrvNamedPipe.cpp
r22277 r25893 617 617 /* szDriverName */ 618 618 "NamedPipe", 619 /* szRCMod */ 620 "", 621 /* szR0Mod */ 622 "", 619 623 /* pszDescription */ 620 624 "Named Pipe stream driver.", … … 631 635 /* pfnDestruct */ 632 636 drvNamedPipeDestruct, 637 /* pfnRelocate */ 638 NULL, 633 639 /* pfnIOCtl */ 634 640 NULL, -
trunk/src/VBox/Devices/Serial/DrvRawFile.cpp
r24382 r25893 219 219 /* szDriverName */ 220 220 "RawFile", 221 /* szRCMod */ 222 "", 223 /* szR0Mod */ 224 "", 221 225 /* pszDescription */ 222 226 "RawFile stream driver.", … … 233 237 /* pfnDestruct */ 234 238 drvRawFileDestruct, 239 /* pfnRelocate */ 240 NULL, 235 241 /* pfnIOCtl */ 236 242 NULL, -
trunk/src/VBox/Devices/Storage/DrvBlock.cpp
r25891 r25893 903 903 /* szDriverName */ 904 904 "Block", 905 /* szRCMod */ 906 "", 907 /* szR0Mod */ 908 "", 905 909 /* pszDescription */ 906 910 "Generic block driver.", … … 916 920 drvblockConstruct, 917 921 /* pfnDestruct */ 922 NULL, 923 /* pfnRelocate */ 918 924 NULL, 919 925 /* pfnIOCtl */ -
trunk/src/VBox/Devices/Storage/DrvHostDVD.cpp
r24015 r25893 830 830 /* szDriverName */ 831 831 "HostDVD", 832 /* szRCMod */ 833 "", 834 /* szR0Mod */ 835 "", 832 836 /* pszDescription */ 833 837 "Host DVD Block Driver.", … … 844 848 /* pfnDestruct */ 845 849 drvHostDvdDestruct, 850 /* pfnRelocate */ 851 NULL, 846 852 /* pfnIOCtl */ 847 853 NULL, -
trunk/src/VBox/Devices/Storage/DrvHostFloppy.cpp
r22277 r25893 204 204 /* szDriverName */ 205 205 "HostFloppy", 206 /* szRCMod */ 207 "", 208 /* szR0Mod */ 209 "", 206 210 /* pszDescription */ 207 211 "Host Floppy Block Driver.", … … 218 222 /* pfnDestruct */ 219 223 DRVHostBaseDestruct, 224 /* pfnRelocate */ 225 NULL, 220 226 /* pfnIOCtl */ 221 227 NULL, … … 231 237 NULL, 232 238 /* pfnDetach */ 233 NULL, 239 NULL, 234 240 /* pfnPowerOff */ 235 NULL, 241 NULL, 236 242 /* pfnSoftReset */ 237 243 NULL, -
trunk/src/VBox/Devices/Storage/DrvMediaISO.cpp
r22277 r25893 319 319 /* szDriverName */ 320 320 "MediaISO", 321 /* szRCMod */ 322 "", 323 /* szR0Mod */ 324 "", 321 325 /* pszDescription */ 322 326 "ISO media access driver.", … … 333 337 /* pfnDestruct */ 334 338 drvMediaISODestruct, 339 /* pfnRelocate */ 340 NULL, 335 341 /* pfnIOCtl */ 336 342 NULL, … … 346 352 NULL, 347 353 /* pfnDetach */ 348 NULL, 354 NULL, 349 355 /* pfnPowerOff */ 350 NULL, 356 NULL, 351 357 /* pfnSoftReset */ 352 358 NULL, -
trunk/src/VBox/Devices/Storage/DrvRawImage.cpp
r22277 r25893 92 92 /** 93 93 * Construct a raw image driver instance. 94 * 94 * 95 95 * @copydoc FNPDMDRVCONSTRUCT 96 */ 96 */ 97 97 static DECLCALLBACK(int) drvRawImageConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 98 98 { … … 369 369 /* szDriverName */ 370 370 "RawImage", 371 /* szRCMod */ 372 "", 373 /* szR0Mod */ 374 "", 371 375 /* pszDescription */ 372 376 "Raw image access driver.", … … 383 387 /* pfnDestruct */ 384 388 drvRawImageDestruct, 389 /* pfnRelocate */ 390 NULL, 385 391 /* pfnIOCtl */ 386 392 NULL, … … 396 402 NULL, 397 403 /* pfnDetach */ 398 NULL, 404 NULL, 399 405 /* pfnPowerOff */ 400 NULL, 406 NULL, 401 407 /* pfnSoftReset */ 402 408 NULL, -
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r24751 r25893 1028 1028 /* szDriverName */ 1029 1029 "SCSI", 1030 /* szRCMod */ 1031 "", 1032 /* szR0Mod */ 1033 "", 1030 1034 /* pszDescription */ 1031 1035 "Generic SCSI driver.", … … 1042 1046 /* pfnDestruct */ 1043 1047 drvscsiDestruct, 1048 /* pfnRelocate */ 1049 NULL, 1044 1050 /* pfnIOCtl */ 1045 1051 NULL, -
trunk/src/VBox/Devices/Storage/DrvSCSIHost.cpp
r23973 r25893 500 500 /* szDriverName */ 501 501 "SCSIHost", 502 /* szRCMod */ 503 "", 504 /* szR0Mod */ 505 "", 502 506 /* pszDescription */ 503 507 "Host SCSI driver.", … … 514 518 /* pfnDestruct */ 515 519 drvscsihostDestruct, 520 /* pfnRelocate */ 521 NULL, 516 522 /* pfnIOCtl */ 517 523 NULL, -
trunk/src/VBox/Devices/Storage/DrvVD.cpp
r25891 r25893 1318 1318 /* szDriverName */ 1319 1319 "VD", 1320 /* szRCMod */ 1321 "", 1322 /* szR0Mod */ 1323 "", 1320 1324 /* pszDescription */ 1321 1325 "Generic VBox disk media driver.", … … 1332 1336 /* pfnDestruct */ 1333 1337 drvvdDestruct, 1338 /* pfnRelocate */ 1339 NULL, 1334 1340 /* pfnIOCtl */ 1335 1341 NULL, -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r25771 r25893 1249 1249 /* szDriverName */ 1250 1250 "MainDisplay", 1251 /* szRCMod */ 1252 "", 1253 /* szR0Mod */ 1254 "", 1251 1255 /* pszDescription */ 1252 1256 "Main display driver (Main as in the API).", … … 1262 1266 VMDisplay::drvConstruct, 1263 1267 /* pfnDestruct */ 1268 NULL, 1269 /* pfnRelocate */ 1264 1270 NULL, 1265 1271 /* pfnIOCtl */ -
trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.cpp
r22277 r25893 220 220 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 221 221 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 222 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 222 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 223 223 ("Configuration error: Not possible to attach anything to this driver!\n"), 224 224 VERR_PDM_DRVINS_NO_ATTACH); … … 267 267 /* szDriverName */ 268 268 "MainKeyboard", 269 /* szRCMod */ 270 "", 271 /* szR0Mod */ 272 "", 269 273 /* pszDescription */ 270 274 "Main keyboard driver (Main as in the API).", … … 281 285 /* pfnDestruct */ 282 286 Keyboard::drvDestruct, 287 /* pfnRelocate */ 288 NULL, 283 289 /* pfnIOCtl */ 284 290 NULL, … … 294 300 NULL, 295 301 /* pfnDetach */ 296 NULL, 302 NULL, 297 303 /* pfnPowerOff */ 298 NULL, 304 NULL, 299 305 /* pfnSoftReset */ 300 306 NULL, -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp
r25771 r25893 274 274 /* szDriverName */ 275 275 "MainMouse", 276 /* szRCMod */ 277 "", 278 /* szR0Mod */ 279 "", 276 280 /* pszDescription */ 277 281 "Main mouse driver (Main as in the API).", … … 288 292 /* pfnDestruct */ 289 293 Mouse::drvDestruct, 294 /* pfnRelocate */ 295 NULL, 290 296 /* pfnIOCtl */ 291 297 NULL, -
trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.cpp
r22277 r25893 141 141 if (!CFGMR3AreValuesValid(pCfgHandle, "papLeds\0First\0Last\0")) 142 142 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 143 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 143 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 144 144 ("Configuration error: Not possible to attach anything to this driver!\n"), 145 145 VERR_PDM_DRVINS_NO_ATTACH); … … 211 211 /* szDriverName */ 212 212 "MainStatus", 213 /* szRCMod */ 214 "", 215 /* szR0Mod */ 216 "", 213 217 /* pszDescription */ 214 218 "Main status driver (Main as in the API).", … … 225 229 /* pfnDestruct */ 226 230 VMStatus::drvDestruct, 231 /* pfnRelocate */ 232 NULL, 227 233 /* pfnIOCtl */ 228 234 NULL, … … 238 244 NULL, 239 245 /* pfnDetach */ 240 NULL, 246 NULL, 241 247 /* pfnPowerOff */ 242 NULL, 248 NULL, 243 249 /* pfnSoftReset */ 244 250 NULL, -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp
r22793 r25893 500 500 /* szDriverName */ 501 501 "HGCM", 502 /* szRCMod */ 503 "", 504 /* szR0Mod */ 505 "", 502 506 /* pszDescription */ 503 507 "Main VMMDev driver (Main as in the API).", … … 514 518 /* pfnDestruct */ 515 519 VMMDev::drvDestruct, 520 /* pfnRelocate */ 521 NULL, 516 522 /* pfnIOCtl */ 517 523 NULL, -
trunk/src/VBox/Main/AudioSnifferInterface.cpp
r22277 r25893 157 157 158 158 /** 159 * Construct a AudioSniffer driver instance. 160 * 159 * Construct a AudioSniffer driver instance. 160 * 161 161 * @copydoc FNPDMDRVCONSTRUCT 162 162 */ … … 172 172 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 173 173 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 174 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 174 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 175 175 ("Configuration error: Not possible to attach anything to this driver!\n"), 176 176 VERR_PDM_DRVINS_NO_ATTACH); … … 221 221 /* szDriverName */ 222 222 "MainAudioSniffer", 223 /* szRCMod */ 224 "", 225 /* szR0Mod */ 226 "", 223 227 /* pszDescription */ 224 228 "Main Audio Sniffer driver (Main as in the API).", … … 235 239 /* pfnDestruct */ 236 240 AudioSniffer::drvDestruct, 241 /* pfnRelocate */ 242 NULL, 237 243 /* pfnIOCtl */ 238 244 NULL, … … 248 254 NULL, 249 255 /* pfnDetach */ 250 NULL, 256 NULL, 251 257 /* pfnPowerOff */ 252 NULL, 258 NULL, 253 259 /* pfnSoftReset */ 254 260 NULL, -
trunk/src/VBox/Main/ConsoleImpl.cpp
r25860 r25893 7976 7976 /* szDriverName */ 7977 7977 "MainStatus", 7978 /* szRCMod */ 7979 "", 7980 /* szR0Mod */ 7981 "", 7978 7982 /* pszDescription */ 7979 7983 "Main status driver (Main as in the API).", … … 7990 7994 /* pfnDestruct */ 7991 7995 Console::drvStatus_Destruct, 7996 /* pfnRelocate */ 7997 NULL, 7992 7998 /* pfnIOCtl */ 7993 7999 NULL, -
trunk/src/VBox/Main/DisplayImpl.cpp
r25860 r25893 3508 3508 /* szDriverName */ 3509 3509 "MainDisplay", 3510 /* szRCMod */ 3511 "", 3512 /* szR0Mod */ 3513 "", 3510 3514 /* pszDescription */ 3511 3515 "Main display driver (Main as in the API).", … … 3522 3526 /* pfnDestruct */ 3523 3527 Display::drvDestruct, 3528 /* pfnRelocate */ 3529 NULL, 3524 3530 /* pfnIOCtl */ 3525 3531 NULL, -
trunk/src/VBox/Main/KeyboardImpl.cpp
r25860 r25893 332 332 /* szDriverName */ 333 333 "MainKeyboard", 334 /* szRCMod */ 335 "", 336 /* szR0Mod */ 337 "", 334 338 /* pszDescription */ 335 339 "Main keyboard driver (Main as in the API).", … … 346 350 /* pfnDestruct */ 347 351 Keyboard::drvDestruct, 352 /* pfnRelocate */ 353 NULL, 348 354 /* pfnIOCtl */ 349 355 NULL, -
trunk/src/VBox/Main/MouseImpl.cpp
r25860 r25893 459 459 /* szDriverName */ 460 460 "MainMouse", 461 /* szRCMod */ 462 "", 463 /* szR0Mod */ 464 "", 461 465 /* pszDescription */ 462 466 "Main mouse driver (Main as in the API).", … … 473 477 /* pfnDestruct */ 474 478 Mouse::drvDestruct, 479 /* pfnRelocate */ 480 NULL, 475 481 /* pfnIOCtl */ 476 482 NULL, -
trunk/src/VBox/Main/VMMDevInterface.cpp
r22793 r25893 836 836 /* szDriverName */ 837 837 "HGCM", 838 /* szRCMod */ 839 "", 840 /* szR0Mod */ 841 "", 838 842 /* pszDescription */ 839 843 "Main VMMDev driver (Main as in the API).", … … 850 854 /* pfnDestruct */ 851 855 VMMDev::drvDestruct, 856 /* pfnRelocate */ 857 NULL, 852 858 /* pfnIOCtl */ 853 859 NULL, -
trunk/src/VBox/Main/include/KeyboardImpl.h
r23223 r25893 107 107 }; 108 108 109 #endif // ____H_KEYBOARDIMPL109 #endif // !____H_KEYBOARDIMPL 110 110 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/VMM/PDMDevHlp.cpp
r25891 r25893 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as -
trunk/src/VBox/VMM/PDMDevice.cpp
r24730 r25893 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Sun Microsystems, Inc.7 * Copyright (C) 2006-2010 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as -
trunk/src/VBox/VMM/PDMDriver.cpp
r25891 r25893 276 276 */ 277 277 AssertPtrReturn(pDrvReg, VERR_INVALID_POINTER); 278 AssertMsgReturn(pDrvReg->u32Version == PDM_DRVREG_VERSION, ("%#x\n", pDrvReg->u32Version), VERR_PDM_UNKNOWN_DRVREG_VERSION); 278 AssertMsgReturn(pDrvReg->u32Version == PDM_DRVREG_VERSION, 279 ("%#x\n", pDrvReg->u32Version), 280 VERR_PDM_UNKNOWN_DRVREG_VERSION); 279 281 AssertReturn(pDrvReg->szDriverName[0], VERR_PDM_INVALID_DRIVER_REGISTRATION); 280 282 AssertMsgReturn(memchr(pDrvReg->szDriverName, '\0', sizeof(pDrvReg->szDriverName)), 281 283 (".*s\n", sizeof(pDrvReg->szDriverName), pDrvReg->szDriverName), 282 284 VERR_PDM_INVALID_DRIVER_REGISTRATION); 285 AssertMsgReturn( !(pDrvReg->fFlags & PDM_DRVREG_FLAGS_R0) 286 || ( pDrvReg->szR0Mod[0] 287 && memchr(pDrvReg->szR0Mod, '\0', sizeof(pDrvReg->szR0Mod))), 288 ("%s: %.*s\n", pDrvReg->szDriverName, sizeof(pDrvReg->szR0Mod), pDrvReg->szR0Mod), 289 VERR_PDM_INVALID_DRIVER_REGISTRATION); 290 AssertMsgReturn( !(pDrvReg->fFlags & PDM_DRVREG_FLAGS_RC) 291 || ( pDrvReg->szRCMod[0] 292 && memchr(pDrvReg->szRCMod, '\0', sizeof(pDrvReg->szRCMod))), 293 ("%s: %.*s\n", pDrvReg->szDriverName, sizeof(pDrvReg->szRCMod), pDrvReg->szRCMod), 294 VERR_PDM_INVALID_DRIVER_REGISTRATION); 295 AssertMsgReturn(VALID_PTR(pDrvReg->pszDescription), 296 ("%s: %p\n", pDrvReg->szDriverName, pDrvReg->pszDescription), 297 VERR_PDM_INVALID_DRIVER_REGISTRATION); 298 AssertMsgReturn(!(pDrvReg->fFlags & ~(PDM_DRVREG_FLAGS_HOST_BITS_MASK | PDM_DRVREG_FLAGS_R0 | PDM_DRVREG_FLAGS_RC)), 299 ("%s: %#x\n", pDrvReg->szDriverName, pDrvReg->fFlags), 300 VERR_PDM_INVALID_DRIVER_REGISTRATION); 283 301 AssertMsgReturn((pDrvReg->fFlags & PDM_DRVREG_FLAGS_HOST_BITS_MASK) == PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT, 284 ("%s: fFlags=%#x\n", pDrvReg->szDriverName, pDrvReg->fFlags),302 ("%s: %#x\n", pDrvReg->szDriverName, pDrvReg->fFlags), 285 303 VERR_PDM_INVALID_DRIVER_HOST_BITS); 286 AssertMsgReturn(pDrvReg->cMaxInstances > 0, ("%s: %#x\n", pDrvReg->szDriverName, pDrvReg->cMaxInstances), 304 AssertMsgReturn(pDrvReg->cMaxInstances > 0, 305 ("%s: %#x\n", pDrvReg->szDriverName, pDrvReg->cMaxInstances), 287 306 VERR_PDM_INVALID_DRIVER_REGISTRATION); 288 AssertMsgReturn(pDrvReg->cbInstance <= _1M, ("%s: %#x\n", pDrvReg->szDriverName, pDrvReg->cbInstance), 307 AssertMsgReturn(pDrvReg->cbInstance <= _1M, 308 ("%s: %#x\n", pDrvReg->szDriverName, pDrvReg->cbInstance), 289 309 VERR_PDM_INVALID_DRIVER_REGISTRATION); 290 AssertMsgReturn(VALID_PTR(pDrvReg->pfnConstruct), ("%s: %p\n", pDrvReg->szDriverName, pDrvReg->pfnConstruct), 310 AssertMsgReturn(VALID_PTR(pDrvReg->pfnConstruct), 311 ("%s: %p\n", pDrvReg->szDriverName, pDrvReg->pfnConstruct), 291 312 VERR_PDM_INVALID_DRIVER_REGISTRATION); 292 AssertMsgReturn(pDrvReg->pfnSoftReset == NULL, ("%s: %p\n", pDrvReg->szDriverName, pDrvReg->pfnSoftReset), 313 AssertMsgReturn(VALID_PTR(pDrvReg->pfnRelocate) || !(pDrvReg->fFlags & PDM_DRVREG_FLAGS_RC), 314 ("%s: %#x\n", pDrvReg->szDriverName, pDrvReg->cbInstance), 293 315 VERR_PDM_INVALID_DRIVER_REGISTRATION); 294 AssertMsgReturn(pDrvReg->u32VersionEnd == PDM_DRVREG_VERSION, ("%s: #x\n", pDrvReg->szDriverName, pDrvReg->u32VersionEnd), 316 AssertMsgReturn(pDrvReg->pfnSoftReset == NULL, 317 ("%s: %p\n", pDrvReg->szDriverName, pDrvReg->pfnSoftReset), 318 VERR_PDM_INVALID_DRIVER_REGISTRATION); 319 AssertMsgReturn(pDrvReg->u32VersionEnd == PDM_DRVREG_VERSION, 320 ("%s: #x\n", pDrvReg->szDriverName, pDrvReg->u32VersionEnd), 295 321 VERR_PDM_INVALID_DRIVER_REGISTRATION); 296 322 … … 910 936 911 937 /** @copydoc PDMDRVHLP::pfnPDMQueueCreate */ 912 static DECLCALLBACK(int) pdmR3DrvHlp_PDMQueueCreate(PPDMDRVINS pDrvIns, RTUINT cbItem, RTUINTcItems, uint32_t cMilliesInterval,938 static DECLCALLBACK(int) pdmR3DrvHlp_PDMQueueCreate(PPDMDRVINS pDrvIns, uint32_t cbItem, uint32_t cItems, uint32_t cMilliesInterval, 913 939 PFNPDMQUEUEDRV pfnCallback, const char *pszName, PPDMQUEUE *ppQueue) 914 940 {
Note:
See TracChangeset
for help on using the changeset viewer.