Changeset 81953 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Nov 18, 2019 5:04:40 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134750
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevHPET.cpp
r81952 r81953 153 153 * Acquires the HPET lock or returns. 154 154 */ 155 #define DEVHPET_LOCK_RETURN(a_p This, a_rcBusy) \155 #define DEVHPET_LOCK_RETURN(a_pDevIns, a_pThis, a_rcBusy) \ 156 156 do { \ 157 int rcLock = PDMCritSectEnter(&(a_pThis)->CritSect, (a_rcBusy)); \ 158 if (rcLock != VINF_SUCCESS) \ 157 int rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, (a_rcBusy)); \ 158 if (rcLock == VINF_SUCCESS) \ 159 { /* likely */ } \ 160 else \ 159 161 return rcLock; \ 160 162 } while (0) … … 163 165 * Releases the HPET lock. 164 166 */ 165 #define DEVHPET_UNLOCK(a_p This) \166 do { PDM CritSectLeave(&(a_pThis)->CritSect); } while (0)167 #define DEVHPET_UNLOCK(a_pDevIns, a_pThis) \ 168 do { PDMDevHlpCritSectLeave((a_pDevIns), &(a_pThis)->CritSect); } while (0) 167 169 168 170 … … 170 172 * Acquires the TM lock and HPET lock, returns on failure. 171 173 */ 172 #define DEVHPET_LOCK_BOTH_RETURN(a_p This, a_rcBusy) \174 #define DEVHPET_LOCK_BOTH_RETURN(a_pDevIns, a_pThis, a_rcBusy) \ 173 175 do { \ 174 176 int rcLock = TMTimerLock((a_pThis)->aTimers[0].CTX_SUFF(pTimer), (a_rcBusy)); \ 175 if (rcLock != VINF_SUCCESS) \ 176 return rcLock; \ 177 rcLock = PDMCritSectEnter(&(a_pThis)->CritSect, (a_rcBusy)); \ 178 if (rcLock != VINF_SUCCESS) \ 177 if (rcLock == VINF_SUCCESS) \ 179 178 { \ 179 rcLock = PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, (a_rcBusy)); \ 180 if (rcLock == VINF_SUCCESS) \ 181 break; /* likely */ \ 180 182 TMTimerUnlock((a_pThis)->aTimers[0].CTX_SUFF(pTimer)); \ 181 return rcLock; \182 183 } \ 184 return rcLock; \ 183 185 } while (0) 184 186 … … 187 189 * Releases the HPET lock and TM lock. 188 190 */ 189 #define DEVHPET_UNLOCK_BOTH(a_p This) \191 #define DEVHPET_UNLOCK_BOTH(a_pDevIns, a_pThis) \ 190 192 do { \ 191 PDM CritSectLeave(&(a_pThis)->CritSect); \193 PDMDevHlpCritSectLeave((a_pDevIns), &(a_pThis)->CritSect); \ 192 194 TMTimerUnlock((a_pThis)->aTimers[0].CTX_SUFF(pTimer)); \ 193 195 } while (0) … … 248 250 249 251 /** 250 * The HPET state.252 * The shared HPET state. 251 253 */ 252 254 typedef struct HPET … … 394 396 * Sets the frequency hint if it's a periodic timer. 395 397 * 396 * @param pThis The HPET state.398 * @param pThis The shared HPET state. 397 399 * @param pHpetTimer The timer. 398 400 */ … … 465 467 * 466 468 * @returns VBox strict status code. 469 * @param pDevIns The device instance. 467 470 * @param pThis The HPET instance. 468 471 * @param iTimerNo The timer index. … … 472 475 * @remarks ASSUMES the caller holds the HPET lock. 473 476 */ 474 static int hpetTimerRegRead32(PCHPET pThis, uint32_t iTimerNo, uint32_t iTimerReg, uint32_t *pu32Value) 475 { 476 Assert(PDMCritSectIsOwner(&pThis->CritSect)); 477 static int hpetTimerRegRead32(PPDMDEVINS pDevIns, PCHPET pThis, uint32_t iTimerNo, uint32_t iTimerReg, uint32_t *pu32Value) 478 { 479 Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect)); 480 RT_NOREF(pDevIns); 477 481 478 482 if ( iTimerNo >= HPET_CAP_GET_TIMERS(pThis->u32Capabilities) /* The second check is only to satisfy Parfait; */ … … 530 534 * @returns Strict VBox status code. 531 535 * 532 * @param pThis The HPET state. 536 * @param pDevIns The device instance. 537 * @param pThis The shared HPET state. 533 538 * @param iTimerNo The timer being written to. 534 539 * @param iTimerReg The register being written to. … … 538 543 * the TM lock. 539 544 */ 540 static int hpetTimerRegWrite32(P HPET pThis, uint32_t iTimerNo, uint32_t iTimerReg, uint32_t u32NewValue)541 { 542 Assert(!PDM CritSectIsOwner(&pThis->CritSect) || TMTimerIsLockOwner(pThis->aTimers[0].CTX_SUFF(pTimer)));545 static int hpetTimerRegWrite32(PPDMDEVINS pDevIns, PHPET pThis, uint32_t iTimerNo, uint32_t iTimerReg, uint32_t u32NewValue) 546 { 547 Assert(!PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect) || TMTimerIsLockOwner(pThis->aTimers[0].CTX_SUFF(pTimer))); 543 548 544 549 if ( iTimerNo >= HPET_CAP_GET_TIMERS(pThis->u32Capabilities) … … 554 559 case HPET_TN_CFG: 555 560 { 556 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_WRITE);561 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 557 562 uint64_t u64Mask = HPET_TN_CFG_WRITE_MASK; 558 563 … … 580 585 /* We only care about lower 32-bits so far */ 581 586 pHpetTimer->u64Config = hpetUpdateMasked(u32NewValue, pHpetTimer->u64Config, u64Mask); 582 DEVHPET_UNLOCK(p This);587 DEVHPET_UNLOCK(pDevIns, pThis); 583 588 break; 584 589 } … … 590 595 case HPET_TN_CMP: /* lower bits of comparator register */ 591 596 { 592 DEVHPET_LOCK_BOTH_RETURN(p This, VINF_IOM_R3_MMIO_WRITE);597 DEVHPET_LOCK_BOTH_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 593 598 Log(("write HPET_TN_CMP on %d: %#x\n", iTimerNo, u32NewValue)); 594 599 … … 601 606 if (pThis->u64HpetConfig & HPET_CFG_ENABLE) 602 607 hpetProgramTimer(pThis, pHpetTimer); 603 DEVHPET_UNLOCK_BOTH(p This);608 DEVHPET_UNLOCK_BOTH(pDevIns, pThis); 604 609 break; 605 610 } … … 607 612 case HPET_TN_CMP + 4: /* upper bits of comparator register */ 608 613 { 609 DEVHPET_LOCK_BOTH_RETURN(p This, VINF_IOM_R3_MMIO_WRITE);614 DEVHPET_LOCK_BOTH_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 610 615 Log(("write HPET_TN_CMP + 4 on %d: %#x\n", iTimerNo, u32NewValue)); 611 616 if (!hpet32bitTimer(pHpetTimer)) … … 622 627 hpetProgramTimer(pThis, pHpetTimer); 623 628 } 624 DEVHPET_UNLOCK_BOTH(p This);629 DEVHPET_UNLOCK_BOTH(pDevIns, pThis); 625 630 break; 626 631 } … … 650 655 * 651 656 * @returns Strict VBox status code. 652 * @param pThis The HPET state. 657 * @param pDevIns The device instance. 658 * @param pThis The shared HPET state. 653 659 * @param idxReg The register to read. 654 660 * @param pu32Value Where to return the register value. … … 656 662 * @remarks The caller must not own the device lock if HPET_COUNTER is read. 657 663 */ 658 static int hpetConfigRegRead32(P HPET pThis, uint32_t idxReg, uint32_t *pu32Value)659 { 660 Assert(!PDM CritSectIsOwner(&pThis->CritSect) || (idxReg != HPET_COUNTER && idxReg != HPET_COUNTER + 4));664 static int hpetConfigRegRead32(PPDMDEVINS pDevIns, PHPET pThis, uint32_t idxReg, uint32_t *pu32Value) 665 { 666 Assert(!PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect) || (idxReg != HPET_COUNTER && idxReg != HPET_COUNTER + 4)); 661 667 662 668 uint32_t u32Value; … … 664 670 { 665 671 case HPET_ID: 666 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_READ);672 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ); 667 673 u32Value = pThis->u32Capabilities; 668 DEVHPET_UNLOCK(p This);674 DEVHPET_UNLOCK(pDevIns, pThis); 669 675 Log(("read HPET_ID: %#x\n", u32Value)); 670 676 break; 671 677 672 678 case HPET_PERIOD: 673 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_READ);679 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ); 674 680 u32Value = pThis->u32Period; 675 DEVHPET_UNLOCK(p This);681 DEVHPET_UNLOCK(pDevIns, pThis); 676 682 Log(("read HPET_PERIOD: %#x\n", u32Value)); 677 683 break; 678 684 679 685 case HPET_CFG: 680 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_READ);686 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ); 681 687 u32Value = (uint32_t)pThis->u64HpetConfig; 682 DEVHPET_UNLOCK(p This);688 DEVHPET_UNLOCK(pDevIns, pThis); 683 689 Log(("read HPET_CFG: %#x\n", u32Value)); 684 690 break; 685 691 686 692 case HPET_CFG + 4: 687 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_READ);693 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ); 688 694 u32Value = (uint32_t)(pThis->u64HpetConfig >> 32); 689 DEVHPET_UNLOCK(p This);695 DEVHPET_UNLOCK(pDevIns, pThis); 690 696 Log(("read of HPET_CFG + 4: %#x\n", u32Value)); 691 697 break; … … 694 700 case HPET_COUNTER + 4: 695 701 { 696 DEVHPET_LOCK_BOTH_RETURN(p This, VINF_IOM_R3_MMIO_READ);702 DEVHPET_LOCK_BOTH_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ); 697 703 698 704 uint64_t u64Ticks; … … 702 708 u64Ticks = pThis->u64HpetCounter; 703 709 704 DEVHPET_UNLOCK_BOTH(p This);710 DEVHPET_UNLOCK_BOTH(pDevIns, pThis); 705 711 706 712 /** @todo is it correct? */ … … 712 718 713 719 case HPET_STATUS: 714 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_READ);720 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ); 715 721 u32Value = (uint32_t)pThis->u64Isr; 716 DEVHPET_UNLOCK(p This);722 DEVHPET_UNLOCK(pDevIns, pThis); 717 723 Log(("read HPET_STATUS: %#x\n", u32Value)); 718 724 break; … … 734 740 * @returns Strict VBox status code. 735 741 * 736 * @param pThis The HPET state. 742 * @param pDevIns The device instance. 743 * @param pThis The shared HPET state. 737 744 * @param idxReg The register being written to. 738 745 * @param u32NewValue The value being written. … … 741 748 * the TM lock. 742 749 */ 743 static int hpetConfigRegWrite32(P HPET pThis, uint32_t idxReg, uint32_t u32NewValue)744 { 745 Assert(!PDM CritSectIsOwner(&pThis->CritSect) || TMTimerIsLockOwner(pThis->aTimers[0].CTX_SUFF(pTimer)));750 static int hpetConfigRegWrite32(PPDMDEVINS pDevIns, PHPET pThis, uint32_t idxReg, uint32_t u32NewValue) 751 { 752 Assert(!PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect) || TMTimerIsLockOwner(pThis->aTimers[0].CTX_SUFF(pTimer))); 746 753 747 754 int rc = VINF_SUCCESS; … … 757 764 case HPET_CFG: 758 765 { 759 DEVHPET_LOCK_BOTH_RETURN(p This, VINF_IOM_R3_MMIO_WRITE);766 DEVHPET_LOCK_BOTH_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 760 767 uint32_t const iOldValue = (uint32_t)(pThis->u64HpetConfig); 761 768 Log(("write HPET_CFG: %x (old %x)\n", u32NewValue, iOldValue)); … … 775 782 #endif 776 783 { 777 DEVHPET_UNLOCK_BOTH(p This);784 DEVHPET_UNLOCK_BOTH(pDevIns, pThis); 778 785 break; 779 786 } … … 811 818 } 812 819 813 DEVHPET_UNLOCK_BOTH(p This);820 DEVHPET_UNLOCK_BOTH(pDevIns, pThis); 814 821 break; 815 822 } … … 817 824 case HPET_CFG + 4: 818 825 { 819 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_WRITE);826 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 820 827 pThis->u64HpetConfig = hpetUpdateMasked((uint64_t)u32NewValue << 32, 821 828 pThis->u64HpetConfig, 822 829 UINT64_C(0xffffffff00000000)); 823 830 Log(("write HPET_CFG + 4: %x -> %#llx\n", u32NewValue, pThis->u64HpetConfig)); 824 DEVHPET_UNLOCK(p This);831 DEVHPET_UNLOCK(pDevIns, pThis); 825 832 break; 826 833 } … … 828 835 case HPET_STATUS: 829 836 { 830 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_WRITE);837 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 831 838 /* Clear ISR for all set bits in u32NewValue, see p. 14 of the HPET spec. */ 832 839 pThis->u64Isr &= ~((uint64_t)u32NewValue); 833 840 Log(("write HPET_STATUS: %x -> ISR=%#llx\n", u32NewValue, pThis->u64Isr)); 834 DEVHPET_UNLOCK(p This);841 DEVHPET_UNLOCK(pDevIns, pThis); 835 842 break; 836 843 } … … 846 853 case HPET_COUNTER: 847 854 { 848 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_WRITE);855 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 849 856 pThis->u64HpetCounter = RT_MAKE_U64(u32NewValue, RT_HI_U32(pThis->u64HpetCounter)); 850 857 Log(("write HPET_COUNTER: %#x -> %llx\n", u32NewValue, pThis->u64HpetCounter)); 851 DEVHPET_UNLOCK(p This);858 DEVHPET_UNLOCK(pDevIns, pThis); 852 859 break; 853 860 } … … 855 862 case HPET_COUNTER + 4: 856 863 { 857 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_WRITE);864 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 858 865 pThis->u64HpetCounter = RT_MAKE_U64(RT_LO_U32(pThis->u64HpetCounter), u32NewValue); 859 866 Log(("write HPET_COUNTER + 4: %#x -> %llx\n", u32NewValue, pThis->u64HpetCounter)); 860 DEVHPET_UNLOCK(p This);867 DEVHPET_UNLOCK(pDevIns, pThis); 861 868 break; 862 869 } … … 894 901 if (idxReg >= 0x100 && idxReg < 0x400) 895 902 { 896 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_READ);897 rc = hpetTimerRegRead32(p This,903 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ); 904 rc = hpetTimerRegRead32(pDevIns, pThis, 898 905 (idxReg - 0x100) / 0x20, 899 906 (idxReg - 0x100) % 0x20, 900 907 (uint32_t *)pv); 901 DEVHPET_UNLOCK(p This);908 DEVHPET_UNLOCK(pDevIns, pThis); 902 909 } 903 910 else 904 rc = hpetConfigRegRead32(p This, idxReg, (uint32_t *)pv);911 rc = hpetConfigRegRead32(pDevIns, pThis, idxReg, (uint32_t *)pv); 905 912 } 906 913 else … … 915 922 /* When reading HPET counter we must read it in a single read, 916 923 to avoid unexpected time jumps on 32-bit overflow. */ 917 DEVHPET_LOCK_BOTH_RETURN(p This, VINF_IOM_R3_MMIO_READ);924 DEVHPET_LOCK_BOTH_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ); 918 925 if (pThis->u64HpetConfig & HPET_CFG_ENABLE) 919 926 pValue->u = hpetGetTicks(pThis); 920 927 else 921 928 pValue->u = pThis->u64HpetCounter; 922 DEVHPET_UNLOCK_BOTH(p This);929 DEVHPET_UNLOCK_BOTH(pDevIns, pThis); 923 930 rc = VINF_SUCCESS; 924 931 } 925 932 else 926 933 { 927 DEVHPET_LOCK_RETURN(p This, VINF_IOM_R3_MMIO_READ);934 DEVHPET_LOCK_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_READ); 928 935 if (idxReg >= 0x100 && idxReg < 0x400) 929 936 { 930 937 uint32_t iTimer = (idxReg - 0x100) / 0x20; 931 938 uint32_t iTimerReg = (idxReg - 0x100) % 0x20; 932 rc = hpetTimerRegRead32(p This, iTimer, iTimerReg, &pValue->s.Lo);939 rc = hpetTimerRegRead32(pDevIns, pThis, iTimer, iTimerReg, &pValue->s.Lo); 933 940 if (rc == VINF_SUCCESS) 934 rc = hpetTimerRegRead32(p This, iTimer, iTimerReg + 4, &pValue->s.Hi);941 rc = hpetTimerRegRead32(pDevIns, pThis, iTimer, iTimerReg + 4, &pValue->s.Hi); 935 942 } 936 943 else 937 944 { 938 945 /* for most 8-byte accesses we just split them, happens under lock anyway. */ 939 rc = hpetConfigRegRead32(p This, idxReg, &pValue->s.Lo);946 rc = hpetConfigRegRead32(pDevIns, pThis, idxReg, &pValue->s.Lo); 940 947 if (rc == VINF_SUCCESS) 941 rc = hpetConfigRegRead32(p This, idxReg + 4, &pValue->s.Hi);948 rc = hpetConfigRegRead32(pDevIns, pThis, idxReg + 4, &pValue->s.Hi); 942 949 } 943 DEVHPET_UNLOCK(p This);950 DEVHPET_UNLOCK(pDevIns, pThis); 944 951 } 945 952 } … … 964 971 { 965 972 if (idxReg >= 0x100 && idxReg < 0x400) 966 rc = hpetTimerRegWrite32(p This,973 rc = hpetTimerRegWrite32(pDevIns, pThis, 967 974 (idxReg - 0x100) / 0x20, 968 975 (idxReg - 0x100) % 0x20, 969 976 *(uint32_t const *)pv); 970 977 else 971 rc = hpetConfigRegWrite32(p This, idxReg, *(uint32_t const *)pv);978 rc = hpetConfigRegWrite32(pDevIns, pThis, idxReg, *(uint32_t const *)pv); 972 979 } 973 980 else … … 977 984 */ 978 985 /* Split the access and rely on the locking to prevent trouble. */ 979 DEVHPET_LOCK_BOTH_RETURN(p This, VINF_IOM_R3_MMIO_WRITE);986 DEVHPET_LOCK_BOTH_RETURN(pDevIns, pThis, VINF_IOM_R3_MMIO_WRITE); 980 987 RTUINT64U uValue; 981 988 uValue.u = *(uint64_t const *)pv; … … 985 992 uint32_t iTimerReg = (idxReg - 0x100) % 0x20; 986 993 /** @todo Consider handling iTimerReg == HPET_TN_CMP specially here */ 987 rc = hpetTimerRegWrite32(p This, iTimer, iTimerReg, uValue.s.Lo);994 rc = hpetTimerRegWrite32(pDevIns, pThis, iTimer, iTimerReg, uValue.s.Lo); 988 995 if (RT_LIKELY(rc == VINF_SUCCESS)) 989 rc = hpetTimerRegWrite32(p This, iTimer, iTimerReg + 4, uValue.s.Hi);996 rc = hpetTimerRegWrite32(pDevIns, pThis, iTimer, iTimerReg + 4, uValue.s.Hi); 990 997 } 991 998 else 992 999 { 993 rc = hpetConfigRegWrite32(p This, idxReg, uValue.s.Lo);1000 rc = hpetConfigRegWrite32(pDevIns, pThis, idxReg, uValue.s.Lo); 994 1001 if (RT_LIKELY(rc == VINF_SUCCESS)) 995 rc = hpetConfigRegWrite32(p This, idxReg + 4, uValue.s.Hi);996 } 997 DEVHPET_UNLOCK_BOTH(p This);1002 rc = hpetConfigRegWrite32(pDevIns, pThis, idxReg + 4, uValue.s.Hi); 1003 } 1004 DEVHPET_UNLOCK_BOTH(pDevIns, pThis); 998 1005 } 999 1006 … … 1256 1263 * Set the timer frequency hints. 1257 1264 */ 1258 PDM CritSectEnter(&pThis->CritSect, VERR_IGNORED);1265 PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_IGNORED); 1259 1266 for (uint32_t iTimer = 0; iTimer < cTimers; iTimer++) 1260 1267 { … … 1263 1270 hpetTimerSetFrequencyHint(pThis, pHpetTimer); 1264 1271 } 1265 PDM CritSectLeave(&pThis->CritSect);1272 PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect); 1266 1273 return VINF_SUCCESS; 1267 1274 } … … 1329 1336 1330 1337 /* 1331 * The HPET state.1338 * The shared HPET state. 1332 1339 */ 1333 1340 pThis->u64HpetConfig = 0; … … 1471 1478 } 1472 1479 1473 #endif /* IN_RING3 */ 1480 #else /* !IN_RING3 */ 1481 1482 /** 1483 * @callback_method_impl{PDMDEVREGR0,pfnConstruct} 1484 */ 1485 static DECLCALLBACK(int) hpetRZConstruct(PPDMDEVINS pDevIns) 1486 { 1487 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns); 1488 //PHPET pThis = PDMDEVINS_2_DATA(pDevIns, PHPET); 1489 //PHPETCC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PHPETCC); 1490 1491 int rc = PDMDevHlpSetDeviceCritSect(pDevIns, PDMDevHlpCritSectGetNop(pDevIns)); 1492 AssertRCReturn(rc, rc); 1493 1494 //int rc = PDMDevHlpMmioSetUpContext(pDevIns, pThis->hMmio, ohciMmioWrite, ohciMmioRead, NULL /*pvUser*/); 1495 //AssertRCReturn(rc, rc); 1496 1497 return VINF_SUCCESS; 1498 } 1499 1500 1501 #endif /* !IN_RING3 */ 1474 1502 1475 1503 /** … … 1518 1546 #elif defined(IN_RING0) 1519 1547 /* .pfnEarlyConstruct = */ NULL, 1520 /* .pfnConstruct = */ NULL,1548 /* .pfnConstruct = */ hpetRZConstruct, 1521 1549 /* .pfnDestruct = */ NULL, 1522 1550 /* .pfnFinalDestruct = */ NULL, … … 1531 1559 /* .pfnReserved7 = */ NULL, 1532 1560 #elif defined(IN_RC) 1533 /* .pfnConstruct = */ NULL,1561 /* .pfnConstruct = */ hpetRZConstruct, 1534 1562 /* .pfnReserved0 = */ NULL, 1535 1563 /* .pfnReserved1 = */ NULL,
Note:
See TracChangeset
for help on using the changeset viewer.