Changeset 24858 in vbox
- Timestamp:
- Nov 23, 2009 9:56:20 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
- 2 moved
-
Makefile.kmk (modified) (2 diffs)
-
src/VBox/Devices/EFI/FirmwareBin/VBoxEFI32.fd (moved) (moved from trunk/src/VBox/Devices/EFI/FirmwareBin/vboxefi.fv )
-
src/VBox/Devices/EFI/FirmwareBin/VBoxEFI64.fd (moved) (moved from trunk/src/VBox/Devices/EFI/FirmwareBin/vboxefi64.fv )
-
src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp (modified) (1 diff)
-
src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp (modified) (1 diff)
-
src/VBox/Main/ConsoleImpl2.cpp (modified) (3 diffs)
-
src/VBox/Main/VirtualBoxImpl.cpp (modified) (4 diffs)
-
src/VBox/Main/idl/VirtualBox.xidl (modified) (2 diffs)
-
src/VBox/Main/include/VirtualBoxImpl.h (modified) (2 diffs)
-
src/VBox/Main/xml/Settings.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.kmk
r24831 r24858 299 299 buildserver-efifw_MODE = 0644 300 300 buildserver-efifw_SOURCES = \ 301 $(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd=> vboxefi.fv\302 $(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd=> vboxefi64.fv301 $(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd=>VBoxEFI32.fd \ 302 $(buildserver-efifw_0_OUTDIR)/FV/VBOX64.fd=>VBoxEFI64.fd 303 303 buildserver-efifw_CLEANS = \ 304 304 $(buildserver-efifw_0_OUTDIR)/FV/VBOX.fd \ … … 338 338 local-efifw_MODE = 0644 339 339 local-efifw_SOURCES = \ 340 $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/ vboxefi.fv=>vboxefi.fv\341 $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/ vboxefi64.fv=>vboxefi64.fv340 $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI32.fd=>VBoxEFI32.fd \ 341 $(PATH_ROOT)/src/VBox/Devices/EFI/FirmwareBin/VBoxEFI64.fd=>VBoxEFI64.fd 342 342 endif # VBOX_WITH_EFIFW_FROM_BUILD_SERVER 343 343 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r24827 r24858 145 145 " [--accelerate2dvideo <on|off>]\n" 146 146 #endif 147 " [--firmware bios|efi|efi 64]\n"147 " [--firmware bios|efi|efi32|efi64]\n" 148 148 " [--bioslogofadein on|off]\n" 149 149 " [--bioslogofadeout on|off]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r24856 r24858 302 302 case MODIFYVM_FIRMWARE: 303 303 { 304 if (!strcmp(ValueUnion.psz, "efi") || !strcmp(ValueUnion.psz, "efi32"))304 if (!strcmp(ValueUnion.psz, "efi")) 305 305 { 306 306 CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI)); 307 } 308 else if (!strcmp(ValueUnion.psz, "efi32")) 309 { 310 CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI32)); 307 311 } 308 312 else if (!strcmp(ValueUnion.psz, "efi64")) -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r24840 r24858 133 133 #endif 134 134 135 static int findEfiRom( FirmwareType_T aFirmwareType, Utf8Str& aEfiRomFile)135 static int findEfiRom(IVirtualBox* vbox, FirmwareType_T aFirmwareType, Utf8Str& aEfiRomFile) 136 136 { 137 /** @todo: combine with similar table in VirtualBox::CheckFirmwarePresent */ 138 static const struct { 139 FirmwareType_T type; 140 const char* fileName; 141 } firmwareDesc[] = { 142 { 143 /* compiled-in firmware */ 144 FirmwareType_BIOS, NULL, 145 }, 146 { 147 FirmwareType_EFI, "vboxefi.fv" 148 }, 149 { 150 FirmwareType_EFI64, "vboxefi64.fv" 151 }, 152 { 153 FirmwareType_EFIDUAL, "vboxefidual.fv" 154 } 155 }; 156 157 158 for (size_t i = 0; i < sizeof(firmwareDesc) / sizeof(firmwareDesc[0]); i++) 159 { 160 if (aFirmwareType != firmwareDesc[i].type) 161 continue; 162 163 AssertRCReturn(firmwareDesc[i].fileName != NULL, E_INVALIDARG); 164 165 /* Search in ~/.VirtualBox/Firmware and RTPathAppPrivateArch() */ 166 char pszVBoxPath[RTPATH_MAX]; 167 int rc; 168 169 rc = com::GetVBoxUserHomeDirectory(pszVBoxPath, sizeof(pszVBoxPath)); AssertRCReturn(rc, rc); 170 aEfiRomFile = Utf8StrFmt("%s%cFirmware%c%s", 171 pszVBoxPath, 172 RTPATH_DELIMITER, 173 RTPATH_DELIMITER, 174 firmwareDesc[i].fileName); 175 if (RTFileExists(aEfiRomFile.raw())) 176 return S_OK; 177 178 rc = RTPathExecDir(pszVBoxPath, RTPATH_MAX); AssertRCReturn(rc, rc); 179 aEfiRomFile = Utf8StrFmt("%s%c%s", 180 pszVBoxPath, 181 RTPATH_DELIMITER, 182 firmwareDesc[i].fileName); 183 184 if (RTFileExists(aEfiRomFile.raw())) 185 return S_OK; 186 187 aEfiRomFile = ""; 137 int rc; 138 BOOL fPresent = FALSE; 139 Bstr aFilePath, empty; 140 141 rc = vbox->CheckFirmwarePresent(aFirmwareType, empty, 142 empty.asOutParam(), aFilePath.asOutParam(), &fPresent); 143 if (RT_FAILURE(rc)) 144 AssertComRCReturn (rc, VERR_FILE_NOT_FOUND); 145 146 if (!fPresent) 188 147 return VERR_FILE_NOT_FOUND; 189 } 190 191 return E_INVALIDARG; 148 149 aEfiRomFile = Utf8Str(aFilePath); 150 151 return S_OK; 192 152 } 193 153 … … 825 785 else 826 786 { 827 Utf8Str efiRomFile; 828 /** @todo: which entry point to use for dual firmware, depend on guest? */ 829 bool f64BitEntry = fIs64BitGuest; 830 //eFwType = f64BitEntry? FirmwareType_EFI64: FirmwareType_EFI; 831 rc = findEfiRom(f64BitEntry? FirmwareType_EFI64: FirmwareType_EFI, efiRomFile); RC_CHECK(); 787 Utf8Str efiRomFile; 788 789 /* Autodetect firmware type, basing on guest type */ 790 if (eFwType == FirmwareType_EFI) 791 { 792 eFwType = 793 fIs64BitGuest ? 794 (FirmwareType_T)FirmwareType_EFI64 795 : 796 (FirmwareType_T)FirmwareType_EFI32; 797 } 798 799 rc = findEfiRom(virtualBox, eFwType, efiRomFile); RC_CHECK(); 800 bool f64BitEntry = eFwType == FirmwareType_EFI64; 832 801 /* 833 802 * EFI. … … 835 804 rc = CFGMR3InsertNode(pDevices, "efi", &pDev); RC_CHECK(); 836 805 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 837 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 806 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 838 807 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 839 808 rc = CFGMR3InsertInteger(pCfg, "RamSize", cbRam); RC_CHECK(); -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r24841 r24858 934 934 IN_BSTR aVersion, 935 935 BSTR *aUrl, 936 BSTR *aFile, 936 937 BOOL *aResult) 937 938 { … … 953 954 }, 954 955 { 955 FirmwareType_EFI , "vboxefi.fv", "http://virtualbox.org/firmware/32/vboxefi.fv"956 FirmwareType_EFI32, "VBoxEFI32.fd", "http://virtualbox.org/firmware/VBoxEFI32.fd" 956 957 }, 957 958 { 958 FirmwareType_EFI64, " vboxefi64.fv", "http://virtualbox.org/firmware/64/vboxefi.fv"959 FirmwareType_EFI64, "VBoxEFI64.fd", "http://virtualbox.org/firmware/VBoxEFI64.fd" 959 960 }, 960 961 { 961 FirmwareType_EFIDUAL, " vboxefidual.fv", "http://virtualbox.org/firmware/dual/vboxefi.fv"962 FirmwareType_EFIDUAL, "VBoxEFIDual.fd", "http://virtualbox.org/firmware/VBoxEFIDual.fd" 962 963 } 963 964 }; … … 985 986 { 986 987 *aResult = TRUE; 988 if (aFile) 989 Utf8Str(fullName).cloneTo(aFile); 987 990 break; 988 991 } … … 997 1000 { 998 1001 *aResult = TRUE; 1002 if (aFile) 1003 Utf8Str(fullName).cloneTo(aFile); 999 1004 break; 1000 1005 } 1001 1006 1007 1002 1008 url = firmwareDesc[i].url; 1003 1009 /** @todo: account for version in the URL */ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r24786 r24858 1103 1103 Firmware type. 1104 1104 </desc> 1105 <const name="BIOS" value="1">1105 <const name="BIOS" value="1"> 1106 1106 <desc>BIOS Firmware.</desc> 1107 1107 </const> 1108 <const name="EFI" value="2"> 1108 <const name="EFI" value="2"> 1109 <desc>EFI Firmware, bitness detetced basing on OS type.</desc> 1110 </const> 1111 <const name="EFI32" value="3"> 1109 1112 <desc>Efi firmware, 32-bit.</desc> 1110 1113 </const> 1111 <const name="EFI64" value="3">1114 <const name="EFI64" value="4"> 1112 1115 <desc>Efi firmware, 64-bit.</desc> 1113 1116 </const> 1114 <const name="EFIDUAL" value="4">1117 <const name="EFIDUAL" value="5"> 1115 1118 <desc>Efi firmware, combined 32 and 64-bit.</desc> 1116 1119 </const> … … 3031 3034 </desc> 3032 3035 </param> 3036 3037 <param name="file" type="wstring" dir="out"> 3038 <desc> 3039 Filename of firmware, only valid if result == TRUE. 3040 </desc> 3041 </param> 3042 3033 3043 <param name="result" type="boolean" dir="return"> 3034 3044 <desc>If firmware of this type and version is available.</desc> -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r24599 r24858 177 177 STDMETHOD(FindDHCPServerByNetworkName) (IN_BSTR aName, IDHCPServer ** aServer); 178 178 STDMETHOD(RemoveDHCPServer) (IDHCPServer * aServer); 179 STDMETHOD(CheckFirmwarePresent)(FirmwareType_T aFirmwareType, IN_BSTR aVersion, 180 BSTR * aUrl, B OOL * aResult);179 STDMETHOD(CheckFirmwarePresent)(FirmwareType_T aFirmwareType, IN_BSTR aVersion, 180 BSTR * aUrl, BSTR * aFile, BOOL * aResult); 181 181 182 182 /* public methods only for internal purposes */ … … 311 311 312 312 #endif // ____H_VIRTUALBOXIMPL 313 -
trunk/src/VBox/Main/xml/Settings.cpp
r24599 r24858 1592 1592 ) 1593 1593 hw.firmwareType = FirmwareType_EFI; 1594 else if ( strFirmwareType == "EFI32") 1595 hw.firmwareType = FirmwareType_EFI32; 1594 1596 else if ( strFirmwareType == "EFI64") 1595 1597 hw.firmwareType = FirmwareType_EFI64; … … 2488 2490 { 2489 2491 case FirmwareType_EFI: pcszFirmware = "EFI"; break; 2492 case FirmwareType_EFI32: pcszFirmware = "EFI32"; break; 2490 2493 case FirmwareType_EFI64: pcszFirmware = "EFI64"; break; 2491 2494 case FirmwareType_EFIDUAL: pcszFirmware = "EFIDUAL"; break;
Note:
See TracChangeset
for help on using the changeset viewer.

