VirtualBox

Changeset 24599 in vbox


Ignore:
Timestamp:
Nov 11, 2009 5:09:45 PM (15 years ago)
Author:
vboxsync
Message:

EFI: Main work for additional firmware types and presence checks

Location:
trunk/src/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r24493 r24599  
    302302            case MODIFYVM_FIRMWARE:
    303303            {
    304                 if (!strcmp(ValueUnion.psz, "efi"))
     304                if (!strcmp(ValueUnion.psz, "efi") || !strcmp(ValueUnion.psz, "efi32"))
    305305                {
    306306                    CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI));
     307                }
     308                else if (!strcmp(ValueUnion.psz, "efi64"))
     309                {
     310                    CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI64));
     311                }
     312                else if (!strcmp(ValueUnion.psz, "efidual"))
     313                {
     314                    CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFIDUAL));
    307315                }
    308316                else if (!strcmp(ValueUnion.psz, "bios"))
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r24555 r24599  
    930930}
    931931
     932
     933
     934STDMETHODIMP
     935VirtualBox::CheckFirmwarePresent(FirmwareType_T aFirmwareType,
     936                                 IN_BSTR        aVersion,
     937                                 BSTR           *aUrl,
     938                                 BOOL           *aResult)
     939{
     940    ReturnComNotImplemented();
     941}
    932942// IVirtualBox methods
    933943/////////////////////////////////////////////////////////////////////////////
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r24558 r24599  
    11071107    </const>
    11081108    <const name="EFI"             value="2">
    1109       <desc>Efi firmware.</desc>
     1109      <desc>Efi firmware, 32-bit.</desc>
     1110    </const>
     1111    <const name="EFI64"           value="3">
     1112      <desc>Efi firmware, 64-bit.</desc>
     1113    </const>
     1114    <const name="EFIDUAL"         value="4">
     1115      <desc>Efi firmware, combined 32 and 64-bit.</desc>
    11101116    </const>
    11111117  </enum>
     
    30003006      <param name="server" type="IDHCPServer" dir="in">
    30013007        <desc>Dhcp server settings to be removed</desc>
     3008      </param>
     3009    </method>
     3010
     3011
     3012    <method name="checkFirmwarePresent">
     3013      <desc>
     3014        Check if this VirtualBox installation have firmware
     3015        of given type available, either system-wide, or per-user.
     3016        Optionally, may return a hint where this firmware can be
     3017        downloaded from.
     3018      </desc>
     3019      <param name="firmwareType" type="FirmwareType" dir="in">
     3020        <desc>
     3021          Type of firmware to check.
     3022        </desc>
     3023      </param>
     3024      <param name="version" type="wstring" dir="in">
     3025        <desc>Expected version number, usually empty string.</desc>
     3026      </param>
     3027
     3028      <param name="url" type="wstring" dir="out">
     3029        <desc>
     3030          Suggested url to download this firmware from.
     3031        </desc>
     3032      </param>
     3033      <param name="result" type="boolean" dir="return">
     3034        <desc>If firmware of this type and version is available.</desc>
    30023035      </param>
    30033036    </method>
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r24345 r24599  
    177177    STDMETHOD(FindDHCPServerByNetworkName) (IN_BSTR aName, IDHCPServer ** aServer);
    178178    STDMETHOD(RemoveDHCPServer) (IDHCPServer * aServer);
     179    STDMETHOD(CheckFirmwarePresent)(FirmwareType_T aFirmwareType, IN_BSTR aVersion,
     180                                    BSTR * aUrl, BOOL * aResult);
    179181
    180182    /* public methods only for internal purposes */
  • trunk/src/VBox/Main/xml/Settings.cpp

    r24551 r24599  
    15921592                        )
    15931593                    hw.firmwareType = FirmwareType_EFI;
     1594                else if (    strFirmwareType == "EFI64")
     1595                    hw.firmwareType = FirmwareType_EFI64;
     1596                else if (    strFirmwareType == "EFIDUAL")
     1597                    hw.firmwareType = FirmwareType_EFIDUAL;
    15941598                else
    15951599                    throw ConfigFileError(this,
     
    24752479
    24762480    if (    (m->sv >= SettingsVersion_v1_9)
    2477          && (hw.firmwareType == FirmwareType_EFI)
     2481         && (hw.firmwareType >= FirmwareType_EFI)
    24782482       )
    24792483    {
    24802484         xml::ElementNode *pelmFirmware = pelmHardware->createChild("Firmware");
    2481          pelmFirmware->setAttribute("type", "EFI");
     2485         const char *pcszFirmware;
     2486
     2487         switch (hw.firmwareType)
     2488         {
     2489            case FirmwareType_EFI:      pcszFirmware = "EFI";   break;
     2490            case FirmwareType_EFI64:    pcszFirmware = "EFI64"; break;
     2491            case FirmwareType_EFIDUAL:  pcszFirmware = "EFIDUAL"; break;
     2492            default:                    pcszFirmware = "None"; break;
     2493         }
     2494         pelmFirmware->setAttribute("type", pcszFirmware);
    24822495    }
    24832496
     
    29772990    // all the following require settings version 1.9
    29782991    if (    (m->sv < SettingsVersion_v1_9)
    2979          && (    (hardwareMachine.firmwareType == FirmwareType_EFI)
     2992         && (    (hardwareMachine.firmwareType >= FirmwareType_EFI)
    29802993              || (hardwareMachine.fHardwareVirtExclusive != HWVIRTEXCLUSIVEDEFAULT)
    29812994              || fTeleporterEnabled
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