Changeset 17075 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Feb 24, 2009 3:13:31 PM (16 years ago)
- File:
-
- 1 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 /*
Note:
See TracChangeset
for help on using the changeset viewer.