Changeset 13832 in vbox for trunk/src/VBox/Devices/PC/DevAPIC.cpp
- Timestamp:
- Nov 5, 2008 2:01:12 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 38823
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevAPIC.cpp
r13519 r13832 185 185 186 186 typedef uint32_t PhysApicId; 187 typedef uint32_t LogApicId; 187 typedef uint32_t LogApicId; 188 188 #endif 189 189 … … 194 194 uint32_t apicbase; 195 195 #ifdef VBOX 196 /* Task priority register (interrupt level) */ 196 /* Task priority register (interrupt level) */ 197 197 uint32_t tpr; 198 198 /* Logical APIC id */ … … 324 324 uint8_t delivery_mode, uint8_t vector_num, 325 325 uint8_t polarity, uint8_t trigger_mode); 326 static void apic_timer_update(APICDeviceInfo* dev, APICState *s, 326 static void apic_timer_update(APICDeviceInfo* dev, APICState *s, 327 327 int64_t current_time); 328 328 static int apic_get_arb_pri(APICState *s); … … 538 538 /* We cannot change if this CPU is BSP or not by writing to MSR - it's hardwired */ 539 539 PDMAPICVERSION oldMode = getApicMode(s); 540 s->apicbase = 540 s->apicbase = 541 541 (val & 0xfffff000) | /* base */ 542 (val & getApicEnableBits(dev)) | /* mode */ 542 (val & getApicEnableBits(dev)) | /* mode */ 543 543 (s->apicbase & MSR_IA32_APICBASE_BSP) /* keep BSP bit */; 544 544 PDMAPICVERSION newMode = getApicMode(s); 545 545 546 546 if (oldMode != newMode) 547 547 { … … 660 660 { 661 661 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 662 662 663 663 if (dev->enmVersion < PDMAPICVERSION_X2APIC) 664 664 return VERR_EM_INTERPRETER; … … 669 669 APICState* apic = getLapicById(dev, idCpu); 670 670 671 switch (index) 671 switch (index) 672 672 { 673 673 case 0x02: … … 740 740 apic_bus_deliver(dev, 741 741 1 << getLapicById(dev, idCpu)->id /* Self */, 742 0 /* Delivery mode - fixed */, 742 0 /* Delivery mode - fixed */, 743 743 vector, 744 744 0 /* Polarity - conform to the bus */, … … 766 766 uint64_t val = 0; 767 767 768 switch (index) 768 switch (index) 769 769 { 770 770 case 0x02: /* id */ … … 1590 1590 if ((version_id < 1) || (version_id > 2)) 1591 1591 return -EINVAL; 1592 1592 1593 1593 /* XXX: what if the base changes? (registered memory regions) */ 1594 1594 qemu_get_be32s(f, &s->apicbase); … … 2018 2018 && ++s->ulTPRPatchAttempts < APIC_MAX_PATCH_ATTEMPTS) 2019 2019 { 2020 #ifdef IN_ GC2020 #ifdef IN_RC 2021 2021 pDevIns->pDevHlpGC->pfnPATMSetMMIOPatchInfo(pDevIns, GCPhysAddr, &s->tpr); 2022 2022 #else
Note:
See TracChangeset
for help on using the changeset viewer.