- Timestamp:
- Jul 25, 2007 7:09:09 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDM.cpp
r3520 r3852 627 627 * Resume all threads. 628 628 */ 629 ///@todo pdmR3ThreadResumeAll(pVM); 629 ///@todo pdmR3ThreadResumeAll(pVM); 630 630 631 631 LogFlow(("PDMR3PowerOn: returns void\n")); … … 717 717 * Suspend all threads. 718 718 */ 719 ///@todo pdmR3ThreadSuspendAll(pVM); 719 ///@todo pdmR3ThreadSuspendAll(pVM); 720 720 721 721 LogFlow(("PDMR3Suspend: returns void\n")); … … 760 760 * Resume all threads. 761 761 */ 762 ///@todo pdmR3ThreadResumeAll(pVM); 762 ///@todo pdmR3ThreadResumeAll(pVM); 763 763 764 764 LogFlow(("PDMR3Resume: returns void\n")); … … 820 820 * @param iInstance Device instance. 821 821 * @param ppBase Where to store the pointer to the base device interface on success. 822 * @remark We're doing any locking ATM, so don't try call this at times when the822 * @remark We're not doing any locking ATM, so don't try call this at times when the 823 823 * device chain is known to be updated. 824 824 */ … … 877 877 * @param iLun The Logical Unit to obtain the interface of. 878 878 * @param ppBase Where to store the base interface pointer. 879 * @remark We're doing any locking ATM, so don't try call this at times when the879 * @remark We're not doing any locking ATM, so don't try call this at times when the 880 880 * device chain is known to be updated. 881 881 */ … … 910 910 * @param iLun The Logical Unit to obtain the interface of. 911 911 * @param ppBase Where to store the base interface pointer. 912 * @remark We're doing any locking ATM, so don't try call this at times when the912 * @remark We're not doing any locking ATM, so don't try call this at times when the 913 913 * device chain is known to be updated. 914 914 */ -
trunk/src/VBox/VMM/PDMDriver.cpp
r3520 r3852 93 93 static DECLCALLBACK(void) pdmR3DrvHlp_STAMRegisterV(PPDMDRVINS pDrvIns, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility, STAMUNIT enmUnit, const char *pszDesc, const char *pszName, va_list args); 94 94 static DECLCALLBACK(int) pdmR3DrvHlp_SUPCallVMMR0Ex(PPDMDRVINS pDrvIns, unsigned uOperation, void *pvArg, unsigned cbArg); 95 static DECLCALLBACK(int) pdmR3DrvHlp_USBRegisterHub(PPDMDRVINS pDrvIns, void *pvReservedIn, void **ppvReservedHlp); 95 96 96 97 /** @def PDMDRV_ASSERT_DRVINS … … 138 139 pdmR3DrvHlp_STAMRegisterV, 139 140 pdmR3DrvHlp_SUPCallVMMR0Ex, 141 pdmR3DrvHlp_USBRegisterHub, 140 142 0 /* the end */ 141 143 }; … … 996 998 } 997 999 998 LogFlow(("pdmR3DrvHlp_SSMDeregister: caller='%s'/%d: returns %Vrc\n", pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, rc)); 999 return rc; 1000 } 1001 1000 LogFlow(("pdmR3DrvHlp_SUPCallVMMR0Ex: caller='%s'/%d: returns %Vrc\n", pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, rc)); 1001 return rc; 1002 } 1003 1004 1005 1006 /** @copydoc PDMDRVHLP::pfnUSBRegisterHub */ 1007 static DECLCALLBACK(int) pdmR3DrvHlp_USBRegisterHub(PPDMDRVINS pDrvIns, void *pvReservedIn, void **ppvReservedHlp) 1008 { 1009 PDMDRV_ASSERT_DRVINS(pDrvIns); 1010 VM_ASSERT_EMT(pDrvIns->Internal.s.pVM); 1011 LogFlow(("pdmR3DrvHlp_USBRegisterHub: caller='%s'/%d: pvReservedIn=%p ppvReservedHlp=%p\n", 1012 pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, pvReservedIn, ppvReservedHlp)); 1013 1014 // int rc = PDMUSBRegisterHub(pDrvIns->Internal.s.pVM, pvReservedIn, ppvReservedHlp); 1015 int rc = VERR_NOT_IMPLEMENTED; 1016 1017 LogFlow(("pdmR3DrvHlp_USBRegisterHub: caller='%s'/%d: returns %Vrc\n", pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, rc)); 1018 return rc; 1019 } 1020 -
trunk/src/VBox/VMM/PDMInternal.h
r3723 r3852 48 48 typedef PPDMDEV *PPPDMDEV; 49 49 50 /** Pointer to a PDM USB Device. */ 51 typedef struct PDMUSB *PPDMUSB; 52 /** Pointer to a pointer to a PDM USB Device. */ 53 typedef PPDMUSB *PPPDMUSB; 54 50 55 /** Pointer to a PDM Driver. */ 51 56 typedef struct PDMDRV *PPDMDRV; … … 65 70 typedef struct PDMRTC *PPDMRTC; 66 71 67 68 /** 69 * Private instance data. 72 /** Pointer to an USB HUB registration record. */ 73 typedef struct PDMUSBHUB *PPDMUSBHUB; 74 75 /** 76 * Private device instance data. 70 77 */ 71 78 typedef struct PDMDEVINSINT … … 105 112 106 113 /** 107 * Private instance data. 114 * Private USB device instance data. 115 */ 116 typedef struct PDMUSBINSINT 117 { 118 /** Pointer to the next instance. 119 * (Head is pointed to by PDM::pUsbInstances.) */ 120 R3PTRTYPE(PPDMUSBINS) pNext; 121 /** Pointer to the next per USB device instance. 122 * (Head is pointed to by PDMUSB::pInstances.) */ 123 R3PTRTYPE(PPDMUSBINS) pPerDeviceNext; 124 125 /** Pointer to device structure. */ 126 R3PTRTYPE(PPDMUSB) pUsb; 127 128 /** Pointer to the VM this instance was created for. */ 129 PVMR3 pVM; 130 /** Pointer to the list of logical units associated with the device. (FIFO) */ 131 R3PTRTYPE(PPDMLUN) pLuns; 132 /** The per instance device configuration. */ 133 R3PTRTYPE(PCFGMNODE) pCfg; 134 /** The global device configuration. */ 135 R3PTRTYPE(PCFGMNODE) pCfgGlobal; 136 137 /** Pointer to the USB hub this device is connected to. */ 138 R3PTRTYPE(PPDMUSBHUB) pHub; 139 /** The port number that we're connected to. */ 140 uint32_t iPort; 141 #if HC_ARCH_BITS == 64 142 uint32_t Alignment0; 143 #endif 144 } PDMUSBINSINT; 145 146 147 /** 148 * Private driver instance data. 108 149 */ 109 150 typedef struct PDMDRVINSINT … … 206 247 /* Must be included after PDMDEVINSINT is defined. */ 207 248 #define PDMDEVINSINT_DECLARED 249 #define PDMUSBINSINT_DECLARED 208 250 #define PDMDRVINSINT_DECLARED 209 251 #define PDMCRITSECTINT_DECLARED … … 213 255 #endif 214 256 #include <VBox/pdm.h> 215 216 257 217 258 … … 232 273 /** Pointer to the top driver in the driver chain. */ 233 274 PPDMDRVINS pTop; 234 /** Pointer to the device instance which the LUN belongs to. */ 275 /** Pointer to the device instance which the LUN belongs to. 276 * Either this is set or pUsbIns is set. Both is never set at the same time. */ 235 277 PPDMDEVINS pDevIns; 278 /** Pointer to the USB device instance which the LUN belongs to. */ 279 PPDMUSBINS pUsbIns; 236 280 /** Pointer to the device base interface. */ 237 281 PPDMIBASE pBase; … … 256 300 /** Pointer to chain of instances (HC Ptr). */ 257 301 HCPTRTYPE(PPDMDEVINS) pInstances; 258 259 302 } PDMDEV; 260 303 261 304 262 305 /** 306 * PDM USB Device. 307 */ 308 typedef struct PDMUSB 309 { 310 /** Pointer to the next device (R3 Ptr). */ 311 R3PTRTYPE(PPDMUSB) pNext; 312 /** Device name length. (search optimization) */ 313 RTUINT cchName; 314 /** Registration structure. */ 315 R3PTRTYPE(const struct PDMUSBREG *) pUsbReg; 316 /** Number of instances. */ 317 RTUINT cInstances; 318 /** Pointer to chain of instances (R3 Ptr). */ 319 R3PTRTYPE(PPDMUSBINS) pInstances; 320 } PDMUSB; 321 322 323 /** 263 324 * PDM Driver. 264 325 */ … … 266 327 { 267 328 /** Pointer to the next device. */ 268 PPDMDRV pNext;329 PPDMDRV pNext; 269 330 /** Registration structure. */ 270 const struct PDMDRVREG * pDrvReg;331 const struct PDMDRVREG * pDrvReg; 271 332 /** Number of instances. */ 272 RTUINT cInstances; 273 333 RTUINT cInstances; 274 334 } PDMDRV; 275 335 … … 657 717 658 718 /** 719 * An USB hub registration record. 720 */ 721 typedef struct PDMUSBHUB 722 { 723 /** The USB versions this hub support. 724 * Note that 1.1 hubs can take on 2.0 devices. */ 725 uint32_t fVersions; 726 /** The number of occupied ports. */ 727 uint32_t cAvailablePorts; 728 /** Pointer to the next hub in the list. */ 729 struct PDMUSBHUB *pNext; 730 /** The driver instance of the hub.. */ 731 PPDMDRVINS pDrvIns; 732 733 } PDMUSBHUB; 734 735 /** Pointer to a const USB HUB registration record. */ 736 typedef const PDMUSBHUB *PCPDMUSBHUB; 737 738 739 /** 659 740 * Converts a PDM pointer into a VM pointer. 660 741 * @returns Pointer to the VM structure the PDM is part of. … … 682 763 /** List of devices instances. (FIFO) */ 683 764 HCPTRTYPE(PPDMDEVINS) pDevInstances; 765 /** List of registered USB devices. (FIFO) */ 766 R3PTRTYPE(PPDMUSB) pUsbDevs; 767 /** List of USB devices instances. (FIFO) */ 768 R3PTRTYPE(PPDMUSBINS) pUsbInstances; 684 769 /** List of registered drivers. (FIFO) */ 685 770 HCPTRTYPE(PPDMDRV) pDrvs; … … 698 783 /** The registered RTC device. */ 699 784 HCPTRTYPE(PPDMRTC) pRtc; 785 /** The registered USB HUBs. (FIFO) */ 786 R3PTRTYPE(PPDMUSBHUB) pUSBHubs; 700 787 701 788 /** Queue in which devhlp tasks are queued for R3 execution - HC Ptr. */ … … 719 806 /** Pointer to the queue which should be manually flushed - GCPtr. */ 720 807 GCPTRTYPE(struct PDMQUEUE *) pQueueFlushGC; 721 722 808 #if HC_ARCH_BITS == 64 723 809 uint32_t padding0; … … 778 864 int pdmR3DevFindLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMLUN *ppLun); 779 865 866 int pdmR3UsbInit(PVM pVM); 867 PPDMUSB pdmR3UsbLookup(PVM pVM, const char *pszName); 868 int pdmR3UsbFindLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMLUN *ppLun); 869 780 870 int pdmR3DrvInit(PVM pVM); 781 871 int pdmR3DrvDetach(PPDMDRVINS pDrvIns); … … 790 880 791 881 void pdmR3ThreadDestroyDevice(PVM pVM, PPDMDEVINS pDevIns); 882 void pdmR3ThreadDestroyUsb(PVM pVM, PPDMUSBINS pUsbIns); 792 883 void pdmR3ThreadDestroyDriver(PVM pVM, PPDMDRVINS pDrvIns); 793 884 void pdmR3ThreadDestroyAll(PVM pVM); -
trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp
r2981 r3852 177 177 GEN_CHECK_OFF(PDM, pDevs); 178 178 GEN_CHECK_OFF(PDM, pDevInstances); 179 GEN_CHECK_OFF(PDM, pUsbDevs); 180 GEN_CHECK_OFF(PDM, pUsbInstances); 179 181 GEN_CHECK_OFF(PDM, pDrvs); 180 182 GEN_CHECK_OFF(PDM, pCritSects); … … 233 235 GEN_CHECK_OFF(PDM, pDmac); 234 236 GEN_CHECK_OFF(PDM, pRtc); 237 GEN_CHECK_OFF(PDM, pUSBHubs); 235 238 GEN_CHECK_OFF(PDM, pDevHlpQueueGC); 236 239 GEN_CHECK_OFF(PDM, pDevHlpQueueHC); … … 241 244 GEN_CHECK_OFF(PDM, pQueueFlushGC); 242 245 GEN_CHECK_OFF(PDM, pQueueFlushHC); 246 GEN_CHECK_OFF(PDM, pThreads); 247 GEN_CHECK_OFF(PDM, pThreadsTail); 243 248 GEN_CHECK_OFF(PDM, cPollers); 244 249 GEN_CHECK_OFF(PDM, apfnPollers); … … 804 809 GEN_CHECK_OFF(PATCHINFO, aPrivInstr[MAX_INSTR_SIZE - 1]); 805 810 GEN_CHECK_OFF(PATCHINFO, cbPrivInstr); 806 GEN_CHECK_OFF(PATCHINFO, opcode); 811 GEN_CHECK_OFF(PATCHINFO, opcode); 807 812 GEN_CHECK_OFF(PATCHINFO, cbPatchJump); 808 813 GEN_CHECK_OFF(PATCHINFO, pPatchJumpDestGC); -
trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp
r2981 r3852 3 3 * tstVMStructSize - testcase for check structure sizes/alignment 4 4 * and to verify that HC and GC uses the same 5 * representation of the structures. 5 * representation of the structures. 6 6 */ 7 7 … … 202 202 rc++; 203 203 } 204 #endif 204 #endif 205 205 206 206 /* pdm */ 207 207 CHECK_MEMBER_ALIGNMENT(PDMDEVINS, achInstanceData, 16); 208 208 CHECK_PADDING(PDMDEVINS, Internal); 209 CHECK_MEMBER_ALIGNMENT(PDMUSBINS, achInstanceData, 16); 210 CHECK_PADDING(PDMUSBINS, Internal); 209 211 CHECK_MEMBER_ALIGNMENT(PDMDRVINS, achInstanceData, 16); 210 212 CHECK_PADDING(PDMDRVINS, Internal);
Note:
See TracChangeset
for help on using the changeset viewer.