儲存庫 vbox 的更動 12976
- 時間撮記:
- 2008-10-3 下午10:40:40 (16 年 以前)
- 位置:
- trunk
- 檔案:
-
- 修改 5 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/include/VBox/pdmdev.h
r12972 r12976 232 232 typedef FNPDMDEVINITCOMPLETE *PFNPDMDEVINITCOMPLETE; 233 233 234 /** 235 * APIC version. 236 */ 237 typedef enum 238 { 239 APIC_NONE = 0, 240 APIC_XAPIC, 241 APIC_X2APIC, 242 /** The usual 32-bit paranoia. */ 243 PDMAPICVERSION_32BIT_HACK = 0x7fffffff 244 } PDMAPICVERSION; 234 245 235 246 236 /** PDM Device Registration Structure, … … 1054 1044 1055 1045 /** 1046 * APIC version argument for pfnChangeFeature. 1047 */ 1048 typedef enum PDMAPICVERSION 1049 { 1050 /** Invalid 0 entry. */ 1051 PDMAPICVERSION_INVALID = 0, 1052 /** No APIC. */ 1053 PDMAPICVERSION_NONE, 1054 /** Standard APIC (X86_CPUID_FEATURE_EDX_APIC). */ 1055 PDMAPICVERSION_APIC, 1056 /** Intel X2APIC (X86_CPUID_FEATURE_ECX_X2APIC). */ 1057 PDMAPICVERSION_X2APIC, 1058 /** The usual 32-bit paranoia. */ 1059 PDMAPICVERSION_32BIT_HACK = 0x7fffffff 1060 } PDMAPICVERSION; 1061 1062 1063 /** 1056 1064 * APIC RC helpers. 1057 1065 */ … … 1081 1089 * 1082 1090 * @param pDevIns Device instance of the APIC. 1083 * @param versionSupported APIC version.1084 */ 1085 DECLRCCALLBACKMEMBER(void, pfnChangeFeature,(PPDMDEVINS pDevIns, PDMAPICVERSION version));1091 * @param enmVersion Supported APIC version. 1092 */ 1093 DECLRCCALLBACKMEMBER(void, pfnChangeFeature,(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion)); 1086 1094 1087 1095 /** … … 1149 1157 * 1150 1158 * @param pDevIns Device instance of the APIC. 1151 * @param versionSupported APIC version.1152 */ 1153 DECLR0CALLBACKMEMBER(void, pfnChangeFeature,(PPDMDEVINS pDevIns, PDMAPICVERSION version));1159 * @param enmVersion Supported APIC version. 1160 */ 1161 DECLR0CALLBACKMEMBER(void, pfnChangeFeature,(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion)); 1154 1162 1155 1163 /** … … 1216 1224 * 1217 1225 * @param pDevIns Device instance of the APIC. 1218 * @param versionSupported APIC version.1219 */ 1220 DECLR3CALLBACKMEMBER(void, pfnChangeFeature,(PPDMDEVINS pDevIns, PDMAPICVERSION version));1226 * @param enmVersion Supported APIC version. 1227 */ 1228 DECLR3CALLBACKMEMBER(void, pfnChangeFeature,(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion)); 1221 1229 1222 1230 /** -
trunk/src/VBox/Devices/PC/DevAPIC.cpp
r12972 r12976 481 481 /* Clear any pending APIC interrupt action flag. */ 482 482 cpuClearInterrupt(dev, s); 483 dev->CTX_SUFF(pApicHlp)->pfnChangeFeature(pDevIns, APIC_NONE);483 dev->CTX_SUFF(pApicHlp)->pfnChangeFeature(pDevIns, PDMAPICVERSION_NONE); 484 484 } 485 485 /* APIC_UNLOCK(dev); */ … … 1832 1832 /* Reset should re-enable the APIC. */ 1833 1833 s->apicbase = 0xfee00000 | MSR_IA32_APICBASE_BSP | MSR_IA32_APICBASE_ENABLE; 1834 dev->pApicHlpR3->pfnChangeFeature(dev->pDevInsR3, APIC_XAPIC);1834 dev->pApicHlpR3->pfnChangeFeature(dev->pDevInsR3, PDMAPICVERSION_APIC); 1835 1835 /* Clear any pending APIC interrupt action flag. */ 1836 1836 cpuClearInterrupt(dev, s); … … 2011 2011 { 2012 2012 LogRel(("Activating Local APIC\n")); 2013 pThis->pApicHlpR3->pfnChangeFeature(pDevIns, APIC_XAPIC);2013 pThis->pApicHlpR3->pfnChangeFeature(pDevIns, PDMAPICVERSION_APIC); 2014 2014 } 2015 2015 } -
trunk/src/VBox/VMM/PDMDevice.cpp
r12975 r12976 236 236 static DECLCALLBACK(void) pdmR3ApicHlp_SetInterruptFF(PPDMDEVINS pDevIns, VMCPUID idCpu); 237 237 static DECLCALLBACK(void) pdmR3ApicHlp_ClearInterruptFF(PPDMDEVINS pDevIns, VMCPUID idCpu); 238 static DECLCALLBACK(void) pdmR3ApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION version);238 static DECLCALLBACK(void) pdmR3ApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion); 239 239 static DECLCALLBACK(int) pdmR3ApicHlp_Lock(PPDMDEVINS pDevIns, int rc); 240 240 static DECLCALLBACK(void) pdmR3ApicHlp_Unlock(PPDMDEVINS pDevIns); … … 4171 4171 4172 4172 /** @copydoc PDMAPICHLPR3::pfnChangeFeature */ 4173 static DECLCALLBACK(void) pdmR3ApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION version)4173 static DECLCALLBACK(void) pdmR3ApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion) 4174 4174 { 4175 4175 PDMDEV_ASSERT_DEVINS(pDevIns); 4176 4176 LogFlow(("pdmR3ApicHlp_ChangeFeature: caller='%s'/%d: version=%d\n", 4177 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, (int) version));4178 switch ( version)4179 { 4180 case APIC_NONE:4177 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, (int)enmVersion)); 4178 switch (enmVersion) 4179 { 4180 case PDMAPICVERSION_NONE: 4181 4181 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMR3, CPUMCPUIDFEATURE_APIC); 4182 4182 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMR3, CPUMCPUIDFEATURE_X2APIC); 4183 4183 break; 4184 case APIC_XAPIC:4184 case PDMAPICVERSION_APIC: 4185 4185 CPUMSetGuestCpuIdFeature(pDevIns->Internal.s.pVMR3, CPUMCPUIDFEATURE_APIC); 4186 4186 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMR3, CPUMCPUIDFEATURE_X2APIC); 4187 4187 break; 4188 case APIC_X2APIC:4188 case PDMAPICVERSION_X2APIC: 4189 4189 CPUMSetGuestCpuIdFeature(pDevIns->Internal.s.pVMR3, CPUMCPUIDFEATURE_X2APIC); 4190 4190 CPUMSetGuestCpuIdFeature(pDevIns->Internal.s.pVMR3, CPUMCPUIDFEATURE_APIC); 4191 4191 break; 4192 4192 default: 4193 AssertMsgFailed(("Unknown APIC version: %d\n", (int) version));4193 AssertMsgFailed(("Unknown APIC version: %d\n", (int)enmVersion)); 4194 4194 } 4195 4195 } -
trunk/src/VBox/VMM/VMMGC/PDMGCDevice.cpp
r12972 r12976 101 101 static DECLCALLBACK(void) pdmRCApicHlp_SetInterruptFF(PPDMDEVINS pDevIns, VMCPUID idCpu); 102 102 static DECLCALLBACK(void) pdmRCApicHlp_ClearInterruptFF(PPDMDEVINS pDevIns, VMCPUID idCpu); 103 static DECLCALLBACK(void) pdmRCApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION version);103 static DECLCALLBACK(void) pdmRCApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion); 104 104 static DECLCALLBACK(int) pdmRCApicHlp_Lock(PPDMDEVINS pDevIns, int rc); 105 105 static DECLCALLBACK(void) pdmRCApicHlp_Unlock(PPDMDEVINS pDevIns); … … 415 415 416 416 /** @copydoc PDMAPICHLPRC::pfnChangeFeature */ 417 static DECLCALLBACK(void) pdmRCApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION version)418 { 419 PDMDEV_ASSERT_DEVINS(pDevIns); 420 LogFlow(("pdmRCApicHlp_ChangeFeature: caller=%p/%d: version=%d\n", pDevIns, pDevIns->iInstance, version));421 switch ( version)417 static DECLCALLBACK(void) pdmRCApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion) 418 { 419 PDMDEV_ASSERT_DEVINS(pDevIns); 420 LogFlow(("pdmRCApicHlp_ChangeFeature: caller=%p/%d: version=%d\n", pDevIns, pDevIns->iInstance, (int)enmVersion)); 421 switch (enmVersion) 422 422 { 423 case APIC_NONE:423 case PDMAPICVERSION_NONE: 424 424 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMRC, CPUMCPUIDFEATURE_APIC); 425 425 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMRC, CPUMCPUIDFEATURE_X2APIC); 426 426 break; 427 case APIC_XAPIC:427 case PDMAPICVERSION_APIC: 428 428 CPUMSetGuestCpuIdFeature(pDevIns->Internal.s.pVMRC, CPUMCPUIDFEATURE_APIC); 429 429 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMRC, CPUMCPUIDFEATURE_X2APIC); 430 430 break; 431 case APIC_X2APIC:431 case PDMAPICVERSION_X2APIC: 432 432 CPUMSetGuestCpuIdFeature(pDevIns->Internal.s.pVMRC, CPUMCPUIDFEATURE_X2APIC); 433 433 CPUMSetGuestCpuIdFeature(pDevIns->Internal.s.pVMRC, CPUMCPUIDFEATURE_APIC); 434 434 break; 435 435 default: 436 AssertMsgFailed(("Unknown APIC version: %d\n", (int) version));436 AssertMsgFailed(("Unknown APIC version: %d\n", (int)enmVersion)); 437 437 } 438 438 } -
trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp
r12972 r12976 101 101 static DECLCALLBACK(void) pdmR0ApicHlp_SetInterruptFF(PPDMDEVINS pDevIns, VMCPUID idCpu); 102 102 static DECLCALLBACK(void) pdmR0ApicHlp_ClearInterruptFF(PPDMDEVINS pDevIns, VMCPUID idCpu); 103 static DECLCALLBACK(void) pdmR0ApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION version);103 static DECLCALLBACK(void) pdmR0ApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion); 104 104 static DECLCALLBACK(int) pdmR0ApicHlp_Lock(PPDMDEVINS pDevIns, int rc); 105 105 static DECLCALLBACK(void) pdmR0ApicHlp_Unlock(PPDMDEVINS pDevIns); … … 420 420 421 421 /** @copydoc PDMAPICHLPR0::pfnChangeFeature */ 422 static DECLCALLBACK(void) pdmR0ApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION version)423 { 424 PDMDEV_ASSERT_DEVINS(pDevIns); 425 LogFlow(("pdmR0ApicHlp_ChangeFeature: caller=%p/%d: version=%d\n", pDevIns, pDevIns->iInstance, version));426 switch ( version)422 static DECLCALLBACK(void) pdmR0ApicHlp_ChangeFeature(PPDMDEVINS pDevIns, PDMAPICVERSION enmVersion) 423 { 424 PDMDEV_ASSERT_DEVINS(pDevIns); 425 LogFlow(("pdmR0ApicHlp_ChangeFeature: caller=%p/%d: version=%d\n", pDevIns, pDevIns->iInstance, (int)enmVersion)); 426 switch (enmVersion) 427 427 { 428 case APIC_NONE:428 case PDMAPICVERSION_NONE: 429 429 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMR0, CPUMCPUIDFEATURE_APIC); 430 430 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMR0, CPUMCPUIDFEATURE_X2APIC); 431 431 break; 432 case APIC_XAPIC:432 case PDMAPICVERSION_APIC: 433 433 CPUMSetGuestCpuIdFeature(pDevIns->Internal.s.pVMR0, CPUMCPUIDFEATURE_APIC); 434 434 CPUMClearGuestCpuIdFeature(pDevIns->Internal.s.pVMR0, CPUMCPUIDFEATURE_X2APIC); 435 435 break; 436 case APIC_X2APIC:436 case PDMAPICVERSION_X2APIC: 437 437 CPUMSetGuestCpuIdFeature(pDevIns->Internal.s.pVMR0, CPUMCPUIDFEATURE_X2APIC); 438 438 CPUMSetGuestCpuIdFeature(pDevIns->Internal.s.pVMR0, CPUMCPUIDFEATURE_APIC); 439 439 break; 440 440 default: 441 AssertMsgFailed(("Unknown APIC version: %d\n", (int) version));441 AssertMsgFailed(("Unknown APIC version: %d\n", (int)enmVersion)); 442 442 } 443 443 }
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器