VirtualBox

Changeset 17075 in vbox


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)

Location:
trunk/src/VBox
Files:
10 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    /*
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r16966 r17075  
    503503        case IDEControllerType_PIIX4:
    504504            pszIdeController = "PIIX4";
     505            break;
     506        case IDEControllerType_ICH6:
     507            pszIdeController = "ICH6";
    505508            break;
    506509        default:
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r16971 r17075  
    34383438    mIDEControllerTypes [KIDEControllerType_PIIX4] =
    34393439        tr ("PIIX4", "IDEControllerType");
     3440    mIDEControllerTypes [KIDEControllerType_ICH6] =
     3441        tr ("ICH6", "IDEControllerType");
    34403442
    34413443    mUSBDeviceStates [KUSBDeviceState_NotSupported] =
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWgt.cpp

    r17053 r17075  
    445445                    e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX3), "PIIX3");
    446446                    e->addItem (vboxGlobal().toString (KIDEControllerType_PIIX4), "PIIX4");
     447                    e->addItem (vboxGlobal().toString (KIDEControllerType_ICH6),  "ICH6");
    447448                    editor = e;
    448449                    break;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp

    r16589 r17075  
    138138    mCbIDEController->addItem (""); /* KIDEControllerType_PIIX3 */
    139139    mCbIDEController->addItem (""); /* KIDEControllerType_PIIX4 */
     140    mCbIDEController->addItem (""); /* KIDEControllerType_ICH6  */
    140141
    141142    qApp->installEventFilter (this);
     
    460461    mCbIDEController->setItemText (0, vboxGlobal().toString (KIDEControllerType_PIIX3));
    461462    mCbIDEController->setItemText (1, vboxGlobal().toString (KIDEControllerType_PIIX4));
     463    mCbIDEController->setItemText (2, vboxGlobal().toString (KIDEControllerType_ICH6));
    462464
    463465    /* Path selector */
  • trunk/src/VBox/Main/ApplianceImpl.cpp

    r17055 r17075  
    18831883                else if (!strcmp(pcszIDEType, "PIIX4"))
    18841884                    rc = biosSettings->COMSETTER(IDEControllerType)(IDEControllerType_PIIX4);
     1885                else if (!strcmp(pcszIDEType, "ICH6"))
     1886                    rc = biosSettings->COMSETTER(IDEControllerType)(IDEControllerType_ICH6);
    18851887                else
    18861888                    throw setError(VBOX_E_FILE_ERROR,
  • trunk/src/VBox/Main/BIOSSettingsImpl.cpp

    r16560 r17075  
    442442        case IDEControllerType_PIIX3:
    443443        case IDEControllerType_PIIX4:
     444        case IDEControllerType_ICH6:
    444445            break;
    445446        default:
     
    601602            else if (strcmp (typeStr, "PIIX4") == 0)
    602603                mData->mIDEControllerType = IDEControllerType_PIIX4;
     604            else if (strcmp (typeStr, "ICH6") == 0)
     605                mData->mIDEControllerType = IDEControllerType_ICH6;
    603606            else
    604607                ComAssertMsgFailedRet (("Invalid boot menu mode '%s'", typeStr),
     
    698701                ideControllerTypeStr = "PIIX4";
    699702                break;
     703            case IDEControllerType_ICH6:
     704                ideControllerTypeStr = "ICH6";
     705                break;
    700706            default:
    701707                ComAssertMsgFailedRet (("Invalid IDE Controller type: %d",
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r16967 r17075  
    276276     */
    277277    IDEControllerType_T controllerType;
    278     BOOL fPIIX4, fICH6;
    279278    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_SMC
    294     /** @todo: gross hack, rewrite appropriately */
    295     fPIIX4 = FALSE;
    296     fICH6 = TRUE;
    297 #else
    298     fICH6 = FALSE;
    299 #endif
    300279
    301280    /*
     
    801780    rc = CFGMR3InsertInteger(pIdeInst, "PCIFunctionNo",        1);                  RC_CHECK();
    802781    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();
    805783
    806784    /* Attach the status driver */
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r17072 r17075  
    881881    <const name="PIIX3"           value="1"/>
    882882    <const name="PIIX4"           value="2"/>
     883    <const name="ICH6"            value="3"/>
    883884  </enum>
    884885
  • trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd

    r16967 r17075  
    237237    <xsd:enumeration value="PIIX3"/>
    238238    <xsd:enumeration value="PIIX4"/>
     239    <xsd:enumeration value="ICH6"/>
    239240  </xsd:restriction>
    240241</xsd:simpleType>
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