Changeset 5613 in vbox
- Timestamp:
- Nov 2, 2007 12:56:49 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 25906
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r5586 r5613 1355 1355 1356 1356 #ifdef VBOX_WITH_EHCI 1357 rc = CFGMR3InsertNode(pDevices, "usb-ehci", &pDev); RC_CHECK(); 1358 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 1359 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1360 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 1361 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 11); RC_CHECK(); 1362 Assert(!faPciDeviceNo[11]); 1363 faPciDeviceNo[11] = true; 1364 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 1365 1366 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1367 rc = CFGMR3InsertString(pLunL0, "Driver", "VUSBRootHub"); RC_CHECK(); 1368 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1369 1370 /* 1371 * Attach the status driver. 1372 */ 1373 rc = CFGMR3InsertNode(pInst, "LUN#999", &pLunL0); RC_CHECK(); 1374 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 1375 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1376 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapUSBLed);RC_CHECK(); 1377 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 1378 rc = CFGMR3InsertInteger(pCfg, "Last", 0); RC_CHECK(); 1357 hrc = USBCtlPtr->COMGETTER(EnabledEhci)(&fEnabled); H(); 1358 if (fEnabled) 1359 { 1360 rc = CFGMR3InsertNode(pDevices, "usb-ehci", &pDev); RC_CHECK(); 1361 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 1362 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1363 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 1364 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 11); RC_CHECK(); 1365 Assert(!faPciDeviceNo[11]); 1366 faPciDeviceNo[11] = true; 1367 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 1368 1369 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1370 rc = CFGMR3InsertString(pLunL0, "Driver", "VUSBRootHub"); RC_CHECK(); 1371 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1372 1373 /* 1374 * Attach the status driver. 1375 */ 1376 rc = CFGMR3InsertNode(pInst, "LUN#999", &pLunL0); RC_CHECK(); 1377 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 1378 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1379 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapUSBLed);RC_CHECK(); 1380 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 1381 rc = CFGMR3InsertInteger(pCfg, "Last", 0); RC_CHECK(); 1382 } 1379 1383 #endif 1380 1384 } -
trunk/src/VBox/Main/USBControllerImpl.cpp
r5162 r5613 241 241 } 242 242 243 STDMETHODIMP USBController::COMGETTER(EnabledEhci) (BOOL *aEnabled) 244 { 245 if (!aEnabled) 246 return E_POINTER; 247 248 AutoCaller autoCaller (this); 249 CheckComRCReturnRC (autoCaller.rc()); 250 251 AutoReaderLock alock (this); 252 253 *aEnabled = mData->mEnabledEhci; 254 255 return S_OK; 256 } 257 258 STDMETHODIMP USBController::COMSETTER(EnabledEhci) (BOOL aEnabled) 259 { 260 LogFlowThisFunc (("aEnabled=%RTbool\n", aEnabled)); 261 262 AutoCaller autoCaller (this); 263 CheckComRCReturnRC (autoCaller.rc()); 264 265 /* the machine needs to be mutable */ 266 Machine::AutoMutableStateDependency adep (mParent); 267 CheckComRCReturnRC (adep.rc()); 268 269 AutoLock alock (this); 270 271 if (mData->mEnabledEhci != aEnabled) 272 { 273 mData.backup(); 274 mData->mEnabledEhci = aEnabled; 275 276 /* leave the lock for safety */ 277 alock.leave(); 278 279 mParent->onUSBControllerChange(); 280 } 281 282 return S_OK; 283 } 284 243 285 STDMETHODIMP USBController::COMGETTER(USBStandard) (USHORT *aUSBStandard) 244 286 { … … 251 293 /* not accessing data -- no need to lock */ 252 294 295 /** Note: This is no longer correct */ 253 296 *aUSBStandard = 0x0101; 254 297 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r5528 r5613 7726 7726 </attribute> 7727 7727 7728 <attribute name="enabledEhci" type="boolean"> 7729 <desc> 7730 Flag whether the USB EHCI controller is present in the 7731 guest system. If disabled, the virtual guest hardware will 7732 not contain a USB EHCI controller. Can only be changed when 7733 the VM is powered off. 7734 </desc> 7735 </attribute> 7736 7728 7737 <attribute name="USBStandard" type="unsigned short" readonly="yes"> 7729 7738 <desc> -
trunk/src/VBox/Main/include/USBControllerImpl.h
r4071 r5613 47 47 { 48 48 /* Constructor. */ 49 Data() : mEnabled (FALSE) { }49 Data() : mEnabled (FALSE), mEnabledEhci (FALSE) { } 50 50 51 51 bool operator== (const Data &that) const 52 52 { 53 return this == &that || mEnabled == that.mEnabled;53 return this == &that || (mEnabled == that.mEnabled && mEnabledEhci == that.mEnabledEhci); 54 54 } 55 55 56 56 /** Enabled indicator. */ 57 57 BOOL mEnabled; 58 59 /** Enabled indicator for EHCI. */ 60 BOOL mEnabledEhci; 58 61 }; 59 62 … … 87 90 STDMETHOD(COMGETTER(Enabled)) (BOOL *aEnabled); 88 91 STDMETHOD(COMSETTER(Enabled)) (BOOL aEnabled); 92 STDMETHOD(COMGETTER(EnabledEhci)) (BOOL *aEnabled); 93 STDMETHOD(COMSETTER(EnabledEhci)) (BOOL aEnabled); 89 94 STDMETHOD(COMGETTER(USBStandard)) (USHORT *aUSBStandard); 90 95 STDMETHOD(COMGETTER(DeviceFilters)) (IUSBDeviceFilterCollection **aDevicesFilters); -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r5361 r5613 534 534 </xsd:sequence> 535 535 <xsd:attribute name="enabled" type="xsd:boolean" use="required"/> 536 <xsd:attribute name="enabledEhci" type="xsd:boolean" default="false"/> 536 537 </xsd:complexType> 537 538
Note:
See TracChangeset
for help on using the changeset viewer.