VirtualBox

Changeset 20056 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
May 27, 2009 7:33:15 AM (16 years ago)
Author:
vboxsync
Message:

Backed out 47770 & 47771 (failed experiment)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevAPIC.cpp

    r20039 r20056  
    438438PDMBOTHCBDECL(void) apicSetBase(PPDMDEVINS pDevIns, uint64_t val);
    439439PDMBOTHCBDECL(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);
     440PDMBOTHCBDECL(void) apicSetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t val);
     441PDMBOTHCBDECL(uint8_t) apicGetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu);
    442442PDMBOTHCBDECL(int)  apicBusDeliverCallback(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode,
    443443                                           uint8_t u8DeliveryMode, uint8_t iVector, uint8_t u8Polarity,
     
    670670}
    671671
    672 PDMBOTHCBDECL(void) apicSetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t val, bool fMMIOFormat)
     672PDMBOTHCBDECL(void) apicSetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t val)
    673673{
    674674    APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *);
    675675    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
     680PDMBOTHCBDECL(uint8_t) apicGetTPR(PPDMDEVINS pDevIns, VMCPUID idCpu)
    685681{
    686682    APICDeviceInfo *dev = PDMINS_2_DATA(pDevIns, APICDeviceInfo *);
    687683    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;
    699686}
    700687
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette