Changeset 90308 in vbox
- Timestamp:
- Jul 23, 2021 1:59:25 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145864
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevIoApic.cpp
r90307 r90308 260 260 /** The IRQ tags and source IDs for each pin (tracing purposes). */ 261 261 uint32_t au32TagSrc[IOAPIC_NUM_INTR_PINS]; 262 /** Bitmap keeping the flip-flop-ness of pending interrupts. */ 263 uint64_t bmFlipFlop[(IOAPIC_NUM_INTR_PINS + 63) / 64]; 262 264 263 265 /** The internal IRR reflecting state of the interrupt lines. */ … … 664 666 #endif 665 667 666 /* 667 * For level-triggered interrupts, we set the remote IRR bit to indicate 668 * the local APIC has accepted the interrupt. 669 * 670 * For edge-triggered interrupts, we should not clear the IRR bit as it 671 * should remain intact to reflect the state of the interrupt line. 672 * The device will explicitly transition to inactive state via the 673 * ioapicSetIrq() callback. 674 */ 675 if ( u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL 676 && rc == VINF_SUCCESS) 677 { 678 Assert(u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL); 679 pThis->au64RedirTable[idxRte] |= IOAPIC_RTE_REMOTE_IRR; 680 STAM_COUNTER_INC(&pThis->StatLevelIrqSent); 681 STAM_PROFILE_ADV_START(&pThis->aStatLevelAct[idxRte], a); 668 if (rc == VINF_SUCCESS) 669 { 670 /* 671 * For level-triggered interrupts, we set the remote IRR bit to indicate 672 * the local APIC has accepted the interrupt. 673 * 674 * For edge-triggered interrupts, we should not clear the IRR bit as it 675 * should remain intact to reflect the state of the interrupt line. 676 * The device will explicitly transition to inactive state via the 677 * ioapicSetIrq() callback. 678 */ 679 if (u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL) 680 { 681 Assert(u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_LEVEL); 682 pThis->au64RedirTable[idxRte] |= IOAPIC_RTE_REMOTE_IRR; 683 STAM_COUNTER_INC(&pThis->StatLevelIrqSent); 684 STAM_PROFILE_ADV_START(&pThis->aStatLevelAct[idxRte], a); 685 } 686 /* 687 * Edge-triggered flip-flops gets cleaned up here as the device code will 688 * not do any explicit ioapicSetIrq and we won't receive any EOI either. 689 */ 690 else if (ASMBitTest(pThis->bmFlipFlop, idxRte)) 691 { 692 Log2(("IOAPIC: Clearing IRR for edge flip-flop %#x uTagSrc=%#x\n", idxRte, pThis->au32TagSrc[idxRte])); 693 pThis->au32TagSrc[idxRte] = 0; 694 pThis->uIrr &= ~RT_BIT_32(idxRte); 695 } 682 696 } 683 697 } … … 942 956 if (!fFlipFlop) 943 957 { 958 ASMBitClear(pThis->bmFlipFlop, idxRte); 959 944 960 uint32_t const uPrevIrr = pThis->uIrr & uPinMask; 945 961 if (u8TriggerMode == IOAPIC_RTE_TRIGGER_MODE_EDGE) … … 985 1001 * hence just the assert is done. 986 1002 */ 1003 ASMBitSet(pThis->bmFlipFlop, idxRte); 987 1004 IOAPIC_ASSERT_IRQ(uBusDevFn, idxRte, uPinMask, true); 988 1005 }
Note:
See TracChangeset
for help on using the changeset viewer.