VirtualBox

Changeset 17075 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Feb 24, 2009 3:13:31 PM (16 years ago)
Author:
vboxsync
Message:

ICH6 controller in UI and configs (don't think amount of work required to add
just new IDE controller type is adequate)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r16745 r17075  
    61246124     * Validate and read configuration.
    61256125     */
    6126     if (!CFGMR3AreValuesValid(pCfgHandle, "GCEnabled\0IRQDelay\0R0Enabled\0PIIX4\0ICH6\0"))
     6126    if (!CFGMR3AreValuesValid(pCfgHandle, "GCEnabled\0IRQDelay\0R0Enabled\0Type\0"))
    61276127        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    61286128                                N_("PIIX3 configuration error: unknown option specified"));
     
    61486148
    61496149    pThis->u8Type = CHIPSET_PIIX3;
    6150     bool fPIIX4;
    6151     rc = CFGMR3QueryBoolDef(pCfgHandle, "PIIX4", &fPIIX4, false);
     6150    uint32_t type;
     6151    rc = CFGMR3QueryU32Def(pCfgHandle, "Type", &type, 0);
    61526152    if (RT_FAILURE(rc))
    61536153        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    }
    61686175
    61696176    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette