Changeset 49442 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 11, 2013 9:52:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevAPIC.cpp
r49437 r49442 284 284 /* Physical APIC id - not visible to user, constant */ 285 285 PhysApicId phys_id; 286 /** @todo :is it logical or physical? Not really used anyway now. */286 /** @todo is it logical or physical? Not really used anyway now. */ 287 287 PhysApicId arb_id; 288 288 uint32_t spurious_vec; … … 493 493 return MSR_IA32_APICBASE_ENABLE; 494 494 case PDMAPICVERSION_X2APIC: 495 return MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_X2ENABLE 495 return MSR_IA32_APICBASE_ENABLE | MSR_IA32_APICBASE_X2ENABLE; 496 496 default: 497 497 AssertMsgFailed(("Unsupported APIC version %d\n", pDev->enmVersion)); … … 588 588 Log(("apicSetBase: %016RX64\n", val)); 589 589 590 /** @todo :do we need to lock here ? */590 /** @todo do we need to lock here ? */ 591 591 /* APIC_LOCK_VOID(pDev, VERR_INTERNAL_ERROR); */ 592 592 /** @todo If this change is valid immediately, then we should change the MMIO registration! */ … … 610 610 } 611 611 case PDMAPICVERSION_APIC: 612 /** @todo :map MMIO ranges, if needed */612 /** @todo map MMIO ranges, if needed */ 613 613 break; 614 614 case PDMAPICVERSION_X2APIC: 615 /** @todo: unmap MMIO ranges of this APIC, according to the spec */ 615 /** @todo unmap MMIO ranges of this APIC, according to the spec. This is how 616 * real hw works! (Remember the problem disabling NMI watchdog timers in 617 * the world switchers when host used x2apic?)! */ 616 618 break; 617 619 default: … … 1853 1855 Assert(cb == 4); 1854 1856 1855 /** @todo : add LAPIC range validity checks (multiple LAPICs can theoretically have1856 * different physical addresses, see @bugref{3092}) */1857 /** @todo add LAPIC range validity checks (multiple LAPICs can theoretically 1858 * have different physical addresses, see @bugref{3092}) */ 1857 1859 1858 1860 STAM_COUNTER_INC(&CTXSUFF(pDev->StatMMIOWrite)); … … 2048 2050 apicR3LiveExec(pDevIns, pSSM, SSM_PASS_FINAL); 2049 2051 2050 /* save all APICs data */ /** @todo :is it correct? */2052 /* save all APICs data */ /** @todo is it correct? */ 2051 2053 APIC_FOREACH_BEGIN(pDev); 2052 2054 apic_save(pSSM, pCurApic); … … 2090 2092 return VINF_SUCCESS; 2091 2093 2092 /* load all APICs data */ /** @todo :is it correct? */2094 /* load all APICs data */ /** @todo is it correct? */ 2093 2095 APIC_LOCK(pDev, VERR_INTERNAL_ERROR_3); 2094 2096 … … 2134 2136 apicCpuClearInterrupt(pDev, pApic); 2135 2137 } 2136 /** @todo r=bird: Why is this done everytime, while the constructor first 2137 * checks the CPUID? Who is right? */2138 2139 LogRel(("DevAPIC: Re-activating Local APIC\n")); 2138 2140 pDev->pApicHlpR3->pfnChangeFeature(pDev->pDevInsR3, pDev->enmVersion); 2139 2141 … … 2231 2233 pDev->cCpus = cCpus; 2232 2234 pDev->fIoApic = fIoApic; 2233 /* Use PDMAPICVERSION_X2APIC to activate x2APIC mode */ 2235 /** @todo Finish X2APIC implementation. Must, among other things, set 2236 * PDMAPICVERSION_X2APIC here when X2APIC is configured. */ 2234 2237 pDev->enmVersion = PDMAPICVERSION_APIC; 2235 2238 … … 2323 2326 * The CPUID feature bit. 2324 2327 */ 2325 /** @todo r=bird: See remark in the apicR3Reset. */ 2326 uint32_t u32Eax, u32Ebx, u32Ecx, u32Edx; 2327 PDMDevHlpGetCpuId(pDevIns, 0, &u32Eax, &u32Ebx, &u32Ecx, &u32Edx); 2328 if (u32Eax >= 1) 2329 { 2330 if ( fIoApic /* If IOAPIC is enabled, enable Local APIC in any case */ 2331 || ( u32Ebx == X86_CPUID_VENDOR_INTEL_EBX 2332 && u32Ecx == X86_CPUID_VENDOR_INTEL_ECX 2333 && u32Edx == X86_CPUID_VENDOR_INTEL_EDX /* GenuineIntel */) 2334 || ( u32Ebx == X86_CPUID_VENDOR_AMD_EBX 2335 && u32Ecx == X86_CPUID_VENDOR_AMD_ECX 2336 && u32Edx == X86_CPUID_VENDOR_AMD_EDX /* AuthenticAMD */)) 2337 { 2338 LogRel(("Activating Local APIC\n")); 2339 pDev->pApicHlpR3->pfnChangeFeature(pDevIns, pDev->enmVersion); 2340 } 2341 } 2328 LogRel(("DevAPIC: Activating Local APIC\n")); 2329 pDev->pApicHlpR3->pfnChangeFeature(pDevIns, pDev->enmVersion); 2342 2330 2343 2331 /* 2344 2332 * Register the MMIO range. 2345 2333 */ 2346 /** @todo :shall reregister, if base changes. */2334 /** @todo shall reregister, if base changes. */ 2347 2335 uint32_t ApicBase = pDev->paLapicsR3[0].apicbase & ~0xfff; 2348 2336 rc = PDMDevHlpMMIORegister(pDevIns, ApicBase, 0x1000, pDev,
Note:
See TracChangeset
for help on using the changeset viewer.