- Timestamp:
- Apr 11, 2018 12:06:34 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevPit-i8254.cpp
r71809 r71821 659 659 return VERR_IOM_IOPORT_UNUSED; 660 660 } 661 RT_UNTRUSTED_VALIDATED_FENCE(); /* paranoia */ 661 662 662 663 PPITSTATE pThis = PDMINS_2_DATA(pDevIns, PPITSTATE); … … 760 761 * . . . . . . . * BCD/Binary mode: 0 = 16-bit binary, 1 = four-digit BCD 761 762 */ 762 unsigned channel = u32 >> 6; 763 unsigned channel = (u32 >> 6) & 0x3; 764 RT_UNTRUSTED_VALIDATED_FENCE(); /* paranoia */ 763 765 if (channel == 3) 764 766 { … … 768 770 { 769 771 PPITCHANNEL pChan = &pThis->channels[channel]; 770 if (u32 & (2 << channel)) { 772 if (u32 & (2 << channel)) 773 { 771 774 if (!(u32 & 0x20)) 772 775 pit_latch_count(pChan); … … 777 780 PTMTIMER pTimer = pChan->CTX_SUFF(pPit)->channels[0].CTX_SUFF(pTimer); 778 781 pChan->status = (pit_get_out1(pChan, TMTimerGet(pTimer)) << 7) 779 | (pChan->rw_mode << 4)780 | (pChan->mode << 1)781 | pChan->bcd;782 | (pChan->rw_mode << 4) 783 | (pChan->mode << 1) 784 | pChan->bcd; 782 785 pChan->status_latched = 1; 783 786 } … … 820 823 * Port 40-42h - Channel Data Ports. 821 824 */ 825 RT_UNTRUSTED_VALIDATED_FENCE(); /* paranoia */ 822 826 PPITCHANNEL pChan = &pThis->channels[uPort]; 823 827 DEVPIT_LOCK_BOTH_RETURN(pThis, VINF_IOM_R3_IOPORT_WRITE);
Note:
See TracChangeset
for help on using the changeset viewer.