vbox的更動 12311 路徑 trunk/src/VBox/Devices/PC
- 時間撮記:
- 2008-9-9 下午04:14:09 (16 年 以前)
- 位置:
- trunk/src/VBox/Devices/PC
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/PC/DevACPI.cpp
r11289 r12311 188 188 uint8_t u8UseFdc; 189 189 bool fPowerButtonHandled; 190 190 191 191 /** ACPI port base interface. */ 192 192 PDMIBASE IBase; … … 199 199 /** Pointer to the driver connector interface */ 200 200 R3PTRTYPE(PPDMIACPICONNECTOR) pDrv; 201 #if 0 202 /** Number of logical CPUs in guest */ 203 uint16_t cCpus; 204 #endif 201 205 }; 202 206 … … 1574 1578 1575 1579 /* Validate and read the configuration. */ 1576 if (!CFGMR3AreValuesValid (pCfgHandle, "RamSize\0IOAPIC\0GCEnabled\0R0Enabled\0FdcEnabled\0")) 1580 if (!CFGMR3AreValuesValid (pCfgHandle, 1581 "RamSize\0" 1582 "IOAPIC\0" 1583 "NumCPUs\0" 1584 "GCEnabled\0" 1585 "R0Enabled\0" 1586 "FdcEnabled\0")) 1577 1587 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES, 1578 1588 N_("Configuration error: Invalid config key for ACPI device")); … … 1587 1597 return PDMDEV_SET_ERROR(pDevIns, rc, 1588 1598 N_("Configuration error: Failed to read \"IOAPIC\"")); 1599 1600 #if 0 1601 rc = CFGMR3QueryU16Def(pCfgHandle, "NumCPUs", &s->cCpus, 1); 1602 if (RT_FAILURE(rc)) 1603 return PDMDEV_SET_ERROR(pDevIns, rc, 1604 N_("Configuration error: Querying \"NumCPUs\" as integer failed")); 1605 #endif 1589 1606 1590 1607 /* query whether we are supposed to present an FDC controller */ -
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r12294 r12311 1109 1109 * @param addr physical address in guest memory. 1110 1110 */ 1111 static void pcbiosPlantMPStable(PPDMDEVINS pDevIns, uint8_t *pTable )1111 static void pcbiosPlantMPStable(PPDMDEVINS pDevIns, uint8_t *pTable, uint16_t numCpus) 1112 1112 { 1113 1113 /* configuration table */ … … 1119 1119 pCfgTab->u32OemTablePtr = 0; 1120 1120 pCfgTab->u16OemTableSize = 0; 1121 pCfgTab->u16EntryCount = 1 /* Processor*/1121 pCfgTab->u16EntryCount = numCpus /* Processors */ 1122 1122 + 1 /* ISA Bus */ 1123 1123 + 1 /* I/O-APIC */ … … 1140 1140 u32FeatureFlags = u32Edx | X86_CPUID_FEATURE_EDX_APIC; 1141 1141 } 1142 1142 #ifdef VBOX_WITH_SMP_GUESTS 1143 PMPSPROCENTRY pProcEntry = (PMPSPROCENTRY)(pCfgTab+1); 1144 for (int i = 0; i<numCpus; i++) 1145 { 1146 pProcEntry->u8EntryType = 0; /* processor entry */ 1147 pProcEntry->u8LocalApicId = i; 1148 pProcEntry->u8LocalApicVersion = 0x11; 1149 pProcEntry->u8CPUFlags = (i == 0 ? 2 /* bootstrap processor */ : 0 /* application processor */) | 1 /* enabled */; 1150 pProcEntry->u32CPUSignature = u32CPUSignature; 1151 pProcEntry->u32CPUFeatureFlags = u32FeatureFlags; 1152 pProcEntry->u32Reserved[0] = 1153 pProcEntry->u32Reserved[1] = 0; 1154 pProcEntry++; 1155 } 1156 #else 1143 1157 /* one processor so far */ 1144 1158 PMPSPROCENTRY pProcEntry = (PMPSPROCENTRY)(pCfgTab+1); … … 1151 1165 pProcEntry->u32Reserved[0] = 1152 1166 pProcEntry->u32Reserved[1] = 0; 1167 #endif 1153 1168 1154 1169 /* ISA bus */ … … 1164 1179 * ... At least one I/O APIC must be enabled." */ 1165 1180 PMPSIOAPICENTRY pIOAPICEntry = (PMPSIOAPICENTRY)(pBusEntry+1); 1181 uint16_t apicId = numCpus; 1166 1182 pIOAPICEntry->u8EntryType = 2; /* I/O-APIC entry */ 1167 pIOAPICEntry->u8Id = 1; /* this ID is referenced by the interrupt entries */1183 pIOAPICEntry->u8Id = apicId; /* this ID is referenced by the interrupt entries */ 1168 1184 pIOAPICEntry->u8Version = 0x11; 1169 1185 pIOAPICEntry->u8Flags = 1 /* enable */; … … 1179 1195 pIrqEntry->u8SrcBusId = 0; /* ISA bus */ 1180 1196 pIrqEntry->u8SrcBusIrq = i; 1181 pIrqEntry->u8DstIOAPICId = 1;1197 pIrqEntry->u8DstIOAPICId = apicId; 1182 1198 pIrqEntry->u8DstIOAPICInt = i; 1183 1199 } … … 1221 1237 1222 1238 if (pThis->u8IOAPIC) 1223 pcbiosPlantMPStable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE );1239 pcbiosPlantMPStable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, pThis->cCpus); 1224 1240 } 1225 1241 … … 1467 1483 return rc; 1468 1484 if (pThis->u8IOAPIC) 1469 pcbiosPlantMPStable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE );1485 pcbiosPlantMPStable(pDevIns, pThis->au8DMIPage + VBOX_DMI_TABLE_SIZE, pThis->cCpus); 1470 1486 1471 1487 rc = PDMDevHlpROMRegister(pDevIns, VBOX_DMI_TABLE_BASE, _4K, pThis->au8DMIPage, false /* fShadow */, "DMI tables");
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器