- Timestamp:
- Feb 10, 2009 5:39:08 PM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r16509 r16648 336 336 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 337 337 338 BOOL fEfiEnabled; 339 /** @todo: implement appropriate getter */ 340 #ifdef VBOX_WITH_EFI 341 fEfiEnabled = true; 342 #else 343 fEfiEnabled = false; 344 #endif 345 346 if (fEfiEnabled) 347 { 348 rc = CFGMR3InsertNode(pDevices, "efi", &pDev); RC_CHECK(); 349 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 350 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 351 } 352 338 353 /* 339 354 * PC Bios. 340 355 */ 341 rc = CFGMR3InsertNode(pDevices, "pcbios", &pDev); RC_CHECK(); 342 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 343 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 344 rc = CFGMR3InsertNode(pInst, "Config", &pBiosCfg); RC_CHECK(); 345 rc = CFGMR3InsertInteger(pBiosCfg, "RamSize", cRamMBs * _1M); RC_CHECK(); 346 rc = CFGMR3InsertInteger(pBiosCfg, "NumCPUs", cCpus); RC_CHECK(); 347 rc = CFGMR3InsertString(pBiosCfg, "HardDiskDevice", "piix3ide"); RC_CHECK(); 348 rc = CFGMR3InsertString(pBiosCfg, "FloppyDevice", "i82078"); RC_CHECK(); 349 rc = CFGMR3InsertInteger(pBiosCfg, "IOAPIC", fIOAPIC); RC_CHECK(); 350 rc = CFGMR3InsertInteger(pBiosCfg, "PXEDebug", fPXEDebug); RC_CHECK(); 351 rc = CFGMR3InsertBytes(pBiosCfg, "UUID", pUuid, sizeof(*pUuid)); RC_CHECK(); 352 353 DeviceType_T bootDevice; 354 if (SchemaDefs::MaxBootPosition > 9) 355 { 356 AssertMsgFailed (("Too many boot devices %d\n", 357 SchemaDefs::MaxBootPosition)); 358 return VERR_INVALID_PARAMETER; 359 } 360 361 for (ULONG pos = 1; pos <= SchemaDefs::MaxBootPosition; pos ++) 362 { 363 hrc = pMachine->GetBootOrder(pos, &bootDevice); H(); 364 365 char szParamName[] = "BootDeviceX"; 366 szParamName[sizeof (szParamName) - 2] = ((char (pos - 1)) + '0'); 367 368 const char *pszBootDevice; 369 switch (bootDevice) 370 { 371 case DeviceType_Null: 372 pszBootDevice = "NONE"; 373 break; 374 case DeviceType_HardDisk: 375 pszBootDevice = "IDE"; 376 break; 377 case DeviceType_DVD: 378 pszBootDevice = "DVD"; 379 break; 380 case DeviceType_Floppy: 381 pszBootDevice = "FLOPPY"; 382 break; 383 case DeviceType_Network: 384 pszBootDevice = "LAN"; 385 break; 386 default: 387 AssertMsgFailed(("Invalid bootDevice=%d\n", bootDevice)); 388 return VMSetError(pVM, VERR_INVALID_PARAMETER, RT_SRC_POS, 389 N_("Invalid boot device '%d'"), bootDevice); 390 } 391 rc = CFGMR3InsertString(pBiosCfg, szParamName, pszBootDevice); RC_CHECK(); 356 if (!fEfiEnabled) 357 { 358 rc = CFGMR3InsertNode(pDevices, "pcbios", &pDev); RC_CHECK(); 359 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 360 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 361 rc = CFGMR3InsertNode(pInst, "Config", &pBiosCfg); RC_CHECK(); 362 rc = CFGMR3InsertInteger(pBiosCfg, "RamSize", cRamMBs * _1M); RC_CHECK(); 363 rc = CFGMR3InsertInteger(pBiosCfg, "NumCPUs", cCpus); RC_CHECK(); 364 rc = CFGMR3InsertString(pBiosCfg, "HardDiskDevice", "piix3ide"); RC_CHECK(); 365 rc = CFGMR3InsertString(pBiosCfg, "FloppyDevice", "i82078"); RC_CHECK(); 366 rc = CFGMR3InsertInteger(pBiosCfg, "IOAPIC", fIOAPIC); RC_CHECK(); 367 rc = CFGMR3InsertInteger(pBiosCfg, "PXEDebug", fPXEDebug); RC_CHECK(); 368 rc = CFGMR3InsertBytes(pBiosCfg, "UUID", pUuid, sizeof(*pUuid)); RC_CHECK(); 369 370 DeviceType_T bootDevice; 371 if (SchemaDefs::MaxBootPosition > 9) 372 { 373 AssertMsgFailed (("Too many boot devices %d\n", 374 SchemaDefs::MaxBootPosition)); 375 return VERR_INVALID_PARAMETER; 376 } 377 378 for (ULONG pos = 1; pos <= SchemaDefs::MaxBootPosition; pos ++) 379 { 380 hrc = pMachine->GetBootOrder(pos, &bootDevice); H(); 381 382 char szParamName[] = "BootDeviceX"; 383 szParamName[sizeof (szParamName) - 2] = ((char (pos - 1)) + '0'); 384 385 const char *pszBootDevice; 386 switch (bootDevice) 387 { 388 case DeviceType_Null: 389 pszBootDevice = "NONE"; 390 break; 391 case DeviceType_HardDisk: 392 pszBootDevice = "IDE"; 393 break; 394 case DeviceType_DVD: 395 pszBootDevice = "DVD"; 396 break; 397 case DeviceType_Floppy: 398 pszBootDevice = "FLOPPY"; 399 break; 400 case DeviceType_Network: 401 pszBootDevice = "LAN"; 402 break; 403 default: 404 AssertMsgFailed(("Invalid bootDevice=%d\n", bootDevice)); 405 return VMSetError(pVM, VERR_INVALID_PARAMETER, RT_SRC_POS, 406 N_("Invalid boot device '%d'"), bootDevice); 407 } 408 rc = CFGMR3InsertString(pBiosCfg, szParamName, pszBootDevice); RC_CHECK(); 409 } 392 410 } 393 411 -
trunk/src/VBox/Main/Makefile.kmk
r16530 r16648 464 464 $(if $(VBOX_WITH_CROSSBOW),VBOX_WITH_CROSSBOW,) \ 465 465 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \ 466 $(if $(VBOX_WITH_EFI),VBOX_WITH_EFI,) \ 466 467 $(if $(VBOX_WITH_HPET),VBOX_WITH_HPET,) \ 467 468 $(if $(VBOX_WITH_SMC),VBOX_WITH_SMC,) \
Note:
See TracChangeset
for help on using the changeset viewer.