Changeset 36649 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Apr 12, 2011 10:56:51 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 71120
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevHPET.cpp
r35353 r36649 741 741 break; 742 742 } 743 // for 8-byte accesses we just split them, happens under lock anyway744 743 if ((iIndex >= 0x100) && (iIndex < 0x400)) 745 744 { 746 745 uint32_t iTimer = (iIndex - 0x100) / 0x20; 747 746 uint32_t iTimerReg = (iIndex - 0x100) % 0x20; 748 747 748 /* for most 8-byte accesses we just split them, happens under lock anyway. */ 749 749 rc = hpetTimerRegRead32(pThis, iTimer, iTimerReg, &value.u32[0]); 750 750 if (RT_UNLIKELY(rc != VINF_SUCCESS)) … … 754 754 else 755 755 { 756 rc = hpetConfigRegRead32(pThis, iIndex, &value.u32[0]); 757 if (RT_UNLIKELY(rc != VINF_SUCCESS)) 758 break; 759 rc = hpetConfigRegRead32(pThis, iIndex+4, &value.u32[1]); 756 if (iIndex == HPET_COUNTER) 757 { 758 /* When reading HPET counter we must read it in a single read, 759 to avoid unexpected time jumps on 32-bit overflow. */ 760 value.u64 = 761 (pThis->u64HpetConfig & HPET_CFG_ENABLE) != 0 762 ? 763 hpetGetTicks(pThis) 764 : 765 pThis->u64HpetCounter; 766 rc = VINF_SUCCESS; 767 } 768 else 769 { 770 /* for most 8-byte accesses we just split them, happens under lock anyway. */ 771 772 rc = hpetConfigRegRead32(pThis, iIndex, &value.u32[0]); 773 if (RT_UNLIKELY(rc != VINF_SUCCESS)) 774 break; 775 rc = hpetConfigRegRead32(pThis, iIndex+4, &value.u32[1]); 776 } 760 777 } 761 778 if (rc == VINF_SUCCESS)
Note:
See TracChangeset
for help on using the changeset viewer.