Changeset 17075 in vbox
- Timestamp:
- Feb 24, 2009 3:13:31 PM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevATA.cpp
r16745 r17075 6124 6124 * Validate and read configuration. 6125 6125 */ 6126 if (!CFGMR3AreValuesValid(pCfgHandle, "GCEnabled\0IRQDelay\0R0Enabled\0 PIIX4\0ICH6\0"))6126 if (!CFGMR3AreValuesValid(pCfgHandle, "GCEnabled\0IRQDelay\0R0Enabled\0Type\0")) 6127 6127 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 6128 6128 N_("PIIX3 configuration error: unknown option specified")); … … 6148 6148 6149 6149 pThis->u8Type = CHIPSET_PIIX3; 6150 bool fPIIX4;6151 rc = CFGMR3Query BoolDef(pCfgHandle, "PIIX4", &fPIIX4, false);6150 uint32_t type; 6151 rc = CFGMR3QueryU32Def(pCfgHandle, "Type", &type, 0); 6152 6152 if (RT_FAILURE(rc)) 6153 6153 return PDMDEV_SET_ERROR(pDevIns, rc, 6154 N_("PIIX3 configuration error: failed to read PIIX4 as boolean")); 6155 Log(("%s: fPIIX4=%d\n", __FUNCTION__, fPIIX4)); 6156 if (fPIIX4) 6157 pThis->u8Type = CHIPSET_PIIX4; 6158 6159 /** @todo: Need to implement better IDE chipset configuration mechanism */ 6160 bool fICH6; 6161 rc = CFGMR3QueryBoolDef(pCfgHandle, "ICH6", &fICH6, false); 6162 if (RT_FAILURE(rc)) 6163 return PDMDEV_SET_ERROR(pDevIns, rc, 6164 N_("PIIX3 configuration error: failed to read ICH6 as boolean")); 6165 Log(("%s: fICH6=%d\n", __FUNCTION__, fICH6)); 6166 if (fICH6) 6167 pThis->u8Type = CHIPSET_ICH6; 6154 N_("PIIX3 configuration error: failed to read Type as integer")); 6155 Log(("%s: type=%d\n", __FUNCTION__, type)); 6156 /** See IDEControllerType in VirtualBox.xidl */ 6157 switch (type) 6158 { 6159 case 0: 6160 /** @todo: what is right here? */ 6161 AssertMsgFailed(("What do we do here: type Null\n")); 6162 break; 6163 case 1: 6164 pThis->u8Type = CHIPSET_PIIX3; 6165 break; 6166 case 2: 6167 pThis->u8Type = CHIPSET_PIIX4; 6168 break; 6169 case 3: 6170 pThis->u8Type = CHIPSET_ICH6; 6171 break; 6172 default: 6173 AssertMsgFailed(("Unknown IDE type: %d\n", type)); 6174 } 6168 6175 6169 6176 /* -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r16966 r17075 503 503 case IDEControllerType_PIIX4: 504 504 pszIdeController = "PIIX4"; 505 break; 506 case IDEControllerType_ICH6: 507 pszIdeController = "ICH6"; 505 508 break; 506 509 default: -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r16971 r17075 3438 3438 mIDEControllerTypes [KIDEControllerType_PIIX4] = 3439 3439 tr ("PIIX4", "IDEControllerType"); 3440 mIDEControllerTypes [KIDEControllerType_ICH6] = 3441 tr ("ICH6", "IDEControllerType"); 3440 3442 3441 3443 mUSBDeviceStates [KUSBDeviceState_NotSupported] = -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWgt.cpp
r17053 r17075 445 445 e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX3), "PIIX3"); 446 446 e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX4), "PIIX4"); 447 e->addItem (vboxGlobal().toString (KIDEControllerType_ICH6), "ICH6"); 447 448 editor = e; 448 449 break; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp
r16589 r17075 138 138 mCbIDEController->addItem (""); /* KIDEControllerType_PIIX3 */ 139 139 mCbIDEController->addItem (""); /* KIDEControllerType_PIIX4 */ 140 mCbIDEController->addItem (""); /* KIDEControllerType_ICH6 */ 140 141 141 142 qApp->installEventFilter (this); … … 460 461 mCbIDEController->setItemText (0, vboxGlobal().toString (KIDEControllerType_PIIX3)); 461 462 mCbIDEController->setItemText (1, vboxGlobal().toString (KIDEControllerType_PIIX4)); 463 mCbIDEController->setItemText (2, vboxGlobal().toString (KIDEControllerType_ICH6)); 462 464 463 465 /* Path selector */ -
trunk/src/VBox/Main/ApplianceImpl.cpp
r17055 r17075 1883 1883 else if (!strcmp(pcszIDEType, "PIIX4")) 1884 1884 rc = biosSettings->COMSETTER(IDEControllerType)(IDEControllerType_PIIX4); 1885 else if (!strcmp(pcszIDEType, "ICH6")) 1886 rc = biosSettings->COMSETTER(IDEControllerType)(IDEControllerType_ICH6); 1885 1887 else 1886 1888 throw setError(VBOX_E_FILE_ERROR, -
trunk/src/VBox/Main/BIOSSettingsImpl.cpp
r16560 r17075 442 442 case IDEControllerType_PIIX3: 443 443 case IDEControllerType_PIIX4: 444 case IDEControllerType_ICH6: 444 445 break; 445 446 default: … … 601 602 else if (strcmp (typeStr, "PIIX4") == 0) 602 603 mData->mIDEControllerType = IDEControllerType_PIIX4; 604 else if (strcmp (typeStr, "ICH6") == 0) 605 mData->mIDEControllerType = IDEControllerType_ICH6; 603 606 else 604 607 ComAssertMsgFailedRet (("Invalid boot menu mode '%s'", typeStr), … … 698 701 ideControllerTypeStr = "PIIX4"; 699 702 break; 703 case IDEControllerType_ICH6: 704 ideControllerTypeStr = "ICH6"; 705 break; 700 706 default: 701 707 ComAssertMsgFailedRet (("Invalid IDE Controller type: %d", -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r16967 r17075 276 276 */ 277 277 IDEControllerType_T controllerType; 278 BOOL fPIIX4, fICH6;279 278 hrc = biosSettings->COMGETTER(IDEControllerType)(&controllerType); H(); 280 switch (controllerType)281 {282 case IDEControllerType_PIIX3:283 fPIIX4 = FALSE;284 break;285 case IDEControllerType_PIIX4:286 fPIIX4 = TRUE;287 break;288 default:289 AssertMsgFailed(("Invalid IDE controller type '%d'", controllerType));290 return VMSetError(pVM, VERR_INVALID_PARAMETER, RT_SRC_POS,291 N_("Invalid IDE controller type '%d'"), controllerType);292 }293 #ifdef VBOX_WITH_SMC294 /** @todo: gross hack, rewrite appropriately */295 fPIIX4 = FALSE;296 fICH6 = TRUE;297 #else298 fICH6 = FALSE;299 #endif300 279 301 280 /* … … 801 780 rc = CFGMR3InsertInteger(pIdeInst, "PCIFunctionNo", 1); RC_CHECK(); 802 781 rc = CFGMR3InsertNode(pIdeInst, "Config", &pCfg); RC_CHECK(); 803 rc = CFGMR3InsertInteger(pCfg, "PIIX4", fPIIX4); /* boolean */ RC_CHECK(); 804 rc = CFGMR3InsertInteger(pCfg, "ICH6", fICH6); /* boolean */ RC_CHECK(); 782 rc = CFGMR3InsertInteger(pCfg, "Type", (uint32_t)controllerType); RC_CHECK(); 805 783 806 784 /* Attach the status driver */ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r17072 r17075 881 881 <const name="PIIX3" value="1"/> 882 882 <const name="PIIX4" value="2"/> 883 <const name="ICH6" value="3"/> 883 884 </enum> 884 885 -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r16967 r17075 237 237 <xsd:enumeration value="PIIX3"/> 238 238 <xsd:enumeration value="PIIX4"/> 239 <xsd:enumeration value="ICH6"/> 239 240 </xsd:restriction> 240 241 </xsd:simpleType>
Note:
See TracChangeset
for help on using the changeset viewer.