Changeset 20056 in vbox for trunk/src/VBox/Devices
- Timestamp:
- May 27, 2009 7:33:15 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevAPIC.cpp
r20039 r20056 438 438 PDMBOTHCBDECL(void) apicSetBase(PPDMDEVINS pDevIns, uint64_t val); 439 439 PDMBOTHCBDECL(uint64_t) apicGetBase(PPDMDEVINS pDevIns); 440 PDMBOTHCBDECL(void) apicSetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t val , bool fMMIOFormat);441 PDMBOTHCBDECL(uint8_t) apicGetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu , bool fMMIOFormat);440 PDMBOTHCBDECL(void) apicSetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t val); 441 PDMBOTHCBDECL(uint8_t) apicGetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu); 442 442 PDMBOTHCBDECL(int) apicBusDeliverCallback(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, 443 443 uint8_t u8DeliveryMode, uint8_t iVector, uint8_t u8Polarity, … … 670 670 } 671 671 672 PDMBOTHCBDECL(void) apicSetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t val , bool fMMIOFormat)672 PDMBOTHCBDECL(void) apicSetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t val) 673 673 { 674 674 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 675 675 APICState *s = getLapicById(dev, idCpu); 676 677 if (!fMMIOFormat) 678 val = (val & 0x0f) << 4; 679 680 LogFlow(("apicSetTPR: val=%#x (trp %#x -> %#x)\n", val, s->tpr, val)); 681 apic_update_tpr(dev, s, val); 682 } 683 684 PDMBOTHCBDECL(uint8_t) apicGetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu, bool fMMIOFormat) 676 LogFlow(("apicSetTPR: val=%#x (trp %#x -> %#x)\n", val, s->tpr, (val & 0x0f) << 4)); 677 apic_update_tpr(dev, s, (val & 0x0f) << 4); 678 } 679 680 PDMBOTHCBDECL(uint8_t) apicGetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu) 685 681 { 686 682 APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *); 687 683 APICState *s = getLapicById(dev, idCpu); 688 689 if (fMMIOFormat) 690 { 691 Log2(("apicGetTPR: returns %#x\n", s->tpr)); 692 return s->tpr; 693 } 694 else 695 { 696 Log2(("apicGetTPR: returns %#x\n", s->tpr >> 4)); 697 return s->tpr >> 4; 698 } 684 Log2(("apicGetTPR: returns %#x\n", s->tpr >> 4)); 685 return s->tpr >> 4; 699 686 } 700 687
Note:
See TracChangeset
for help on using the changeset viewer.