Changeset 27461 in vbox for trunk/src/VBox
- Timestamp:
- Mar 17, 2010 5:33:19 PM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r26728 r27461 43 43 #include "DevFwCommon.h" 44 44 45 #define NET_BOOT_DEVS 4 46 45 47 46 48 /** @page pg_devbios_cmos_assign CMOS Assignments (BIOS) … … 50 52 * 51 53 * @verbatim 54 First CMOS bank (offsets 0x00 to 0x7f): 52 55 Base memory: 53 56 0x15 … … 95 98 RAM above 4G in 64KB units: 96 99 0x61 - 0x65 100 101 Second CMOS bank (offsets 0x80 to 0xff): 102 Reserved for future use: 103 0x80 - 0x81 104 First net boot device PCI bus/dev/fn: 105 0x82 - 0x83 106 Second to third net boot devices: 107 0x84 - 0x89 97 108 @endverbatim 98 109 * … … 166 177 /** PXE debug logging enabled? */ 167 178 uint8_t u8PXEDebug; 179 /** PXE boot PCI bus/dev/fn list. */ 180 uint16_t au16NetBootDev[NET_BOOT_DEVS]; 168 181 /** Number of logical CPUs in guest */ 169 182 uint16_t cCpus; … … 461 474 */ 462 475 pcbiosCmosWrite(pDevIns, 0x3f, pThis->u8PXEDebug); 476 477 /* 478 * Network boot device list. 479 */ 480 for (i = 0; i < NET_BOOT_DEVS; ++i) 481 { 482 pcbiosCmosWrite(pDevIns, 0x82 + i * 2, pThis->au16NetBootDev[i] & 0xff); 483 pcbiosCmosWrite(pDevIns, 0x83 + i * 2, pThis->au16NetBootDev[i] >> 8); 484 } 463 485 464 486 /* … … 1043 1065 return PDMDEV_SET_ERROR(pDevIns, rc, 1044 1066 N_("Configuration error: Querying \"PXEDebug\" as integer failed")); 1067 1068 /* Clear the net boot device list. All bits set invokes old behavior, 1069 * as if no second CMOS bank was present. 1070 */ 1071 memset(&pThis->au16NetBootDev, 0xff, sizeof(pThis->au16NetBootDev)); 1072 1073 /* 1074 * Determine the network boot order. 1075 */ 1076 PCFGMNODE pCfgNetBoot = CFGMR3GetChild(pCfg, "NetBoot"); 1077 if (pCfgNetBoot == NULL) 1078 { 1079 /* Do nothing. */ 1080 rc = VINF_SUCCESS; 1081 } 1082 else 1083 { 1084 PCFGMNODE pCfgNetBootDevice; 1085 uint16_t u16BusDevFn; 1086 char szIndex[] = "?"; 1087 int i; 1088 1089 Assert(pCfgNetBoot); 1090 for (i = 0; i < NET_BOOT_DEVS; ++i) 1091 { 1092 szIndex[0] = '0' + i; 1093 pCfgNetBootDevice = CFGMR3GetChild(pCfgNetBoot, szIndex); 1094 rc = CFGMR3QueryU16(pCfgNetBootDevice, "BusDevFn", &u16BusDevFn); 1095 if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT) 1096 { 1097 /* Do nothing and stop iterating. */ 1098 rc = VINF_SUCCESS; 1099 break; 1100 } 1101 else if (RT_FAILURE(rc)) 1102 return PDMDEV_SET_ERROR(pDevIns, rc, 1103 N_("Configuration error: Querying \"Netboot/x/BusDevFn\" as integer failed")); 1104 pThis->au16NetBootDev[i] = u16BusDevFn; 1105 } 1106 } 1045 1107 1046 1108 /* -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r27423 r27461 587 587 PCFGMNODE pLunL2 = NULL; /* /Devices/Dev/0/LUN#0/AttachedDriver/Config/ */ 588 588 PCFGMNODE pBiosCfg = NULL; /* /Devices/pcbios/0/Config/ */ 589 PCFGMNODE pNetBootCfg = NULL; /* /Devices/pcbios/0/Config/NetBoot/ */ 589 590 590 591 rc = CFGMR3InsertNode(pRoot, "Devices", &pDevices); RC_CHECK(); … … 906 907 rc = CFGMR3InsertInteger(pBiosCfg, "PXEDebug", fPXEDebug); RC_CHECK(); 907 908 rc = CFGMR3InsertBytes(pBiosCfg, "UUID", &HardwareUuid,sizeof(HardwareUuid));RC_CHECK(); 909 rc = CFGMR3InsertNode(pBiosCfg, "NetBoot", &pNetBootCfg); RC_CHECK(); 908 910 909 911 DeviceType_T bootDevice; … … 1528 1530 } 1529 1531 #endif 1532 /* 1533 * Transfer boot device information to the BIOS. 1534 */ 1535 if (ulInstance == 0) 1536 { 1537 unsigned uBootIdx = 0; 1538 1539 if (pNetBootCfg) /* NetBoot node doesn't exist for EFI! */ 1540 { 1541 PCFGMNODE pNetBtDevCfg; 1542 char achBootIdx[] = "0"; 1543 uint16_t u16BusDevFn; 1544 1545 achBootIdx[0] = '0' + uBootIdx; /* Boot device order. */ 1546 rc = CFGMR3InsertNode(pNetBootCfg, achBootIdx, &pNetBtDevCfg); RC_CHECK(); 1547 rc = CFGMR3InsertInteger(pNetBtDevCfg, "NIC", ulInstance); RC_CHECK(); 1548 u16BusDevFn = iPciDeviceNo << 3; 1549 rc = CFGMR3InsertInteger(pNetBtDevCfg, "BusDevFn", u16BusDevFn); RC_CHECK(); 1550 } 1551 } 1530 1552 1531 1553 /*
Note:
See TracChangeset
for help on using the changeset viewer.